rTorrent with ruTorrent GUI from GIT on Ubuntu Linux 12.04

Bash script:

sudo apt-get --purge remove libxmlrpc* libtorrent* rtorrent
sudo apt-get install build-essential checkinstall libcurl4-openssl-dev libncurses5-dev libncursesw5-dev libsigc++-2.0-dev libtool git autoconf automake libcppunit-dev subversion

# Check that your g++ is 4.7+ (if so, skip this block)
g++ --version
sudo add-apt-repository ppa:ubuntu-toolchain-r/test 
sudo apt-get update
sudo apt-get install gcc-4.7 g++-4.7 
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7
sudo update-alternatives --config gcc

#fresh xmlrpc-c lib install
svn co https://svn.code.sf.net/p/xmlrpc-c/code/advanced xmlrpc-c
cd xmlrpc-c
./configure --prefix=/usr
make
#change version from "C" to smth else while installing the package
sudo checkinstall -D
cd ..

#libtorrent install
git clone git://github.com/rakshasa/libtorrent.git
cd libtorrent
./autogen.sh
./configure --prefix=/usr --with-posix-fallocate
make
sudo checkinstall -D
cd ..

#rtorrent install
git clone git://github.com/rakshasa/rtorrent.git
cd rtorrent
./autogen.sh
./configure --prefix=/usr --with-xmlrpc-c
make
sudo checkinstall -D

#rutorrent web-GUI
cd /var/www/
sudo svn co http://rutorrent.googlecode.com/svn/trunk/rutorrent
sudo chown -R  www-data:www-data /var/www/
sudo chmod -R  777 /var/www/rutorrent/share

#update rutorrent
cd /var/www/rutorrent
sudo svn up

#autolaunch on startup
sudo apt-get install screen
echo "screen -fa -d -m rtorrent" >> /etc/rc.local

# nginx
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx

Last revised: Nov 22, 2014 (script is originally written for Ubuntu 12.04)

Установка rTorrent+ruTorrent на Ubuntu Server 10.10 Maverick Meerkat

Линки на продукты: rTorrent+ruTorrent на Ubuntu Server 10.10 Maverick Meerkat.

Имеем:

$ uname -a
Linux klisanor-srv 2.6.35-28-server #49-Ubuntu SMP Tue Mar 1 14:55:37 UTC 2011 x86_64 GNU/Linux
#prerequisites
sudo aptitude update && sudo aptitude upgrade && sudo aptitude install apache2 php5 libapache2-mod-php5 libapache2-mod-scgi
sudo echo "LoadModule scgi_module /usr/lib/apache2/modules/mod_scgi.so" >> /etc/apache2/apache2.conf
SCGIMount /RPC2 127.0.0.1:5000 -> /etc/apache2/sites-available/default
sudo echo "scgi_port = localhost:5000" >> ~/.rtorrent.rc

Проблемы:

  1. ruTorrent требует для установки свежую xmlrpc-c
  2. Берём её из SVN, компилим libtorrent+rTorrent с новым xmlrpc-c

  3. Проблема библиотеки ncurses. Русские буквы вместо кириллицы в консоли отображаются непонятными символами-кракозябрами.
                                                       *** rTorrent 0.8.6/0.12.6 -  ***
        [View: main]
          Tracker: [Tried all trackers.]
           BBC_M-P~QM-PM-5M-PM-7M-Q~CM-PM- M-P~^M-Q~EM-PM->M-Q~BM-Q~K M-PM-=M-PM-0 M-P~RM-PM-5M-PM-4M-Q~LM-PM-<
                    done      894,7 MB Rate:   0,0 /   0,0 KB Uploaded:  3150,0 MB                 [   R: 3,52 high]
          Tracker: [Tried all trackers.]
           Davidenko_Egypt_xvid.avi
                    done     1264,9 MB Rate:   7,3 /   0,0 KB Uploaded:  5647,2 MB                 [   R: 4,46]  Tracker: [Tried all
        [Throttle off/off KB] [Rate  25,3/591,1 KB] [Port: 6944]                     [U 6/0] [D 36/0] [H 0/32] [S 1/48/768] [F 67/128]
    

    Вместо libncurses5-dev нужно ставить libncursesw5-dev. Правда, по дефолту rtorrent потом не собирается, поскольку заголовочные файлы лежат в нестандартной папке.

Полный guide по установке:

#remove old packages
sudo apt-get remove rtorrent libtorrent11 libxmlrpc-c3 libxmlrpc-c3-dev libxmlrpc-core-c3 libxmlrpc-core-c3-dev

#dev packages
sudo apt-get install checkinstall subversion build-essential make autoconf autotools-dev automake libtool libcurl4-openssl-dev libsigc++-2.0-dev pkg-config libncursesw5-dev

#fresh xmlrpc-c lib install
svn co https://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/advanced xmlrpc-c
cd xmlrpc-c
./configure --prefix=/usr
make
sudo checkinstall -D

#libtorrent install
cd ..
# svn co svn://rakshasa.no/libtorrent/trunk
# cd trunk
# cd libtorrent
wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.12.6.tar.gz
tar zxfv libtorrent-0.12.6.tar.gz
cd libtorrent-0.12.6
./autogen.sh
./configure --prefix=/usr
make
sudo checkinstall -D

#rtorrent install
cd ..
wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.6.tar.gz
tar zxfv rtorrent-0.8.6.tar.gz
cd rtorrent-0.8.6
./autogen.sh
CPPFLAGS="-I/usr/include/ncursesw/" ./configure --with-xmlrpc-c --prefix=/usr
make
sudo checkinstall -D

#rutorrent web-GUI
cd /var/www/
sudo svn co http://rutorrent.googlecode.com/svn/trunk/rutorrent
sudo chown -R  www-data:www-data /var/www/
sudo chmod -R  777 /var/www/rutorrent/share

#update rutorrent
cd /var/www/rutorrent
svn up

thnx to: isudo, zg

rTorrent autostart

sudo -s
wget http://libtorrent.rakshasa.no/raw-attachment/wiki/RTorrentCommonTasks/rtorrentInit.sh
mv rtorrentInit.sh /etc/init.d/
vim /etc/init.d/rtorrentInit.sh
#change line 34 user="user" to match your setup

sudo chmod +x /etc/init.d/rtorrentInit.sh
cd /etc/init.d/
sudo update-rc.d rtorrentInit.sh defaults

#now you can start it as a service by using
/etc/init.d/rtorrentInit.sh start

rtorrentInit.sh mirror

via rakshasa.no, unixguru.se, lostnihilist