提要
安装及中文乱码退治
rutorrent安装配置
配置文件样本 .rtorrent.rc
rTorrent中手工添加peer的方法
Need ipv6?
http://libtorrent.rakshasa.no/ticket/1111
rtorrent man page:
http://libtorrent.rakshasa.no/rtorrent/rtorrent.1.html
 

 

************************************

install libtorrent xmlrpc-c rtorrent
************************************
Quote:
sudo apt-get update
Quote:
sudo apt-get install -y build-essential pkg-config libcurl4-openssl-dev libsigc++-2.0-dev [color=#C0C0C0]libncurses5-dev[/color] [color=#FF0000]libncursesw5-dev[/color] nano screen subversion libterm-readline-gnu-perl php5-cgi apache2-utils php5-cli curl checkinstall
*红色那个是解决console下面乱码的关键所在
 dpkg-reconfigure locales
选上en_US.UTF-8 ,ja-JP.UTF-8, zh_CN.UTF-8
控制台下乱码可能还需要安装zhcon (未验证
Quote:
mkdir -p /var/local/src
su
Quote:
cd /var/local/src
wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.12.6.tar.gz
tar zxfv libtorrent-0.12.6.tar.gz
rm libtorrent-0.12.6.tar.gz
cd libtorrent-0.12.6
#wget http://sora.kasugano.us/uploads/libtorrent-0.12.6-ipv6-08.patch
#patch -p1 < libtorrent-0.12.6-ipv6-08.patch
#./configure --enable-ipv6
./configure
make -s
#checkinstall  -y --pkgrelease 6
checkinstall  -y --pkgrelease 4
Quote:
cd /var/local/src
svn co http://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/stable xmlrpc-c
cd xmlrpc-c/
./configure
make -s
checkinstall -y
Quote:
cd /var/local/src
wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.6.tar.gz
tar zxfv rtorrent-0.8.6.tar.gz
rm rtorrent-0.8.6.tar.gz
cd rtorrent-0.8.6
#wget http://sora.kasugano.us/uploads/rtorrent-0.8.6-ipv6-07.patch
#patch -p1 < rtorrent-0.8.6-ipv6-07.patch
#./configure --enable-ipv6 --with-xmlrpc-c
./configure --with-xmlrpc-c
make -s
#checkinstall  -y --pkgrelease 6
checkinstall  -y --pkgrelease 4
Quote:
cd /var/local/src
wget http://downloads.sourceforge.net/mktorrent/mktorrent-1.0.tar.gz
tar -xzvf mktorrent-1.0.tar.gz
rm mktorrent-1.0.tar.gz
cd mktorrent-1.0
make -s USE_LARGE_FILES=1
checkinstall -y --pkgrelease 6
ldconfig
************************************
install rutorrent
************************************
Quote:check out from svn
cd /var/www/
svn co http://rutorrent.googlecode.com/svn/trunk/rutorrent
cd /var/www/rutorrent/plugins
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/trafic
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/cookies
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/create
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/datadir
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/edit
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/erasedata
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/geoip
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/_getdir
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/ratio
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/rpc
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/rss
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/scheduler
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/seedingtime
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/theme
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/throttle
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/tracklabels
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/diskspace
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/cpuload
svn co http://rutorrent.googlecode.com/svn/trunk/plugins/data
wget http://haru.kasugano.us/uploads/hostname31.tar.bz2
tar xjvf hostname31.tar.bz2
rm hostname31.tar.bz2
Quote:update
cd /var/www/rutorrent
svn up
cd /var/www/rutorrent/plugins
svn up *
Quote:check out a specific version
cd /var/www/rutorrent
svn up -r 870
chown www-data:www-data /var/www/rutorrent -R
chmod 777 /var/www/rutorrent/share -R
vim /var/www/rutorrent/conf/config.php
 $scgi_port = 5000;
 $scgi_host = "127.0.0.1";
// $XMLRPCMountPoint = "/RPC2";
vim /var/www/rutorrent/plugins/create/conf.php
 $useExternal = 'mktorrent';
 $pathToCreatetorrent = '/usr/local/bin/mktorrent'; 
************************************
config apache or lighttpd
************************************
debian apache conf
apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json
apt-get install libapache2-mod-php5
/etc/init.d/apache2 restart
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip GeoLiteCity.dat.gz
mkdir -v /usr/share/GeoIP
mv -v GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat
apt-get install php5-geoip
vim /var/www/rutorrent/conf/config.php
Change
 $scgi_port = 4998;
 //XMLRPCMountPoint = "/RPC2";
Secury rutorrent directory
mkdir -p /etc/private
htpasswd -c /etc/private/.htpasswd username
vim /etc/apache2/httpd.conf
Add:

 

<Location /files>
AuthName "Private"
AuthType Basic
AuthBasicProvider file
AuthUserFile /etc/private/.htpasswd
Require valid-user
</Location>

Others ref:http://forums.rutorrent.org/index.php?topic=19.0
************************************
.rtorrent.rc
************************************
Title
# rTorrent configuration file
#
# While editing: please remember there are other people on your server!
directory = /root/private/data
session = /root/private/rtorrent/work
schedule = watch_directory, 5, 60, load_start=/root/private/rtorrent/watch/*.torrent
schedule = untied_directory, 5, 60, stop_untied=
schedule = low_diskspace, 5, 120, close_low_diskspace=100M
peer_exchange = yes
tracker_numwant = -1
use_udp_trackers = yes
max_file_size = -1
split_file_size = -1
port_range = 60000-60001
port_random = no
encryption = require
encoding_list=en_US.UTF-8
# Increasing these values does not normally increase speed but can negatively impact the server -- please be careful
min_peers = 2
max_peers = 30
min_peers_seed = 2
max_peers_seed = 60
# Hash checking is not meant to be done as fast as possible as this consumes a
# large portion of the CPU and disk IO -- you're on a shared server.
#  check_hash
#   Yes - hash check after torrent has downloaded to verify contents of disk.
#   No  - avoid the hard disk hash check after competition.
#   Note: hash checking is done in RAM as data is received, rtorrent will
#         ignore this value if it feels it's necessary (e.g. meta-data wiped).
#         This value could be seen as a bit silly because rtorrent will happily
#         send bad data before the torrent is complete but you are more likely
#         to have much worse problems if this check failed (e.g. server death).
#   Author's note: there is little documentation on what this exactly does and
#                  has been pieced together through reading and experience.
check_hash = no
hash_interval = 100
hash_max_tries = 2
scgi_port = localhost:4998
#scgi_local = /tmp/rpc.socket
#schedule = chmod,0,0,"execute=chmod,777,/tmp/rpc.socket"
execute = {sh,-c,/usr/bin/php /var/www/rutorrent/php/initplugins.php tom &}
 

mkdir -p /root/private/rtorrent/work

mkdir -p /root/private/rtorrent/watch
mkdir -p /root/private/data
************************************
manually add peer ip/port to running torrent 
************************************
manually do ctrl-X d.add_peer=host[:port] (port is 6881 if not specified)
 posted on 2011-05-04 09:47  月の祭司  阅读(631)  评论(0)    收藏  举报