CentOS 5 安裝 rTorrent+wTorrent
- 安裝需要的工具套件
yum install gcc gcc-c++ m4 make automake libtool pkgconfig perl openssl-devel ncurses-devel curl-devel cppunit cppunit-devel screen
- 安裝與設定 mod_scgi
wget http://download.fedora.redhat.com/pub/epel/5/i386/mod_scgi-1.13-1.el5.i386.rpm rpm -ivh mod_scgi-1.13-1.el5.i386.rpm
- 設定 SCGIMount
vi /etc/httpd/conf.d/scgi.conf
# (This actually better set up permanently with the command line # "a2enmod scgi" but shown here for completeness) LoadModule scgi_module modules/mod_scgi.so # Set up a location to be served by an SCGI server process # uncomment next line to serve SCGI process under /dynamic/ # SCGIMount /dynamic/ 127.0.0.1:4000 SCGIMount /RPC2/ 127.0.0.1:5000
需要重新啟動 apache 才會生效
service httpd restart
- 安裝 XMLRPC-C
- 目前版本 1.06.42
wget http://ncu.dl.sourceforge.net/project/xmlrpc-c/Xmlrpc-c%20Super%20Stable/1.06.42/xmlrpc-c-1.06.42.tgz tar -zxvf xmlrpc-c-1.06.42.tgz cd xmlrpc-c-1.06.42 ./configure make make install
- 安裝 libTorrent 與 rTorrent
在 RPMForge 已經有包好的 libTorrent 與 rTorrent 但是 rTorrent 的 rpm 並不支援 XMLRPC 所以必須下載 Source 自行 Compiler 才可達成與 wTorrent 整合的功能
- ibtorrent-0.12.6.tar.gz / rtorrent-0.8.6.tar.gz 在 configure 時出現
configure: error: Could not compile XMLRPC-C test
- ibtorrent-0.12.7.tar.gz / rtorrent-0.8.7.tar.gz 在 make 時會出現
src/thread_base.cc:206: undefined reference to `pthread_kill'
wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.12.5.tar.gz tar -zxvf libtorrent-0.12.5.tar.gz cd libtorrent-0.12.5 ./configure make make install wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.5.tar.gz cd rtorrent-0.8.5 ./configure --with-xmlrpc-c make make install
- 測試 rTorrent
建立 bt 執行 rTorrent
useradd bt passwd bt su - bt vi .rtorrent.rc
# ---------------------------------------- # rtorrent 設定檔 # 檔名:.rtorrent.rc (隱藏檔,前面有點) # 存放位置:~ (使用者家目錄) # ---------------------------------------- # 每 torrent 最小/最大連接數 min_peers = 50 max_peers = 200 # 每 torrent 最大上傳數 max_uploads = 2 # 上傳和下載速度限制,設0=無限制.(單位 KiB) download_rate = 0 upload_rate = 15 # 隨機 port 範圍 # 範例:port_range = 6890-6999 port_range = 19000-19000 # 下載檔名編碼 encoding_list = UTF-8 # 下載檔案存放目錄 directory = /e2160/data1500G/BT # 快取存放目錄 session = /home/bt/session # torrent 存放目錄 和 排程設定 # 放在此目錄的中的 torrent 會自動加入列表 schedule = watch_directory,5,5,load_start=/e2160/data1500G/BT/torrent/*.torrent # DHT 開關 dht = on # DHT port (預設為 6881) dht_port = 19000 scgi_port = 127.0.0.1:5000
- 安裝 wTorrent
- 網址 :
su - root cd /var/www svn checkout http://wtorrent-project.googlecode.com/svn/trunk/ wtorrent-project-read-only cd /var/www/html ln -s /var/www/wtorrent-project-read-only/wtorrent . chown -R apache:apache /var/www/wtorrent-project-read-only/wtorrent