紀錄下 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
use databasewhatever_you_defined_in_install_php
select * from xbt_config;
update xbt_config set value = 『Your_Servers_IP' where value = 『70.47.114.223』;
update xbt_config set value = 『Any_Port_You_Want' where value = 『34000』;
9.啟動 XBTT
./xbt_tracker xbt_tracker.conf
10.重新啟動 memcached 服務
/etc/init.d/memcached restart
11.開始使用 http://localhost/site/index.php