文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>wtorrent install guide for ubuntu

wtorrent install guide for ubuntu

时间:2009-07-17  来源:marksman201

前面两篇文章讲了rtorrent和ntorrent的安装和使用,ntorrent不但可以远程控制rtorrent,而且是gui的。这里再介绍一种gui的rtorrent远程控制客户端wtorrent,它的web界面可是ntorrent不能比拟的.
  1. 安装lighttpd、php5、xmlrpc-c、rtorrent等等:
apt-get install apache2.2-common apache2-utils autoconf automake autotools-dev binutils build-essential bzip2 ca-certificates comerr-dev cpp cpp-4.1 dpkg-dev file g++ g++-4.1 gawk gcc gcc-4.1 libapache2-mod-php5 libapr1 libaprutil1 libc6-dev libcurl3 libcurl3-openssl-dev libexpat1 libidn11 libidn11-dev libkadm55 libkrb5-dev libmagic1 libncurses5-dev libneon26 libpcre3 libpq5 libsigc++-2.0-dev libsqlite0 libsqlite3-0 libssl-dev libssp0-dev libstdc++6-4.1-dev libsvn1 libtool libxml2 lighttpd linux-libc-dev lynx m4 make mime-support ntp ntpdate openssl patch perl perl-modules php5 php5-cgi php5-common php5-sqlite pkg-config screen sqlite subversion ucf zlib1g-dev   具体可参考上一篇《using xmlrpc with rtorrent && ntorrent install》: http://blog.chinaunix.net/u2/86590/showart.php?id=1999581   这里只不过多了php5的安装而已,其他安装都一样。     2. 在.rtorrent.rc中加上如下一行:
scgi_port = localhost:5000

  3. 链接lighttpd的auth模块:

ln -s /etc/lighttpd/conf-available/10-auth.conf /etc/lighttpd/conf-enabled/10-auth.conf     4. 在/etc/lighttpd/lighttpd.conf中添加以下几行:  
# ipkg update
# ipkg install rtorrent
# ipkg install lighttpd
# (add mod_scgi and config RPC mount point to /opt/etc/lighttpd.conf), below is the diff after I made the change
--- lighttpd.conf.dist 2007-10-30 17:57:18.000000000 +0000
+++ lighttpd.conf 2007-11-01 20:31:39.000000000 +0000
@@ -33,6 +33,7 @@
 # "mod_expire",
 # "mod_secdownload",
 # "mod_rrdtool",
+ "mod_scgi",
+ "mod_fastcgi", + "mod_auth",
  "mod_accesslog" )

 ## a static document-root, for virtual-hosting take look at the
@@ -319,3 +320,13 @@
 #include_shell "echo var.a=1"
 ## the above is same as:
 #var.a=1
+
+scgi.server = (
+"/RPC2" => (
+ "127.0.0.1" => (
+ "host" => "127.0.0.1",
+ "port" => 5000,
+ "check-local" => "disable"
+ )
+ )
+)
+fastcgi.server = ( ".php" => (( +"bin-path" => "/usr/bin/php-cgi", +"socket" => "/tmp/php.socket" +))) +auth.backend = "htdigest" +auth.backend.htdigest.userfile = "/etc/lighttpd/htdigest" +auth.require = ( "/RPC2" => +( +"method" => "basic", +"realm" => "XML-RPC", +"require" => "valid-user" +) +)

 5. 创建xml-rpc的访问权限(即用户名和密码):

  • cd /etc/lighttpd
    • user=yourusernamehere; pass=yourpasswordhere;
    • echo $user:XML-RPC:`echo -n $user:XML-RPC:$pass | md5sum | cut -b -32` >> htdigest
    • unset user; unset pass;  6. 下载wtorrent:
    • cd /var/www
    • svn co svn://wtorrent-project.org/repos/trunk/wtorrent/
    • cd wtorrent
    • mv * ..
    • mv .* ..
    • cd ..
    • rm -r wtorrent
    • touch ./db/database.db
    • chown -R www-data:www-data db torrents tpl_c
    • vim conf/sample.user.conf.php 设置PT_AUTH为true、RT_USER和RT_PASS为你访问lighttpd的用户名和密码、DIR_EXEC为/var/www。然后将文件名sample.user.conf.php改为user.conf.php (set RT_AUTH to true and put your username and password in RT_USER "**" and RT_PASS "**". Also don't forget to change 'DIR_EXEC' to '/var/www'. You need to save this as 'user.conf.php')   设置wtorrent:http://localhost/install.php 访问wtorrent的web界面:http://localhost/index/php   参考资料: Debian/Ubuntu Installation Guide:http://www.wtorrent-project.org/trac/wiki/DebianInstall    
  • 相关阅读 更多 +
    排行榜 更多 +
    浴血混战官方下载

    浴血混战官方下载

    飞行射击 下载
    检票员模拟器免广告下载

    检票员模拟器免广告下载

    模拟经营 下载
    最终前哨最终版手机版下载

    最终前哨最终版手机版下载

    休闲益智 下载