Difference between revisions of "RTorrent/WTorrent"

From ArchWiki
Jump to navigation Jump to search
m (Fixed introduction, replaced bad tags with templates, added summary, added i18n)
Line 1: Line 1:
 
[[Category:Internet Applications]]
 
[[Category:Internet Applications]]
== wTorrent ==
+
{{i18n|wTorrent}}
 +
{{Article summary start}}
 +
{{Article summary text|This article covers the installation of the wTorrent program as well as its potential configuration with [[Lighttpd]] and [[Apache]].}}
 +
{{Article summary end}}
 +
 
 
'''[http://www.wtorrent-project.org/ wTorrent]''' is a web interface to rtorrent a high performance console based BitTorrent client. It uses rtorrent's build-in xmlrpc server to communicate with it.
 
'''[http://www.wtorrent-project.org/ wTorrent]''' is a web interface to rtorrent a high performance console based BitTorrent client. It uses rtorrent's build-in xmlrpc server to communicate with it.
  
Line 7: Line 11:
 
==wTorrent with Apache==
 
==wTorrent with Apache==
 
=== Installation ===
 
=== Installation ===
==== Using a package manager ====
+
==== Using pacman ====
 
  # pacman -S rtorrent apache php php-apache php-sqlite php-curl
 
  # pacman -S rtorrent apache php php-apache php-sqlite php-curl
  
Line 31: Line 35:
 
  $ sudo vi /etc/httpd/conf/httpd.conf
 
  $ sudo vi /etc/httpd/conf/httpd.conf
  
Locate the <code>LoadModule</code> lines and add:
+
Locate the {{ic|LoadModule}} lines and add:
 
  LoadModule scgi_module modules/mod_scgi.so
 
  LoadModule scgi_module modules/mod_scgi.so
  
Line 72: Line 76:
 
  # chmod -R 777 wtorrent
 
  # chmod -R 777 wtorrent
  
Start rtorrent (most common to open a screen and type <code>rtorrent</code>)
+
Start rtorrent (most common to open a screen and type {{ic|rtorrent}})
  
 
Point your browser to http://localhost/wtorrent/install.php and add a username & password. After you click the "Try configuration" and it gives you no errors click the "Save configuration"
 
Point your browser to http://localhost/wtorrent/install.php and add a username & password. After you click the "Try configuration" and it gives you no errors click the "Save configuration"
Line 85: Line 89:
  
 
== FAQ ==
 
== FAQ ==
'''1. Apache refuse to start when I use "sudo /etc/rc.d/httpd restart", why?'''
+
'''1. Apache refuses to start when I use "sudo /etc/rc.d/httpd restart", why?'''
  
 
Use the following to watch out whether your 80 port has been taken by other apps:
 
Use the following to watch out whether your 80 port has been taken by other apps:
Line 93: Line 97:
 
  $ tail -f /var/log/httpd/error_log
 
  $ tail -f /var/log/httpd/error_log
  
'''2. Why when I turn to http://localhost/wtorrent/install.php it return me no wtorrent setup page but a plain text page?'''
+
'''2. Why, when I turn to http://localhost/wtorrent/install.php, it returns not the wtorrent setup page but a plain text page?'''
  
 
You should check whether or not php is working on your apache. Add following lines to /etc/httpd/conf/httpd.conf:
 
You should check whether or not php is working on your apache. Add following lines to /etc/httpd/conf/httpd.conf:
 
In LoadModule Section, add:
 
In LoadModule Section, add:
<pre>
+
LoadModule php5_module modules/libphp5.so
LoadModule php5_module modules/libphp5.so
+
 
</pre>
 
  
 
In Supplemental configuration section add:
 
In Supplemental configuration section add:
<pre>
+
# php5
# php5
+
Include conf/extra/php5_module.conf
Include conf/extra/php5_module.conf
 
</pre>
 
  
 
And make sure that  
 
