纪录下 Private Tracker Server 的架设及安装过程,
使用 Ubuntu (Debian 的安装应该也类似) 系统,搭配 Lighttpd
所使用的是和 What.CD这个著名的音乐 PT 所开发的 Gazelle 系统
1.先用 apt 安装一堆相依套件
apt-get install build-essential php5 libmysqlclient15-dev php5-mysql memcached php5-memcache php5-gd php5-mcrypt subversion automake cmake g++ libboost-date-time-dev libboost-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev libboost-serialization-dev make zlib1g-dev lighttpd mysql-server libtool
2.透过 SVN 下载 Gazelle,并解压缩到 /var/www/site/ (实际SVN的下载地址请到 What.CD 的 IRC #gazelle 频道查询)
svn co http://svn.what.cd:81/repos/project_gazelle /var/www/
cd /var/www/
unrar x Gazelle1.0Rev.27.rar
mv Gazelle* /var/www/site/
3.设定 MYSQL 的 root 密码
mysql -u root
use mysql
update user set password=PASSWORD(『New_Password') where User=』root';
flush privileges;
quit;
4.更改 lighttpd 设定将 url.access-deny 改成这样(把 /site 下面比较敏感的资料夹禁止使用者存取)
url.access-deny = ( "~", ".inc",".db", ".tpl.php", ".cls.php",".sql", ".ini", ".inc", "/var/www/site/captcha", "/var/www/site/classes", "/var/www/site/sections", "/var/www/site/torrents" )
5.重新启动 lighttpd
/etc/init.d/lighttpd.sh restart
6.设定 Gazelle
http://localhost/site/install/index.php
7.安装XBTT
cd / site /
tar zxfv xbtt.tar.gz
cd xbtt / build / xbtt
./autogen.sh
make
cd src
nano xbt_tracker.conf
8.更新MYSQL设定
mysql -u root -p
使用databasewhatever_you_defined_in_install_php
select * from xbt_config;
更新xbt_config set value =「Your_Servers_IP',其中value =「70.47.114.223」;
更新xbt_config set value =「Any_Port_You_Want',其中value =「34000」;
9.启动XBTT
./xbt_tracker xbt_tracker.conf
10.重新启动memcached服务
/etc/init.d/memcached restart
11.开始使用HTTP://localhost/site/index.php