赞
踩
注,文章转载自:http://www.visigod.com/xbt-tracker/installation
稍加修改!
The XBT tracker (XBTT) can run on Unix/Linux or Windows. Please check the tutorial that fits you best.
The XBTT must be compiled from source on Unix/Linux. You need shell and root access to compile and run XBTT. You also need the following packages:
To install this required packages you can run the following commands in your server:
Installing the required packages on Debian | |
1 | apt-get install cmake g++ libboost-date-time-dev libboost-dev \ |
Installing the required packages on CentOS, Fedora or Red Hat | |
1 | yum install boost-devel gcc-c++ mysql-devel subversion |
If for some reason the boost libraries are still on the old version, you can do the following:
Install Boost manually | |
1 2 3 4 5 6 |
|
Then create a folder in your server and type the following:
1 | svn co https://xbtt.svn.sourceforge.net/svnroot/xbtt/trunk/xbt/misc xbt/misc |
After the server is compiled you will have a xbt_tracker binary under xbt/Tracker. Copy this binary into the directory where you will run XBTT along with the xbt_tracker.conf.default that is on the same folder. You will end up with two files in your xbt directory: the xbt_tracker and the xbt_tracker.conf.default. Rename the xbt_tracker.conf.default to xbt_tracker.conf.
we are using /home/xbt_tracker as an example | |
1 | cp xbt_tracker /home/xbt_tracker/ |
We now need to create a database to be used with XBTT. You can use phpMyAdmin of the mysql command to create it. See the example below using the mysql client:
这里我没有装phpMyAdmin,所以直接从命令行执行!
在执行之前,还先要启动mysqld服务,设置口令等等!
/etc/init.d/mysqld start
mysqladmin -u root password *****
mysql -u root -p
输入口令
然后将用户加入数据库:
CREATE USER 'xbt_tracker'@'localhost' IDENTIFIED BY 'my_tracker_password';
GRANT USAGE ON * . * TO 'xbt_tracker'@'localhost' IDENTIFIED BY 'my_tracker_password';
CREATE DATABASE IF NOT EXISTS `xbt_tracker` ;
GRANT ALL PRIVILEGES ON `xbt_tracker` . * TO 'xbt_tracker'@'localhost';
After the database is created we need to import the default sql that we previously copied into our xbt_tracker home directory. Just type the following command in the shell of your server:
1 | mysql -uxbt_tracker -pmy_tracker_password xbt_tracker < xbt_tracker.sql |
Ok, the default database schema (xbt_tracker.sql) is imported into the database we have created. All that is left is to configure XBTT to use it. To do so, edit the xbt_tracker.conf in the xbt_tracker home directory and use the following (change the values to fit you need. We are going to use the ones from the previous commands):
1 | mysql_host = localhost |
然后,进入mysql
use xbt_tracker
将如下信息导入.
insert into xbt_config values ('announce_interval', '1800');
insert into xbt_config values ('anonymous_connect', '1');
insert into xbt_config values ('anonymous_announce', '1');
insert into xbt_config values ('anonymous_scrape', '1');
insert into xbt_config values ('auto_register', '1');
insert into xbt_config values ('clean_up_interval', '60');
insert into xbt_config values ('daemon', '1');
insert into xbt_config values ('debug', '0');
insert into xbt_config values ('gzip_announce', '1');
insert into xbt_config values ('gzip_debug', '1');
insert into xbt_config values ('gzip_scrape', '1');
insert into xbt_config values ('listen_check', '0');
insert into xbt_config values ('listen_ipa', '*');
insert into xbt_config values ('listen_port', '2710');
insert into xbt_config values ('log_access', '0');
insert into xbt_config values ('log_announce', '0');
insert into xbt_config values ('log_scrape', '0');
insert into xbt_config values ('pid_file', 'xbt_tracker.pid');
insert into xbt_config values ('read_config_interval', '300');
insert into xbt_config values ('read_db_interval', '60');
insert into xbt_config values ('redirect_url', '');
insert into xbt_config values ('scrape_interval', '0');
insert into xbt_config values ('table_announce_log', 'xbt_announce_log');
insert into xbt_config values ('table_files', 'xbt_files');
insert into xbt_config values ('table_files_updates', 'xbt_files_updates');
insert into xbt_config values ('table_files_users', 'xbt_files_users');
insert into xbt_config values ('table_ipas', 'xbt_ipas');
insert into xbt_config values ('table_scrape_log', 'xbt_scrape_log');
insert into xbt_config values ('table_users', 'xbt_users');
insert into xbt_config values ('update_files_method', '1');
insert into xbt_config values ('write_db_interval', '60');
insert into xbt_config values ('listen_port', '2710');这项是控制端口的,我改成8080的.
insert into xbt_config values ('listen_port', '8080');
下面你会发现所有可能的配置选项,并在该xbt_config表的默认值。
Below you will find all the possible configurable options and it's default values in the xbt_config table.
We have now concluded the installation of XBTT on our server. So let's start it. To do it just type:
1 | ./xbt_tracker |
You now have XBTT running on the default port 2710. To customize it please read the XBTT Configuration page. To see how you can always start XBTT when your server starts please check the General Tips page.
To use the tracker on Windows you can download the installation file from the XBT project page. After downloading the exe file you must run it to install it on your computer. The windows version is installed by default as a service.
Personal note: Although XBTT runs on Windows I recommend you to run it on a linux server.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。