安裝 Wtorrent (Rtorrent 的 WebUI)

這篇文章的內容已經過時了,

很多套件都找不到或是更名了,

而且目前個人覺得比較好用的 web UI 是 Rutorrent 詳細的安裝過程可以參考這篇

http://filesharefreak.com/2010/02/13/how-to-install-rtorrent-rutorrent-using-socket-ssl-authentication-on-ubuntu-or-debian/

===============================

下面列出簡單的安裝步驟,適用在 Ubuntu,Debian 系列的 linux

rtorrent + wtorrent 的作用和 utorrent 的 webui 是類似的作用,只是讓你可以用網頁管理你的 rtorrent
(1)安裝 lighttpd 和 php5 以及 unzip
apt-get install lighttpd php5-common php5-sqlite php5-xmlrpc libxmlrpc-c3 sqlite unzip php-fastcgi php5-curl
(2) rtorrent 的設定檔(~/.rtorrent.rc)中加入下面這行
scgi_port = localhost:5000
(3) 修改 /etc/lighttpd/lighttpd.conf

server.modules = (
"mod_access",
"mod_alias",
"mod_accesslog",
"mod_compress",
"mod_scgi",
"mod_fastcgi"
)
server.document-root = "/var/www/"
server.errorlog = "/var/log/lighttpd/error.log"
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm" )
accesslog.filename = "/var/log/lighttpd/access.log"
url.access-deny = ( "~", ".inc",".db", ".tpl.php", ".cls.php" )
server.pid-file = "/var/run/lighttpd.pid"
dir-listing.encoding = "utf-8"
server.dir-listing = "enable"
server.username = "www-data"
server.groupname = "www-data"
$HTTP["remoteip"] =~ "127.0.0.1" {
alias.url += (
"/doc/" => "/usr/share/doc/",
"/images/" => "/usr/share/images/"
)
$HTTP["url"] =~ "^/doc/|^/images/" {
dir-listing.activate = "enable"
}
}
$HTTP["host"] == "ks0000.kimsufi.com" {
server.document-root = "/var/www/"
server.errorlog = "/var/log/lighttpd/error.log"
accesslog.filename = "/var/log/lighttpd/access.log"
server.error-handler-404 = "/error-handler.php"
}
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket"
)))
scgi.server = (
"/RPC2" => # RT_DIR
( "127.0.0.1" =>
(
"host" => "127.0.0.1", # Ip where rtorrent is listening
"port" => 5000, # Port specified in .rtorrent.rc
"check-local" => "disable"
)
)
)

(4) 將目錄切換到放置網頁的目錄 /var/www

cd /var/www

(5)下載 wtorrent

wget "http://www.wtorrent-project.org/trac/changeset/latest/trunk/?old_path=%2F&format=zip" -O wtorrent.zip

(6)把檔案解壓縮到 /var/www

unzip *.zip

(7)建立 Smarty 的樣板資料夾

mkdir /var/www/wtorrent/tpl_c/

(7)更改檔案的權限和擁有者

chown -R www-data:www-data /var/www/wtorrent

chmod -R 755 /var/www/wtorrent

(6) 在網頁中設定 wtorrent

http://127.0.0.1/wtorrent/install.php

這裡要設定 username 和 password

(7) 刪掉/更名 wtorrent 的 install.php 以免無聊人士偷改

mv /var/www/wtorrent/install.php /var/www/wtorrent/fool.php

(8) 開始使用

http://127.0.0.1/wtorrent/