Markus Blog What's going on Internet?

29Nov/0921

Installing libTorrent and rTorrent on Linux Centos


As requested by one of my blog reader, I write this libTorrent and rTorrent installation tutorial :) I’m installing libTorrent and rTorrent on a Xen based VPS with Linux Centos 5.4

From the project’s website:

LibTorrent is a BitTorrent library written in C++ for *nix, with a focus on high performance and good code. The library differentiates itself from other implementations by transfering directly from file pages to the network stack. On high-bandwidth connections it is able to seed at 3 times the speed of the official client.

To install libTorrent and rTorrent first we install the compiler and dependencies required

yum install gcc gcc-c++ m4 make automake libtool pkgconfig perl openssl-devel ncurses-devel

Download curl, libsigc++, libtorrent and rtorrent

wget http://curl.haxx.se/download/curl-7.19.7.tar.gz
wget http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.2/libsigc++-2.2.4.tar.gz
wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.12.5.tar.gz
wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.5.tar.gz

Extract curl, libsigc++, libtorrent and rtorrent

tar -xvzf curl-7.19.7.tar.gz
tar -xvzf libsigc++-2.2.4.tar.gz
tar -xvzf libtorrent-0.12.5.tar.gz
tar -xvzf rtorrent-0.8.5.tar.gz

Compile curl

cd curl-7.19.7
./configure
make
make install

Compile libsigc++

cd libsigc++-2.2.4
./configure
make
make install

Compile libtorrent

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
cd libtorrent-0.12.5
rm -f scripts/{libtool,lt*}.m4
./autogen.sh
./configure
make
make install

Compile rtorrent

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

Download rtorrent sample configuration and rename it

wget http://libtorrent.rakshasa.no/export/1105/trunk/rtorrent/doc/rtorrent.rc
mv rtorrent.rc .rtorrent.rc

You have to modify the content of .rtorrent.rc file to configure the settings of rTorrent as you needed and place the file into your user directory.

To download from torrent we need the .torrent file, for example to download Centos 5.4 DVD installation I run the command:

rtorrent http://ftp.nluug.nl/ftp/pub/os/Linux/distr/CentOS/5.4/isos/i386/CentOS-5.4-i386-bin-DVD.torrent
The screenshot of rTorrent downloading file

The screenshot of rTorrent downloading file

Bookmark and Share

Related Article

Comments (21) Trackbacks (2)
  1. Nice one. They really need to fix whatever is culpable of the Time Out problem w/ rtorrent off of rpmforge. The sad part is this is the second time in a year I’ve had to troubleshoot problems w/ rtorrent from rpmforge but your quick checklist was accurate on a copy paste level and painless. Thanks again.

    • EDIT: it’s libcurl that is responsible and not the rtorrent package or rpmforge. Also, your url has helped another person out from the #rtorrent channel on freenode and someone said they were adding your guide to the wiki. Thanks again.

  2. Hi Mike,

    I’m happy to be able to help the community :)

  3. Hi Markus, quick question do the downloaded source and installs of libsigc++ and curl-7.19.7 break CentOS dependencies (i know CentOS has a old version of curl that causes tracker connection errors).

    Please excuse my lack of knowledge i am new to dealing with dependencies, how can we make sure the rtorrent only uses our custom curl-7.19.7 and not the system ones (older version 7.15.2)?

    Many thanks.

  4. Superb, many thanks. Have replied on your other thread. Cheers, Chris

  5. THANK YOU THANK YOU THANK YOU THANK YOU!!!

    I was banging my head all day trying to get rtorrent to work on my centos box, and this finally did the trick! Damn Centos and it’s always “just too out of date to work” packages :P

  6. No package ‘openssl’ found

    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.

    Alternatively, you may set the environment variables OPENSSL_CFLAGS
    and OPENSSL_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.

    I have installed
    openSSL

    # wget http://www.openssl.org/source/openssl-0.9.8g.tar.gz
    # tar -zxvf openssl-0.9.8g.tar.gz
    # cd openssl-0.9.8g
    # ./Configure gcc
    # make
    # make install

    But still no luck

    • try run:

      yum install openssl-devel

      • Hi, Great post,

        I dont have admin rights so i cant use yum. Do you think you could guide me on how to install openssl devel from source? I have the same problem and installed openssl the same way he did. I would really appreciate it :)

  7. Hi

    Ive been through all the steps and installed fine

    everytime i type in rtorrent it says

    -bash: rtorrent: command not found

    is there any way you could drop me a email

    • did you compile rtorrent as root?

      rtorrent should be installed on: /usr/local/bin/rtorrent if it’s not there then try re-compiling rtorrent again:

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

  8. Thanks.. I got stuck up on the PKG_CONFIG_PATH step.. Got away with that with the help of your post :)

  9. Hello, can i ask help how to install webUI too for rTorrent client. The installation setting to connection with rTorrent syntax command. Thanks in advance.

  10. Hey, I’m having a little trouble getting this to work. Maybe I’m doing something wrong in the configuration, but here’s what I get WHEN:

    a) I use the command ./configure in the dir libtorrent-0.12.5 after using ./autogen.sh and receiving no errors:

    ./configure: line 2027: syntax error near unexpected token `build_old_libs,’
    ./configure: line 2027: ` _LT_DECL(build_old_libs, enable_static, 0,’

    (From here I tried out ‘make’)

    make: *** No targets specified and no makefile found. Stop.

    (I found Makefile.am and Makefile.in inside the directory, so I’m not sure why the command isn’t finding it.)

    b) I used the command ./configure in the dir rtorrent-0.8.5 after using ./autogen.sh without recieving any errors. The following is the last two lines of what looks like healthy results.

    ./configure: line 18658: syntax error near unexpected token `TORRENT_ENABLE_DEBUG’
    ./configure: line 18658 `TORRENT_ENABLE_DEBUG()’

    (I also get the same ‘makefile not found’ error as with libtorrent even though the Makefiles are there. What am I doing wrong, and what can I do to fix this problem?)

    • it seems that the ./configure is failed. a search on google said that is something to do with libtool, so try install or update libtool on your server.

  11. on a freshly installed CentOS 6, this is what i do to get libtorrent and rtorrent compiled:

    # yum install gcc vsftpd pkgconfig openssl-devel libsigc++20-devel make gcc-c++ ncurses-devel libcurl-devel libtool xmlrpc-c-devel cppunit-devel pcre-devel bzip2-devel httpd-devel php-devel php-pdo

    # export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

    then in libtorrent directory, ./autogen.sh, ./configure, make, make install
    in rtorrent directory, ./autogen.sh, ./configure –with-xmlrpc-c, make, make install

    xmlrpc because i’m using rutorrent.

    hope this helps the others.


Leave a comment

(required)


*