And make sure that  
<pre>
+
SCGIMount /RPC2 127.0.0.1:5000
SCGIMount /RPC2 127.0.0.1:5000
 
</pre>
 
  
 
is added after the Supplemental configuration section.
 
is added after the Supplemental configuration section.

Revision as of 21:31, 8 June 2012

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Template:Article summary start Template:Article summary text Template:Article summary end

wTorrent is a web interface to rtorrent a high performance console based BitTorrent client. It uses rtorrent's build-in xmlrpc server to communicate with it.

wTorrent is programmed in php using Smarty templates and XMLRPC for PHP library. wTorrent also uses javascript for rendering the page with AJAX, Scriptaculous and ShadedBorders.

wTorrent with Apache

Installation

Using pacman

# pacman -S rtorrent apache php php-apache php-sqlite php-curl

Install mod_scgiAUR from the AUR.

Manual installation

You need to install: subversion, apache, php, libtorrent-svn, rtorrent-svn, and xmlrpc-c-svn packages

you cannot use the version of rtorrent from the core it is not compiled with rpc support!

mod_scgi

After you install the packages you need to install the mod_scgi module for Apache:

$ wget http://quixote.python.ca/releases/scgi-1.13.tar.gz 

or

$ wget http://python.ca/scgi/releases/scgi-1.13.tar.gz
$ tar xf scgi-1.13.tar.gz
$ cd scgi-1.13/apache2
$ sudo apxs -i -c mod_scgi.c

Configuration

Adding mod_scgi to httpd.conf

$ sudo vi /etc/httpd/conf/httpd.conf

Locate the LoadModule lines and add:

LoadModule scgi_module modules/mod_scgi.so

Add to the end of the file:

SCGIMount /RPC2 127.0.0.1:5000

Save the file and quit (:wq)

Enabling SQLite in php.ini

$ sudo vi /etc/php/php.ini

Locate & un-comment the following:

extension=pdo.so
extension=pdo_sqlite.so
extension=curl.so
extension=xmlrpc.so
extension=sqlite.so
extension=sqlite3.so

PHP

PHP is practically available out of the box now.

  • Add these lines in /etc/httpd/conf/httpd.conf:

NOTE: Place them at the end of "LoadModule" list or bottom of the file.

LoadModule php5_module modules/libphp5.so
Include conf/extra/php5_module.conf
  • Restart the Apache service to make changes take effect (as root):

Restart Apache

$ sudo /etc/rc.d/httpd restart

Final steps

Add the following to your ~/.rtorrent.rc

scgi_port = localhost:5000

Get the latest version of wtorrent & install to your web directory:

# cd /srv/http
# svn co http://svn.wtorrent-project.org/wtorrent/trunk/wtorrent/
# chmod -R 777 wtorrent

Start rtorrent (most common to open a screen and type rtorrent)

Point your browser to http://localhost/wtorrent/install.php and add a username & password. After you click the "Try configuration" and it gives you no errors click the "Save configuration"

wTorrent with Lighttpd

Installation

 # pacman -S rtorrent lighttpd php sqlite3

Configuration

http://www.wtorrent-project.org/trac/wiki/wTorrentInstall#UsingLighttpd

FAQ

1. Apache refuses to start when I use "sudo /etc/rc.d/httpd restart", why?

Use the following to watch out whether your 80 port has been taken by other apps:

$ sudo netstat -tnap | grep ':80'

And terminate that apps then you should start your apache now. You can use the following to screen the errors of apache:

$ tail -f /var/log/httpd/error_log

2. Why, when I turn to http://localhost/wtorrent/install.php, it returns not the wtorrent setup page but a plain text page?

You should check whether or not php is working on your apache. Add following lines to /etc/httpd/conf/httpd.conf: In LoadModule Section, add:

LoadModule php5_module modules/libphp5.so


In Supplemental configuration section add:

# php5
Include conf/extra/php5_module.conf

And make sure that

SCGIMount /RPC2 127.0.0.1:5000

is added after the Supplemental configuration section.