Page 1 of 3 123 LastLast
Results 1 to 15 of 33
  1. #1
    Join Date
    Nov 2011
    Location
    United States
    Posts
    97

    Arrow How to Install rTorrent/ruTorrent on Debian/Ubuntu VPS

    This tutorial will guide you through the setup of a fully-featured seedbox running on a Debian or Ubuntu system, including:
    • libtorrent 0.13.0
    • rTorrent 0.9
    • ruTorrent Web UI (3.0)

    This guide has been tested with Debian 6 (x86_64) and Ubuntu 11.04 (x86_64).

    To start, access your VPS via SSH (as the root user) and do the following to update your platform and install some required dependencies:
    # apt-get update
    # apt-get install subversion build-essential automake libtool libcppunit-dev libcurl3-dev libsigc++-2.0-dev unzip unrar-free curl libncurses-dev
    # apt-get install apache2 php5 php5-cli php5-curl

    Enable scgi for Apache:
    # apt-get install libapache2-mod-scgi
    # ln -s /etc/apache2/mods-available/scgi.load /etc/apache2/mods-enabled/scgi.load

    Install XMLRPC:
    # mkdir /install;cd /install
    # svn checkout http://xmlrpc-c.svn.sourceforge.net/...mlrpc-c/stable xmlrpc-c
    # cd xmlrpc-c
    # ./configure --disable-cplusplus
    # make
    # make install

    Intall libtorrent:
    # cd /install
    # wget http://vps6.net/src/libtorrent-0.13.0.tar.gz
    # tar xvf libtorrent-0.13.0.tar.gz
    # cd libtorrent-0.13.0
    # ./autogen.sh
    # ./configure
    # make
    # make install

    Install rTorrent:
    # cd /install
    # wget http://vps6.net/src/rtorrent-0.9.0.tar.gz
    # cd rtorrent-0.9.0
    # ./autogen.sh
    # ./configure --with-xmlrpc-c
    # make
    # make install
    # ldconfig

    Create required directories:
    # mkdir /home/seeder1/rtorrent
    # mkdir /home/seeder1/rtorrent/.session
    # mkdir /home/seeder1/rtorrent/watch
    # mkdir /home/seeder1/rtorrent/download

    Setup .rtorrent.rc file (rTorrent config):
    # cd ~/
    # wget http://vps6.net/src/.rtorrent.rc
    # cp .rtorrent.rc /home/seeder1/

    (Edit the settings in .rtorrent.rc, like max upload/download speed, max connected peers, etc, as needed.)

    Install rTorrent:
    # cd /install
    # wget http://vps6.net/src/rutorrent-3.0.tar.gz
    # tar xvf rutorrent-3.0.tar.gz
    # mv rutorrent /var/www
    # wget http://vps6.net/src/plugins-3.0.tar.gz
    # tar xvf plugins-3.0.tar.gz
    # mv plugins /var/www/rutorrent
    # rm -rf /var/www/rutorrent/plugins/darkpal
    # chown -R www-data:www-data /var/www/rutorrent

    Secure /rutorrent:
    # a2enmod ssl
    # a2enmod auth_digest
    # a2enmod scgi
    # openssl req $@ -new -x509 -days 365 -nodes -out /etc/apache2/apache.pem -keyout /etc/apache2/apache.pem
    # chmod 600 /etc/apache2/apache.pem
    # htdigest -c /etc/apache2/passwords seedbox seeder1

    (Enter a password of your choice when prompted, you will use this to log in to the ruTorrent web UI.)

    # cd /etc/apache2/sites-available/
    # rm -rf default
    # wget http://vps6.net/src/default
    # a2ensite default-ssl
    # /etc/init.d/apache2 reload

    Install screen:
    # apt-get install screen

    Start rTorrent in a detached shell using screen:
    # screen -fa -d -m rtorrent

    (To start rtorrent automatically when the VPS is booted, add the above command to /etc/rc.local)

    You can now access ruTorrent at http://xx.xx.xx.xx/rutorrent/ (replace xx.xx with your server's IP address). You should be greeted with a login prompt, where the username is "seeder1" and the password is the one you set above in the "secure /rutorrent" section.

  2. #2
    Join Date
    May 2007
    Posts
    1,901

  3. #3
    Nice tutorial, Thanks

  4. #4
    Join Date
    Feb 2011
    Location
    Super Sunny SoCal USA
    Posts
    42
    An excellent cookbook. That's the way I like my tutorials - I only have to read what I'm actually going to do and dispense with any lengthy explanations, since I can tweak what I want to along the way.
    Bradley D. Thornton - http://NorthTech.US - Registered Linux User #190795

    - "Ask Bill why the string in [MS-DOS] function 9 is terminated by a dollar sign. Ask him, because he can't answer. Only I know that." - Dr. Gary Kildall.

  5. #5
    Join Date
    Aug 2009
    Location
    Canada
    Posts
    362
    For those looking for a more simple install for occasional torrent downloading or seeding, I'd look into "transmission-daemon". It provides a web interface and you only need to install 1 package.
    613websites.comCanadian Hosting and Web Design
    Reliable, fast, customized, and secure hosting!
    99.9% Uptime Guarantee | 24/7 Support | Money Back Guarantee
    Visit www.613websites.com or call 1-800-636-1484

  6. #6
    thank you so much for this tutorial, it works like a charm.

    you just need to add a line after downloading rtorrent command to untar the file: ( tar xvf torrent-0.9.0.tar.gz )

    Now here is the situation i faced which i hope someone would be kind enough to help me with:

    my debian server was working fine with virtualmin installed and a few apache virtual servers pointing to /home. and squid for personal use.

    after i used this fine tutorial i got my self a good bittorrent client running at the full speed of my connection, BUT.

    while my apache points fine to /var/www it cant load any website on the /home directory. after spending a few nights with my friend google i discovered that apache points to /var/www by default not to /home, and you need a custom compiled version in order to run /home virtual servers.

    what i need now is a method to solve this issue so i can run both rutorrent and my hosted website. eather by executing some commands or do a new fresh virtualmin installation and use this tutorial again to install rutorrent but without the commands that made the problem in the first place.

    thanks in advance

  7. #7
    Join Date
    Nov 2011
    Location
    United States
    Posts
    97
    Quote Originally Posted by R00T View Post
    thank you so much for this tutorial, it works like a charm.

    you just need to add a line after downloading rtorrent command to untar the file: ( tar xvf torrent-0.9.0.tar.gz )

    Now here is the situation i faced which i hope someone would be kind enough to help me with:

    my debian server was working fine with virtualmin installed and a few apache virtual servers pointing to /home. and squid for personal use.

    after i used this fine tutorial i got my self a good bittorrent client running at the full speed of my connection, BUT.

    while my apache points fine to /var/www it cant load any website on the /home directory. after spending a few nights with my friend google i discovered that apache points to /var/www by default not to /home, and you need a custom compiled version in order to run /home virtual servers.

    what i need now is a method to solve this issue so i can run both rutorrent and my hosted website. eather by executing some commands or do a new fresh virtualmin installation and use this tutorial again to install rutorrent but without the commands that made the problem in the first place.

    thanks in advance
    Just check the VirtualHosts section of your httpd.conf file, you'll be able to set the DocumentRoot parameters however you want.

    To find httpd.conf you can run:

    find / -name httpd.conf

  8. #8
    Join Date
    Feb 2011
    Location
    Super Sunny SoCal USA
    Posts
    42

    * No No No! Don't recompile Apache unnecesarily !!!

    Quote Originally Posted by R00T View Post

    while my apache points fine to /var/www it cant load any website on the /home directory. after spending a few nights with my friend google i discovered that apache points to /var/www by default not to /home, and you need a custom compiled version in order to run /home virtual servers.

    what i need now is a method to solve this issue...
    thanks in advance
    These instructions were given for Debian. Each distro is different. In debian, you prolly want to use the "Alias" directive, to keep in line with the way it is typically done on that distro.

    Code:
    Alias /btpiraten/ /home/joe/www/btpiraten/
    If your server is http://joe.sld.tld, then the alias above (Placed in the original VirtualHost container), will render the pages you want with:

    Code:
    http://joe.sld.tld/btpiraten/
    Unnecessarily recompiling Apache won't add anything you need, that you don't already have.

    If you want a completely different host to answer (requires an entry in /etc/hosts on the client or in DNS or NIS), then, something like the following will work for you:

    Code:
    #
    # Use name-based virtual hosting.
    #
    NameVirtualHost *:80
    
    #
    # VirtualHost example:
    # Almost any Apache directive may go into a VirtualHost container.
    # The first VirtualHost section is used for all requests that do not
    # match a ServerName or ServerAlias in any <VirtualHost> block.
    #
    <VirtualHost *:80>
        ServerAdmin joe@joe.sld.tld
        DocumentRoot "var/www"
        ServerName joe.sld.tld
        ServerAlias www.sld.tld
        ErrorLog "/var/log/httpd/joe.sld.tld-error_log"
        CustomLog "/var/log/httpd/joe.sld.tld-access_log" common
    </VirtualHost>
    
    <VirtualHost *:80>
        ServerAdmin joe@sld.tld
        DocumentRoot "/home/joe/btpiraten"
        ServerName btpiraten.sld.tld
        ErrorLog "/var/log/httpd/btpiraten.sld.tld-error_log"
        CustomLog "/var/log/httpd/btpiraten.sld.tld-access_log" common
    </VirtualHost>
    And now you would type:

    Code:
    http://www.sld.tld
    or

    Code:
    http://joe.sld.tld
    To reach the regular/old/default site you originally had, and:

    Code:
    http://btpiraten.sld.tld
    To reach the new rTorrent site you installed under your home directory (or anywhere else you decide to put it.

    I hope that helps

    Kindest regards,

    .
    Bradley D. Thornton - http://NorthTech.US - Registered Linux User #190795

    - "Ask Bill why the string in [MS-DOS] function 9 is terminated by a dollar sign. Ask him, because he can't answer. Only I know that." - Dr. Gary Kildall.

  9. #9
    thank you so much for the quick replies.

    i believe the problem is not with apache it self. it is really with Suexec, here is what virtualmin says:

    Code:
    The Suexec command on your system is configured to only run scripts under /var/www, but the
    Virtualmin virtual server home directory is /home. CGI and PHP scripts run as domain owners will
    not be executed.
    what i understand that When using the Virtualmin the home directories of each domain are under /home/. This differs from the Apache convention of /var/www/ and causes issues with suexec refusing to execute CGI programs due to permissions problems.

    so If you are using Virtualmin (or more accurately, not using /var/www/ as the root for your virtual domains) you will need to build a custom version of apache's suexec to adjust those built-in settings. because the suexec program has settings built in when it is compiled to prevent it being reconfigured to avoid the security restrictions it is designed to enforce.

    here is the output of suexec:

    Code:
    # /usr/lib/apache2/suexec -V 
     -D AP_DOC_ROOT="/var/www"
     -D AP_GID_MIN=100
     -D AP_HTTPD_USER="www-data"
     -D AP_LOG_EXEC="/var/log/apache2/suexec.log"
     -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
     -D AP_UID_MIN=100
     -D AP_USERDIR_SUFFIX="public_html"
    if we can install rtorrent/rutorrent without altering apache and/or its mods, then we can run rutorrent using /var/www and still able to run virtual hosts on the /home directory using virtualmin.

    after all if you have to edit config files every time you add a new domain then what is the use of a control panel.

  10. #10
    Join Date
    Feb 2011
    Location
    Super Sunny SoCal USA
    Posts
    42

    *

    Quote Originally Posted by R00T View Post
    after all if you have to edit config files every time you add a new domain then what is the use of a control panel.
    An interesting perspective. I'm not a fan of the ubuntu kool-aid, however. It seems to leave a bitter, almond-like taste in my mouth.

    I might be inclined to put it this way: "If all you have to do is edit a couple of config files, what use is a control panel that merely breaks things when you use it?"

    If all you're concerned with is the cgi-bin dir, then perhaps a ScriptAlias directive pointing to a directory where you don't need to fiddle with the user's ~/ permissions would suffice?

    With the Script-Alias directive you can point the cgi-bin directory (which is virtual anyway) to any place OUTSIDE the DocumentRoot of the particular VirtualHost in question - as it should be....

    I remember taking a college course on Perl, and the catalog said one thing but the professor wanted to make it a CGI/Web class, which sucked, coz it wasn't what the catalog said.

    The school IT folks (nevermind that they were using a glorified iPAD for NAS) used the stock userdir conf file to build the user accounts for the students, which iincluded a cgi-bin directory INSIDE each user's DocumentRoot.

    The admins didn't understand why this was so objectionable until it was demonstrated to them that anyone arbitrarily view and execute anyone's CGI programs by default.

    This wasn't a problem for a community college course, except that anyone could simply copy the homework assignments of some other student in the class into their own cgi-bin, make a couple of crafty changes, and get credit for having completed the assignment - considering that the directory tree was a known factor shared by all students in the class.

    My recommendations are such:

    1.) Don't use a GUI tool to do what is simpler to do by simply editing a config file that the GUI might not even be able to do.

    or

    2.) Live within the constraints of the GUI admin tool itself and don't edit ANY files by hand if you're going to use that GUI - you might (will probably) break things.

    Just my two cents

    Kindest regards,

    .
    Bradley D. Thornton - http://NorthTech.US - Registered Linux User #190795

    - "Ask Bill why the string in [MS-DOS] function 9 is terminated by a dollar sign. Ask him, because he can't answer. Only I know that." - Dr. Gary Kildall.

  11. #11
    Quote Originally Posted by tallship View Post
    I might be inclined to put it this way: "If all you have to do is edit a couple of config files, what use is a control panel that merely breaks things when you use it?".
    I have to respect that. the command line is the way to go when it comes to linux.

    the point is that when i was first introduced to linux (more than 14 years ago) i was so exited about it, loved the idea of the open source OS and had redhat installed on a low end old machine of mine with all essential servers up and running.

    start to read and learn about the command line, and the more i learn the more i liked it, actually after sometime i would say that i fall in love with this amazing OS.

    not long after that i started to study for my master degree i could not keep up. and found my self stuck with windows again maybe because linux GUI (Gnome and KDE) wasn't mature enough at that time, or the idea that i had about the linux learning curve, i am not sure.

    after all these years i started to think about it again, got my self a dedi-server with Debian 6 and began to play with it, the more i screwed up the more i learn, since the server is for personal use only.

    decided to install some sort of control panel to get things starting and take it slow with the command line, learning as i go.

    now back to the main subject. I reinstalled debian and virtualmin and everything in this tutorial except apachi and php (which were already installed by VM) and the libapache2-mod-scgi (since there is an rutorrent plug in to replace it). well things seems to work fine for now, got some issues when i reboot i think it has something to do with the rtorrentInit.sh (the script i use to autostart the service since the method mentioned here didn't work for me) removed it and started it manually thing are back on track for now.

    i am so glad that i had the chance of this conversation and maybe just maybe, when i am sure everything is fine with my setup i will come back to add to this fine tutorial for the lazy new comers who use virtualmin like my self.

  12. #12
    ohh, one last thing i forget to mention i didn't issue the command that links /mods-available to /mods-enabled.

  13. #13
    Join Date
    Sep 2010
    Location
    Novi Travnik
    Posts
    10

    Thumbs up tnx

    this tut saved me few days ago...

    my upload sux, and this thing works from shell.

  14. #14
    Nice Tutorial

    Thank you !

  15. #15
    Thanks very much mate

Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 05-11-2011, 10:18 PM
  2. rTorrent + ruTorrent seedbox setup on Linux
    By snielsen in forum Systems Management Requests
    Replies: 7
    Last Post: 01-28-2011, 05:14 AM
  3. 4€ Per Month Bittorrent Seedbox - rTorrent + ruTorrent
    By NuCode in forum Other Hosting Offers
    Replies: 0
    Last Post: 01-11-2011, 09:43 PM
  4. rTorrent + ruTorrent high quality seedboxes, 100Mbps unmetered!
    By NuCode in forum Other Hosting Offers
    Replies: 0
    Last Post: 10-01-2010, 04:11 PM
  5. Gigenet reseller that install debian/ubuntu?
    By J-B[away] in forum Dedicated Server
    Replies: 18
    Last Post: 02-01-2007, 10:55 AM

Posting Permissions

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