Page 1 of 7 1234 ... LastLast
Results 1 to 10 of 64

Thread: Installing rtorrent and rutorrent on Debian based linux

  1. #1
    ca_aok's Avatar Poster BT Rep: +1
    Join Date
    Feb 2008
    Posts
    1,547
    Installing rtorrent and rutorrent on Debian based linux

    Note: this guide is for debian based distros only. This *should* work on Ubuntu, but I make no guarantees. Whenever you see <yourusernamehere> replace it with the username you intend to run rtorrent with (you weren't going to run it as root were you?). The command "adduser" will add a new one if you only have a root user account at the moment. I abuse chmod 777 a fair bit during this guide because I don't share my box with other users. If you do so, be careful with permissions. However, using chmod 777 is almost guaranteed to make everything work nicely. To exit the nano text editor, hit "CTRL+x". When prompted to overwrite buffer, hit "y", and then keep the filename as listed (just hit enter).

    Current versions at the time of this guide:

    rtorrent 0.8.6/libtorrent 0.12.6/rutorrent 3.2 stable

    Note: Terminal commands are in italics, stuff to add to text files are in quotes.

    Run all commands as root user:

    This is going to add a ton of stuff to your box, so it may take a while. I think I've covered most of the essentials, let me know if I left anything big out.

    apt-get update
    apt-get upgrade


    Note: the following is all one line.

    apt-get install build-essential autoconf apache2 automake libtool libncurses5-dev libncursesw5-dev libcurl4-openssl-dev screen ntp ntpdate openssl php5 php5-cli php5-geoip php5-cgi gawk libapache2-mod-php5 libapache2-mod-scgi curl libcppunit-dev libsigc++-2.0-dev subversion nano unrar-free unzip

    a2enmod ssl
    a2enmod auth_digest
    a2enmod scgi

    reboot


    Wait for your box to come back online, this may take a few minutes. Then log back in as root user.

    STEP 1: Installing rtorrent/libtorrent

    cd /home/<yourusernamehere>/

    svn co https://xmlrpc-c.svn.sourceforge.net...pc-c/advanced/ xmlrpc-c
    wget http://libtorrent.rakshasa.no/downlo...-0.12.6.tar.gz
    wget http://libtorrent.rakshasa.no/downlo...t-0.8.6.tar.gz
    tar -xvzf libtorrent-0.12.6.tar.gz
    tar -xvzf rtorrent-0.8.6.tar.gz
    rm libtorrent-0.12.6.tar.gz
    rm rtorrent-0.8.6.tar.gz


    cd xmlrpc-c
    ./configure --disable-cplusplus
    make
    make install

    cd ../libtorrent-0.12.6
    ./autogen.sh
    ./configure
    make
    make install

    cd ../rtorrent-0.8.6
    ./autogen.sh
    ./configure --with-xmlrpc-c
    make
    make install

    ldconfig


    If all went well, rtorrent and libtorrent should now be installed with webui support (via xmlrpc). If you wish to use wtorrent as a webui there are other guides dealing with its installation, I personally prefer rutorrent in every way.

    Note: If running "make" gives you a bunch of libtool errors, run the following command before each instance of ./autogen.sh. Remember that you'll need to do this both for libtorrent and rtorrent when compiling them:

    rm -f scripts/{libtool,lt*}.m4

    The commands should look like this:

    cd ../libtorrent-0.12.6
    rm -f scripts/{libtool,lt*}.m4
    ./autogen.sh
    ./configure
    make
    make install

    cd ../rtorrent-0.8.6
    rm -f scripts/{libtool,lt*}.m4
    ./autogen.sh
    ./configure --with-xmlrpc-c
    make
    make install

    ldconfig


    STEP 2: Configuring rtorrent

    There are many, MANY features you can configure in .rtorrent.rc. I'm a minimalist myself, so my configuration is extremely barebones. You can find a fully commented config file here: http://pastebin.ca/1802272

    However, I'll show you mine:

    cd /home/<yourusernamehere>/
    nano .rtorrent.rc


    Quote Originally Posted by .rtorrent.rc
    directory = /home/<yourusernamehere>/torrents

    http_capath=/etc/ssl/certs

    scgi_port = 127.0.0.1:5000
    encoding_list = UTF-8

    port_range = 55990-56000

    port_random = no

    use_udp_trackers = no
    dht = disable
    check_hash = no

    peer_exchange = no
    encryption = allow_incoming,enable_retry,try_outgoing

    schedule = watch_directory,5,5,load_start=/home/<yourusernamehere>/watch/*.torrent
    session = /home/<yourusernamehere>/session
    This will make your watch directory at /home/<yourusernamehere>/watch and your session directory at /home/<yourusernamehere>/session. Your torrent data will be saved at /home/<yourusernamehere>/torrents.

    mkdir session
    mkdir watch
    mkdir torrents

    chown -R <yourusernamehere>:<yourusernamehere> /home/<yourusernamehere>
    chmod -R 777 session
    chmod -R 777 watch
    chmod -R 777 torrents


    Now that this is all done, this is a good time to see if rtorrent will run. Use the command:

    rtorrent

    If rtorrent pops up, everything is great. Ignore any errors about not finding .rtorrent.rc for now, since you're running it as root. Use CTRL+q to quit the program. If not, you've messed something up (and this was the easy part).

    STEP 3: Creating an SSL certificate for your server/Adding password authentication

    Because everyone loves encryption right? Seriously though, using both these features will greatly add to the security of your box.

    openssl req $@ -new -x509 -days 365 -nodes -out /etc/apache2/apache.pem -keyout /etc/apache2/apache.pem
    chmod 600 /etc/apache2/apache.pem


    This will create a self-signed certificate for your server that lasts for 1 year. You'll be prompted for plenty of information. Whenever you're asked for a name, use A) your server IP or B) your domain name if you have one. I recommend making the rest fake, it doesn't really matter.

    htdigest -c /etc/apache2/passwords gods myuser

    Where "myuser" is the username you'll use to connect to the webui. After running this command, you'll be prompted for a password. This will be the password you enter to log into your webui.

    STEP 4: Setting up your Apache Webserver

    This is where things get difficult. Many people swear by lighttpd, however I don't have much experience with the program. If there's demand I'll consider adding a segment on lighttpd to the guide.

    cd /etc/apache2/
    nano apache2.conf


    Add these lines to the very bottom of the file. You can replace "localhost" with your domain name if you have one.
    Quote Originally Posted by apache2.conf
    SCGIMount /rutorrent/RPC2 127.0.0.1:5000
    servername localhost
    nano ports.conf

    Add this line if it isn't present already (and it should be, CHECK CAREFULLY).
    Quote Originally Posted by ports.conf
    Listen 443
    nano /etc/apache2/sites-available/default

    Paste this over top of the current config, with two notable exceptions.
    Where it says http://your.server.ip/rutorrent, replace your.server.ip with your server IP or domain name.

    http://pastebin.ca/1802303
    http://pastebin.com/LzA7DmQm

    STEP 5: Installing rutorrent

    cd /var/www/
    wget http://rutorrent.googlecode.com/file...ent-3.2.tar.gz
    tar -xvzf rutorrent-3.2.tar.gz
    rm rutorrent-3.2.tar.gz
    cd /var/www/rutorrent/conf/
    nano config.php


    Inside the config file, change the line:
    Quote Originally Posted by config.php
    $XMLRPCMountPoint = "/RPC2";
    to:
    Quote Originally Posted by config.php
    $XMLRPCMountPoint = "/rutorrent/RPC2";
    Save the file and exit nano.

    Any plugins you want should be downloaded to the /var/www/rutorrent/plugins folder.
    cd /var/www/rutorrent/plugins
    wget http://rutorrent.googlecode.com/file...ame-3.2.tar.gz
    tar -xvzf pluginname-3.2.tar.gz


    Repeat for each plugin you want. Alternatively, you can install every available plugin (though this will slow rutorrent down, this is NOT recommended) using the following:
    cd /var/www/rutorrent/
    wget http://rutorrent.googlecode.com/file...ins-3.2.tar.gz
    tar -xvzf plugins-3.2.tar.gz


    Afterward, execute the following:
    rm *.tar.gz
    chmod -R 777 /var/www/rutorrent/


    A list of standard plugins can be found here:
    http://code.google.com/p/rutorrent/wiki/Plugins

    Now do the following:

    apache2ctl configtest
    /etc/init.d/apache2 force-reload
    /etc/init.d/apache2 restart


    If everything has worked up to this point (apache2ctl doesn't throw any errors), you're basically in the clear!

    STEP 6: Starting rtorrent
    Log out of root and back into your regular username at this point!

    cd ~
    screen rtorrent


    You can hit "CTRL+a+d" in that order to detach the screen. This keeps rtorrent running in the background when you log out of your SSH session. Reattach the screen using:

    screen -xaAD

    Now visit the following address:

    http://your.server.ip/rutorrent/
    *or*
    https://your.server.ip/rutorrent/
    You'll need to accept the self-signed cert in the second URL. Either way, you should be prompted for a username and password. Use the info you chose in Step 3 with the "htdigest" command.

    If all went well, everything is now installed! I hope this helps those of you struggling with rtorrent and rutorrent.

    TO BE ADDED IN THE FUTURE:
    -A section on lighttpd.
    -Pictures (possibly, most of this is command line based anyway).
    -Detailed descriptions and guides for a few of the plugins, especially RSS.

    If I've made any glaring errors, please let me know. I'm quite tired at the moment, and only human!

    A tip for those of you using irssi with WHATauto or any other program that also requires screen to stay running:
    You can create new "screens" within a single screen session using the command CTRL+a+c. You then switch between each screen using CTRL+a+p. The screen still detaches with CTRL+a+d and you can switch between them after reattaching using screen -xaAD.

    Appendix 1: Plugins

    1. RPC/HTTPRPC - a plug-in for linking rtorrent and a web server.
    2. erasedata - adds the item "Delete with the data" to the context menu of the torrent.
    3. darkpal - just another ruTorrent interface colors.
    4. choose - adds a button to the New Torrent dialogue for comfortable navigation through the server file system.
    5. сreate - adds the command of new torrent creation.
    6. trafic - adds a subsystem of the traffic counting.
    7. RSS - realizes operations with RSS-feeds.
    8. edit - allows to edit the trackers list of the existing torrent.
    9. throttle - allows to set different speed limitations for groups of torrents.
    10. retrackers - automatically adds defined re-trackers for newly added torrents.
    11. cookies - allows to define a set of cookies for trackers which use such method of authorization.
    12. search - allows to redefine the list of search engines.
    13. scheduler - allows to change speed limitations of downloads/uploads depending on hour of the day and day of the week.
    14. autotools - realizes some automation functions (autolabel, automove).
    15. datadir - allows to change the torrent's data directory.
    16. tracklabels - adds a set of automatically generated by trackers' names labels onto categories pane.
    17. geoip - shows country name and flag for connected peers.
    18. ratio - allows to set different ratio limitations for groups of torrents.
    19. Show_peers_like_wtorrent - changes the format of values in "Seeds" and "Peers" columns of the torrents list.
    20. seedingtime - adds the column with the torrent's finishing time to torrents list.
    21. diskspace - adds a free disk space indicator to the rutorrent interface as a percentage.
    22. unpack - automatically unpacks scene releases.
    23. source - lets you download the .torrent files from your box via HTTP.
    24. data - lets you download the content from your box via HTTP.
    25. chunks - displays chunks in a format similar to uTorrent.
    26. _getdir - allows you to use an easier navigation system for various rutorrent and plugin settings.
    27. cpuload - shows your current CPU load as a percentage at the bottom of rutorrent.
    28. theme - gives you the choice of several skins for rutorrent.
    29. loginmgr - lets you log in to private sites so that you can directly use the torrent URL to add a torrent to rutorrent. Useful for RSS.
    30. RSSurlrewrite - lets you auto-rewrite some stuff in the RSS manager based on regex.

    Third party plugins:
    1. Autodl-irssi - an auto downloader for IRC announce channels.
    2. Pause - gives you both a pause/play button for the rutorrent refreshes, along with a manual refresh button.
    3. TaddLabel - gives additional label functionality.
    4. Hostname - adds a hostname column to the peers tab.
    5. NFO - shows the .nfo files from downloaded torrents.
    6. Chat - allows you to chat with other rutorrent users on your server only.
    7. Logoff - lets you switch users or logoff from within rutorrent.
    8. InstantSearch - searches your current torrent list.

    A few notes:
    -The RPC plugin is unnecessary since you've set up RPC in apache2.
    -You should probably be using _getdir in conjunction with any other plugins you're using.
    -erasedata can be somewhat slow and buggy, but SHOULD work correctly. Make sure its directory is chmod'd to be executeable.
    -A more detailed explanation of autotools can be found at http://code.google.com/p/rutorrent/wiki/PluginAutotools
    -Most of the other plugins are explained fairly well above.

    A few specific configurations:
    Create:
    You can edit /var/www/rutorrent/plugins/create/conf.php
    Make sure your torrent creator of choice is in your system's PATH, otherwise you'll need to add the program's full path to the second configuration line in the file. The line in my config looks like this:
    $useExternal = "mktorrent"

    RSS:
    You can edit /var/www/rutorrent/plugins/rss/conf.php
    Change the line $updateInterval = 30;
    to: $updateInterval = 5;

    To add a feed, right click on "All Feeds" and hit "Add Feed". Type a name and your RSS URL into the boxes.

    Now right click on "All Feeds" again and select "RSS Manager".

    Hit "Add" and pick a name for your new filter.

    Add a filter as you will, using "*" as a wildcard. To download the whole feed, just type "**" in that box. In the RSS drop box, select the feed you just added. In the Directory box, you can create a custom download path for the feed (for example, /home/user/torrents/WhatRSS/). Make sure this directory exists (use mkdir at the command line). You can also add a label to each torrent downloaded, and if you have the ratio or throttle plugins installed, you can set these torrents to conform to one of those plugin settings.

    GeoIP:
    Note: If you want to install the GeoIP plugin (shows flags in the peer list), you'll need to do this as root user:

    wget http://geolite.maxmind.com/download/...iteCity.dat.gz
    gunzip GeoLiteCity.dat.gz
    mkdir -v /usr/share/GeoIP
    mv -v GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat
    Last edited by ca_aok; 02-03-2011 at 04:20 PM.
    Quote Originally Posted by whatcdfan View Post
    u are somewhat fairer then the last occasions but still pal i give a damn to what u said and expect i really dont need anything from u or optimuscrime i get what i want coz u 2 guyes dont own bittorrent and i dont think i portrayed any image i wrote simple english and u are seems to be very good at making assumptions if someone is not a cheater and u assume he's a cheater and write what u wrote and when u are proven wrong who u think will owe an apology then barack obama????

  2. Guides and Tutorials   -   #2
    I'm not a Linux user but I'd like to thank you for taking the time to write all that. Looks like a very detailed tutorial.
    "I just remembered something that happened a long time ago."

  3. Guides and Tutorials   -   #3
    Cabalo's Avatar FileSharingTalker BT Rep: +24BT Rep +24BT Rep +24BT Rep +24BT Rep +24
    Join Date
    Mar 2007
    Location
    European Union
    Age
    47
    Posts
    11,849
    I'll have to look deep into this. Seems top notch!

  4. Guides and Tutorials   -   #4
    Funkin''s Avatar home skillet BT Rep: +4
    Join Date
    Apr 2008
    Posts
    3,312
    Thanks for taking the time to post this caaok.

    So, for us that want to run rtorrent on our home computers, I'm guessing we can follow this guide, expect for steps 3. and 4.?

  5. Guides and Tutorials   -   #5
    Cabalo's Avatar FileSharingTalker BT Rep: +24BT Rep +24BT Rep +24BT Rep +24BT Rep +24
    Join Date
    Mar 2007
    Location
    European Union
    Age
    47
    Posts
    11,849
    I think you can only skip step #3, as you will need a webserver to display the rutorrent webui.

  6. Guides and Tutorials   -   #6
    ca_aok's Avatar Poster BT Rep: +1
    Join Date
    Feb 2008
    Posts
    1,547
    Quote Originally Posted by Cabalo View Post
    I think you can only skip step #3, as you will need a webserver to display the rutorrent webui.
    That's correct. You need a webserver and php to display rutorrent.

    In that case, you can skip step 3, and for the step where you replace your.server.ip, instead of using the external IP of your seedbox, use either 192.168.x.x (or whatever your LAN IP is) if it's on a different computer, or 127.0.0.1 if you're accessing it from the computer on which you're running rtorrent.
    Quote Originally Posted by whatcdfan View Post
    u are somewhat fairer then the last occasions but still pal i give a damn to what u said and expect i really dont need anything from u or optimuscrime i get what i want coz u 2 guyes dont own bittorrent and i dont think i portrayed any image i wrote simple english and u are seems to be very good at making assumptions if someone is not a cheater and u assume he's a cheater and write what u wrote and when u are proven wrong who u think will owe an apology then barack obama????

  7. Guides and Tutorials   -   #7
    tspoon
    Guest
    I registered just to say how awesome this guide is, I was considering rutorrent/rtorrent but was put off by the apparent complexity, I'll be trying it shortly on my headless box...

    cheers


    edit: ok I've tried it but cannot download all the packages, the message I get is :

    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    libidn11-dev: Depends: libidn11 (= 1.15-2) but 1.18-1 is to be installed
    E: Broken packages

    I'm using Debian Lenny on an ARM (sheeva) setup, I tried the stable and testing repositories, but no luck. Have to go out for a bit, will try further later. Any clues anybody? (I'm new to linux in general)



    edit edit - I removed the existing libidn11 then it worked.... I'll try the rest soon

    continued ... I had trouble checking out xmlrpc using your code here :

    debian:/home/torrent# svn co https://xmlrpc-c.svn.sourceforge.net...lrpc-c/stable/ xmlrpc-c
    svn: OPTIONS of 'https://xmlrpc-c.svn.sourceforge.net...lrpc-c/stable': Could not resolve hostname `xmlrpc-c.svn.sourceforge.net...lrpc-c': Host not found (https://xmlrpc-c.svn.sourceforge.net...lrpc-c)


    so i used the syntax from their webpage :

    REPOS=http://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/advanced
    svn checkout $REPOS xmlrpc-c



    update: I have struck a problem at the point of entering the command :

    a2ensite rutorrent

    the response is : ERROR: Site rutorrent does not exist!

    Although this is probably simple, can anyone point me in the right direction here?
    Last edited by tspoon; 02-25-2010 at 08:08 AM.

  8. Guides and Tutorials   -   #8
    ca_aok's Avatar Poster BT Rep: +1
    Join Date
    Feb 2008
    Posts
    1,547
    Quote Originally Posted by tspoon View Post
    continued ... I had trouble checking out xmlrpc using your code here :

    debian:/home/torrent# svn co https://xmlrpc-c.svn.sourceforge.net...lrpc-c/stable/ xmlrpc-c
    svn: OPTIONS of 'https://xmlrpc-c.svn.sourceforge.net...lrpc-c/stable': Could not resolve hostname `xmlrpc-c.svn.sourceforge.net...lrpc-c': Host not found (https://xmlrpc-c.svn.sourceforge.net...lrpc-c)


    so i used the syntax from their webpage :

    REPOS=http://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/advanced
    svn checkout $REPOS xmlrpc-c
    FST unfortunately shortens their hyperlinks automatically. Basically, the problem is it substituted part of the URL with "...". If you Right Click->Copy Link Location it should work fine.


    update: I have struck a problem at the point of entering the command :

    a2ensite rutorrent

    the response is : ERROR: Site rutorrent does not exist!

    Although this is probably simple, can anyone point me in the right direction here?
    Are you using the 3.0 beta or the stable version of rutorrent? Are you certain there's a directory that exists at /var/www/rutorrent/ ?

    If you'd like to try and attempt to skip this step, you can paste the configuration from the pastebin for /etc/apache2/sites-available/default into /etc/apache2/sites-enabled/000-default instead, and that should work.
    Quote Originally Posted by whatcdfan View Post
    u are somewhat fairer then the last occasions but still pal i give a damn to what u said and expect i really dont need anything from u or optimuscrime i get what i want coz u 2 guyes dont own bittorrent and i dont think i portrayed any image i wrote simple english and u are seems to be very good at making assumptions if someone is not a cheater and u assume he's a cheater and write what u wrote and when u are proven wrong who u think will owe an apology then barack obama????

  9. Guides and Tutorials   -   #9
    Congrats!! Is an amazing job!!

    How I can setup a data downloading (http), and use the protection as to rutorrent?
    How I can get files(downloading) from rutorrent (3.0) this give me "the file can be read"

    If any can me help, I am grateful.

    Thanks again for amazing work!!
    Last edited by hydpt; 03-06-2010 at 01:20 AM. Reason: add text

  10. Guides and Tutorials   -   #10
    ca_aok's Avatar Poster BT Rep: +1
    Join Date
    Feb 2008
    Posts
    1,547
    Anything you stick in /var/www/ can be downloaded via HTTPS (go to https://your.server.ip/filename.ext). If you wanted password protection as well, you could make a new folder such as /var/www/files/ and copy the <Location /rutorrent> code in the pastebin, but replace /rutorrent with /files.

    As for that error, it sounds like a permissions problem. Did you chmod the directories?
    Quote Originally Posted by whatcdfan View Post
    u are somewhat fairer then the last occasions but still pal i give a damn to what u said and expect i really dont need anything from u or optimuscrime i get what i want coz u 2 guyes dont own bittorrent and i dont think i portrayed any image i wrote simple english and u are seems to be very good at making assumptions if someone is not a cheater and u assume he's a cheater and write what u wrote and when u are proven wrong who u think will owe an apology then barack obama????

Page 1 of 7 1234 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •