编译支持ipv6的rtorrent并配置webUI

参考自北交大Ditto老师的文章
安装必要的依赖文件,如果你Ubuntu的build-essential那么安装下

[bash]sudo apt-get install build-essential[/bash]

然后

[bash]sudo apt-get install libsigc++-2.0-dev libcurl4-openssl-dev libncurses5-dev[/bash]

解决控制台终端乱码。
安装前安装下ncursesw这样config是时候就不会连接到ncurses,如果安装后编译出来使用还是乱码(配置文件里面加了UTF-8还是乱码),请检查生成的Makefile里面是不是-lncursesw 如果不是 试试 with-ncursesw开关 或者手动修改

[bash]sudo apt-get install libncursesw5-dev[/bash]

若通过autogen安装,需要安装必要的文件.我没有

[bash]sudo apt-get install automake libtool[/bash]

Ubuntu下面没有libtoolize这个软件包


下载xmlrpc-c stable 1.16 (Revision 1964)

[bash]svn co https://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/release_number/01.16.07/ xmlrpc-c
cd xmlrpc-c/
./configure
make
make install[/bash]

从这里明确并获取最新的补丁

http://libtorrent.rakshasa.no/ticket/1111

编译安装libtorrent并打上ipV6补丁

[bash]
wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.12.6.tar.gz
tar zxvf libtorrent-0.12.6.tar.gz
cd libtorrent-0.12.6
#http://home.samfundet.no/~sesse/libtorrent-0.12.6-ipv6-06.patch (此patch的webUI有问题)
wget http://home.samfundet.no/~sesse/libtorrent-0.12.6-ipv6-07.patch
patch -p1 < libtorrent-0.12.6-ipv6-07.patch
./configure --enable-ipv6
make
make install[/bash]

编译安装rtorrent并打上ipV6补丁

[bash]wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.6.tar.gz
tar zxvf rtorrent-0.8.6.tar.gz
cd rtorrent-0.8.6
# http://home.samfundet.no/~sesse/rtorrent-0.8.6-ipv6-06.patch (此patch的webUI有问题)
wget http://home.samfundet.no/~sesse/rtorrent-0.8.6-ipv6-07.patch
patch -p1 < rtorrent-0.8.6-ipv6-07.patch
./configure --enable-ipv6 --with-xmlrpc-c
make
make install[/bash]

载入配置

[bash]ldconfig[/bash]


这是我编译的套件deb包
[download id="18" format="2"]


编辑配置文件

[bash] cp /root/rtorrent-0.8.6/doc/rtorrent.rc ~/.rtorrent.rc
nano ~/.rtorrent.rc[/bash]

这是我的配置文件

[bash]# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.

# Maximum and minimum number of peers to connect to per torrent.
#min_peers = 40
#max_peers = 100

# Same as above but for seeding completed torrents (-1 = same as downloading)
#min_peers_seed = 10
#max_peers_seed = 50

# Maximum number of simultanious uploads per torrent.
#max_uploads = 15

# Global upload and download rate in KiB. "0" for unlimited.
#download_rate = 0
#upload_rate = 0

# Default directory to save the downloaded torrents.
#定义下载保存目录
directory = /home/autotorrent/files

# Default session directory. Make sure you don't run multiple instance
# of rtorrent using the same session directory. Perhaps using a
# relative path?
#定义会话session保存的目录
session = /home/autotorrent/sessions

