| 1 | = Installation guide = |
| 2 | |
| 3 | * [#prerequisites Prerequisites] |
| 4 | * [#installation Installation] |
| 5 | * [#troubleshooting Troubleshooting] |
| 6 | |
| 7 | == Prerequisites == #prerequisites |
| 8 | |
| 9 | * rtorrent 0.7.8 |
| 10 | * compiled with "--with-xmlrpc-c" |
| 11 | * sigc++-2.0 |
| 12 | * xmlrpc >= 1.07 |
| 13 | * some webserver |
| 14 | * php5, with the following extensions: |
| 15 | * xsl (libxslt1.1) |
| 16 | * xmlrpc |
| 17 | |
| 18 | == Installation == #installation |
| 19 | |
| 20 | * [#rtorrentside rTorrent side] |
| 21 | * [#preparing Preparing the system] |
| 22 | * [#xmlrpc Installing XMLRPC-C] |
| 23 | * [#libtorrent Installing libTorrent] |
| 24 | * [#rtorrent Installing rTorrent] |
| 25 | * [#rtorrentsetup Setting up rTorrent] |
| 26 | * [#rtwiside rTWi side] |
| 27 | * [#rtwi Installing rTWi] |
| 28 | * [#addingusers Adding users] |
| 29 | |
| 30 | === rTorrent side === #rtorrentside |
| 31 | |
| 32 | ==== Preparing the system ==== #preparing |
| 33 | |
| 34 | You'll need the following packages to install xmlrpc-c, libtorrent and rtorrent |
| 35 | * make |
| 36 | * libcurl-openssl-dev |
| 37 | * pkg-config |
| 38 | * sigc++-2.0-dev |
| 39 | * libncurses-dev |
| 40 | |
| 41 | ==== Installing XMLRPC-C ==== #xmlrpc |
| 42 | |
| 43 | To install xmlrpc, get the source from [http://sourceforge.net/project/showfiles.php?group_id=16847 The xmlrpc-c page] |
| 44 | In my case, i could only compile the 1.11.00 version (due to a known bug, you may try to configure with --disable-cplusplus, if the compiling stops with some syntax error) |
| 45 | Of course, you can try any version, over 1.07 (or any version over 1.00, but you'll get incorrect data for values bigger than 2^31-1^, since it does not support 64bit integers) |
| 46 | |
| 47 | Follow the next steps: |
| 48 | `cd /usr/src |
| 49 | wget http://dfn.dl.sourceforge.net/sourceforge/xmlrpc-c/xmlrpc-c-1.11.00.tgz |
| 50 | tar xvf xmlrpc-c-1.11.00.tgz |
| 51 | cd xmlrpc-c-1.11.00 |
| 52 | ./configure --disable-cplusplus |
| 53 | make |
| 54 | make install` |
| 55 | |
| 56 | ==== Installing libTorrent ==== #libtorrent |
| 57 | |
| 58 | To install libtorrent, follow the next steps: |
| 59 | `mkdir /usr/src/libtorrent |
| 60 | wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.11.8.tar.gz |
| 61 | tar xvf libtorrent-0.11.8.tar.gz |
| 62 | cd /usr/src/libtorrent-0.11.8 |
| 63 | ./configure |
| 64 | make |
| 65 | make install` |
| 66 | |
| 67 | ==== Installing rTorrent ==== #rtorrent |
| 68 | |
| 69 | To install rtorrent, follow the next steps: |
| 70 | `mkdir /usr/src/rtorrent |
| 71 | wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.7.8.tar.gz |
| 72 | tar xvf rtorrent-0.7.8.tar.gz |
| 73 | cd /usr/src/rtorrent-0.7.8 |
| 74 | ./configure --with-xmlrpc-c |
| 75 | make |
| 76 | make install` |
| 77 | |
| 78 | ==== Setting up rTorrent ==== |
| 79 | |
| 80 | If you don't have a .rtorrent.rc file, create one into your home directory. |
| 81 | You can find an example .rtorrent.rc file [http://libtorrent.rakshasa.no/browser/trunk/rtorrent/doc/rtorrent.rc?rev=latest here]. |
| 82 | Open .rtorrent.rc, and edit it (for each user): |
| 83 | * add this line to your .rtorrent.rc `scgi_port = 127.0.0.1:12345` where 12345 can be replaced by your choice |
| 84 | * and restart rtorrent |
| 85 | * if you have more than one user, set a different port for each user's .rtorrent.rc file (be aware, to set different session directories for the users) |
| 86 | * set your download directory |
| 87 | * make sure, you have your session directory set and it exists, so rtorrent will remember your torrents after it's restarted |
| 88 | |
| 89 | Now, you can start rtorrent, and on the bottom, you should see something like this: |
| 90 | `(20:55:52) XMLRPC initialized with 356 functions.` |
| 91 | |
| 92 | === rTWi side === #rtwiside |
| 93 | |
| 94 | ==== Installing and setting up rTWi ==== #rtwi |
| 95 | |
| 96 | If everything went fine, extract the rtwi-xxxxxx.tar.gz to some place where your webserver can see it. |
| 97 | In case it's your first install, open the freshly extracted includes/config.php.inc, and edit the next lines: |
| 98 | * $abs_path (the absolute path of your webroot, i.e.: "/var/www") |
| 99 | * $domain (your domain, i.e.: "example.com") |
| 100 | * $site_path (the relative path of the rtwi-xxxx directory, or whatever you renamed it, within your webroot, i.e.: "/rtwi/", if it's absolute path is /var/www/rtwi/) |
| 101 | * $include_path (if you move the includes directory, or eave it untouched, i.e.: "/includes") |
| 102 | * if your php interpreter does not handle .html files (only .php) set the $default_ext variable to "php", and rename the index.html to index.php |
| 103 | |
| 104 | ==== Adding users ==== #addingusers |
| 105 | |
| 106 | * find row 44, and change it: |
| 107 | * replace "userX" with the actual linux username |
| 108 | * replace "1234567890abcdef1234567890abcdef12345678" with the sha1 hash of the choosen password for the webui (you can generate the sha1 hash here => http://www.johnmaguire.us/tools/hashcalc/index.php) |
| 109 | * replace "12345", with the port, you've set in the user's .rtorrent.rc file |
| 110 | * keep the quotes in the last three steps |
| 111 | * if you have more than one user, you have to repeat these steps, for each one of them, so you'll get something like this: |
| 112 | ` $users = array( |
| 113 | "user1" => array( "pass" => "1234567890abcdef1234567890abcdef12345678", "port" => "12345" ), |
| 114 | "user2" => array( "pass" => "1234567890abcdef1234567890abcdef12345678", "port" => "12346" ), |
| 115 | "user3" => array( "pass" => "1234567890abcdef1234567890abcdef12345678", "port" => "12347" ), |
| 116 | );` |
| 117 | |
| 118 | Important |
| 119 | * all users, using this webui will need an "!rtwi_files" directory into their download directory (set by "directory = some/path" in the .rtorrent.rc) with 0777 rights |
| 120 | * the download directory should be inside your home directory (this might change later, as soon as i find out something secure) |
| 121 | |
| 122 | |
| 123 | == Troubleshooting == #troubleshooting |
| 124 | |
| 125 | >XMLRPC-C 1.11 compilation stops with some syntax error |
| 126 | >>Configure with --disable-cplusplus |
| 127 | |
| 128 | >rTorrent compilation stops with an errer, which says, i have no libtorrent installed (No package 'libtorrent' found) |
| 129 | >>Find your libtorrent.pc file (try /usr/local/lib/pkgconfig), and set the PKG_CONFIG_PATH environmental variable to it's path (export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig) |
| 130 | |
| 131 | >rTorrent compilation stops with an error, which says, my libtorrent's version is an empty string (Requested 'libtorrent >= 0.11.8' but version of libtorrent is) |
| 132 | >>Upgrade you automake (you need 1.5+) |
| 133 | |
| 134 | >I can see the php code in the browser |
| 135 | >>Your php settings does not allows you to to have a php file named .html - change these settings, or rename the index.html to index.php, and set the $default_ext variable to "php" in rtwi's /includes/config.inc.php |
| 136 | >>Php modul is not loaded by the webserver, take a look at your webserver's manual, to find out, how to enable it |
| 137 | |
| 138 | >I get some php errors about xsl... |
| 139 | >>Install (or if it's installed, than enable) the xsl php extension |
| 140 | |
| 141 | >I get some php errors about xmlrpc... |
| 142 | >>Install (or if it's installed, than enable) the xmlrpc php extension |
| 143 | |
| 144 | >I've set my username and my password in the config.inc.php, but i cannot log in |
| 145 | >>Did you use the password? you need to use the password's sha1 hash (you can generate one here =>you can generate the sha1 hash here => http://www.johnmaguire.us/tools/hashcalc/index.php) |
| 146 | >>Enable cookies (or at least session cookies) |
| 147 | |
| 148 | >I get the "No connection" message in rtwi |
| 149 | >>Set the same port in your .rtorrent.rc file, at the scgi_port=, and in the rtwi's /includes/config.inc.php at your user's line |
| 150 | >>Check, if rtottent is listening on the port, you've set (netstat -na | grep 12345) |
| 151 | >>>If it is |
| 152 | >>>>Check your firewall |
| 153 | >>>>Recheck the port set in rtwi's incudes/config.inc.php |
| 154 | >>>Of it is not |
| 155 | >>>>Recheck your .rtorrent.rc - it should have a line like this: scgi_port = 127.0.0.1:12345 |
| 156 | >>>>Try to set the scgi port in runtime (ctrl+x, then entre "scgi_port = 127.0.0.1:12345") |
| 157 | >>>>>If rtorrent stops with an error, that says xmlrpc is not supported, configure xmlrpc-c with --with-xmlrpc-c, and recompile |
| 158 | |
| 159 | >The add torrent menu does not work (at all - it shows me an empty page) |
| 160 | >>Your download directory should be in your home directory |