# Watch a directory for new torrents, and stop those that have been
# deleted.
#监视目录,若torrent增加,则自动开始下载
schedule = watch_directory,5,5,load_start=/home/autotorrent/torrents/*.torrent
schedule = untied_directory,5,5,stop_untied=/home/autotorrent/torrents/*.torrent

# Close torrents when diskspace is low.
#当磁盘空间不足时候关闭种子下载
schedule = low_diskspace,5,60,close_low_diskspace=100M

# Stop torrents when reaching upload ratio in percent,
# when also reaching total upload in bytes, or when
# reaching final upload ratio in percent.
# example: stop at ratio 2.0 with at least 200 MB uploaded, or else ratio 20.0
#schedule = ratio,60,60,"stop_on_ratio=200,200M,2000"

# The ip address reported to the tracker.
#ip = 127.0.0.1
#ip = rakshasa.no

# The ip address the listening socket and outgoing connections is
# bound to.
#bind = 127.0.0.1
#bind = rakshasa.no

# Port range to use for listening.
#port_range = 6890-6999

# Start opening ports at a random position within the port range.
#port_random = no

# Check hash for finished torrents. Might be usefull until the bug is
# fixed that causes lack of diskspace not to be properly reported.
#check_hash = no

# Set whetever the client should try to connect to UDP trackers.
#use_udp_trackers = yes

# Alternative calls to bind and ip that should handle dynamic ip's.
#schedule = ip_tick,0,1800,ip=rakshasa
#schedule = bind_tick,0,1800,bind=rakshasa

# Encryption options, set to none (default) or any combination of the following:
# allow_incoming, try_outgoing, require, require_RC4, enable_retry, prefer_plaintext
#
# The example value allows incoming encrypted connections, starts unencrypted
# outgoing connections but retries with encryption if they fail, preferring
# plaintext to RC4 encryption after the encrypted handshake
#
# encryption = allow_incoming,enable_retry,prefer_plaintext

# Enable DHT support for trackerless torrents or when all trackers are down.
# May be set to "disable" (completely disable DHT), "off" (do not start DHT),
# "auto" (start and stop DHT as needed), or "on" (start DHT immediately).
# The default is "off". For DHT to work, a session directory must be defined.
#
# dht = auto

# UDP port to use for DHT.
#
# dht_port = 6881

# Enable peer exchange (for torrents not marked private)
#
# peer_exchange = yes

#
# Do not modify the following parameters unless you know what you're doing.
#

# Hash read-ahead controls how many MB to request the kernel to read
# ahead. If the value is too low the disk may not be fully utilized,
# while if too high the kernel might not be able to keep the read
# pages in memory thus end up trashing.
#hash_read_ahead = 10

# Interval between attempts to check the hash, in milliseconds.
#hash_interval = 100

# Number of attempts to check the hash while using the mincore status,
# before forcing. Overworked systems might need lower values to get a
# decent hash checking rate.
#hash_max_tries = 10
scgi_port = localhost:5000
#监听5000端口,与apache的SCGI配置一致
umask = 0002
#使用正确权限,防止无法子读取自己的文件
encoding_list = UTF-8
#如果你修改为UTF-8还是乱码 请看编译过程里面是否安装了 ncursesw http://ihipop.info/2010/08/1363.html#charset
# Check hash for finished torrents. Might be usefull until the bug is
# fixed that causes lack of diskspace not to be properly reported.
check_hash = no
[/bash]

建立目录

[bash]mkdir -p /home/autotorrent/files
mkdir -p /home/autotorrent/sessions
mkdir -p /home/autotorrent/torrents[/bash]

配置apache的SCGI

[bash]#若没有安装php环境,且使用ubuntu的话,用tasksel安装一台LAMP吧,然后最简安装php5-cli php5-xmlrpc php5-sqlite libapache2-mod-scgi即可
sudo aptitude install apache2 php5-cli libapache2-mod-php5 php5-xmlrpc php5-sqlite libapache2-mod-scgi
sudo nano /etc/apache2/mods-available/scgi.conf
[/bash]

写入

[bash]SCGIMount /RPC2 127.0.0.1:5000[/bash]

 

[bash]sudo a2enmod scgi
sudo service apache2 restart[/bash]

用phpinfo看mod_scgi加载没有
完事后安装webUI,放到web目录下,这个是老版本的rutorrent UI,和IE兼容的比较好,UI比较清爽
[download id="17" format="2"]

这个是最新的Featured 3.1,我测试了下,就Firefox下面可以打开,功能好全,支持显示CPU啊,生成种子啊啥的
[download id="19" format="2"]

ruTorrent v 3.1 doesn't support LAST svn version of rTorrent yet. Only revision 1148 and previous.

具体见rutorrent项目主页
http://code.google.com/p/rutorrent/


PPA有个支持IPv6的deb文件,有兴趣可以试试,我不知道可不可以用。
https://launchpad.net/~berni/+archive/ipv6


more see :https://wiki.archlinux.org/index.php/RTorrent_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)

Author Info :
  • From:编译支持ipv6的rtorrent并配置webUI
  • URL:https://blog.ihipop.com/2010/08/1363.html
  • Please Reserve This Link,Thanks!
  • 《编译支持ipv6的rtorrent并配置webUI》上有5条评论

    1. @ihipop
      谢谢 我已经配置好了 可以用了
      不过还有个小问题
      就是这个怎么去加一个登陆密码呢
      搜索了网上都是基于LIGHTTPD的
      没有基于APACHE的

    2. root@bogon:/var/www# sudo service apache2 restart
      * Restarting web server apache2 * We failed to correctly shutdown apache, so we're now killing all running apache processes. This is almost certainly suboptimal, so please make sure your system is working as you'd expect now!
      ... waiting Syntax error on line 1 of /etc/apache2/mods-enabled/scgi.conf:
      Invalid command 'CGIMount', perhaps misspelled or defined by a module not included in the server configuration

      不知道为什么启动不了

    回复 bigpineapple 取消回复

    您的电子邮箱地址不会被公开。 必填项已用*标注