Install xbt-tracker in Ubuntu (Linux)

Source: Internet
Author: User

Xbtt is short for xbt-tracker, http://xbtt.sourceforge.net/

Xbt is a high-performance, low-cost BitTorrent software written in C ++. This is a pure tracker. It does not provide a front-end service. You can create a front-end service (such as PHP) by yourself ). We mainly use its BT tracker. Previously, we could use CVS to download data from sourceforge.net. Later, it seemed that sourceforge.net had stopped the service.

 

Now we start to install (Ubuntu 12.10)// It is feasible for me to perform a test in Ubuntu 12.10.


1. Download source code

svn co https://xbtt.svn.sourceforge.net/svnroot/xbtt/trunk/xbt/misc xbt/miscsvn co https://xbtt.svn.sourceforge.net/svnroot/xbtt/trunk/xbt/Tracker xbt/Tracker    

Download all the source code of xbt. We need the MISC and xbt tracker directories.

Note: If you download these files separately, you must put these two folders under the xbt directory (that is, the xbt directory contains MISC and tracker)

 

2. Some preparations
(1) install the corresponding Library:

apt-get install cmake g++ libboost-date-time-dev libboost-dev \libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev \libboost-serialization-dev libmysqlclient15-dev make subversion zlib1g-dev

Note: For details about the library, see the "installing under Linux" Description on the official website http://xbtt.sourceforge.net/

(2) install MySQL and create the data account and password:

apt-get install mysql-server

(3) log on to the database:

mysql -h localhost -u root -p

(4) Create a database "xbt"

create database xbt

(5) link to the database

use xbt

(6) use the source command to import the database. Create xbt_tracker. SQL IN THE xbt/tracker directory (this is the script for generating the table)

source /share/BiTorrent/xbt/Tracker

After completing the preceding steps, your database has been installed and table creation has been completed.

3. Compile xbt_tracker
CD xbt/tracker // enter the tracker directory
./Make. Sh // execute the make. Sh script
CP xbt_tracker.conf.default xbt_tracker.conf // copy the configuration file. As mentioned above, xbt requires a front-end and database support.
Re-edit the configuration file:

VI xbt_tracker.conf


Mysql_host = "localhost" // database address. The default value is enough.
Mysql_user = root // database username
Mysql_password = root // Database Password
Mysql_database = xbt // Database Name

Note: In mysql_database, you need to prepare the database in advance. The default name is "xbt". Create the xbt_tracker. SQL script in the xbt/tracker directory (this is the script used to generate the table)

Finally, execute./make. Sh,

 

4. Possible Problems
1. If the make. Sh file has insufficient permissions, use chmod to modify it:
Chmod 755 make. Sh // set make. Sh permission to-rwxr-XR-x

2. If you encounter the following situations:
./Make. Sh
In the file containing ../MISC/SQL/database. h: 9
From server. h: 10
From connection. cpp: 8: ../MISC/SQL/SQL _result.h: 14: 25: Error: MySQL/MySQL. H: No file or directory
This means that the MySQL you installed cannot be found and the database address needs to be defined.

CD ../MISC ln-S/usr/local/MySQL/include/MySQL // Of course, replace the MySQL address with your own
CD ../xbt/tracker./make. Sh
If it is normal, it can be executed. Then you will find an xbt_tracker file in the tracker directory.

3../xbt_tracker
If this error occurs:
./Xbt_tracker: Error while loading shared libraries: libmysqlclient. so.15: cannot open shared object file: no such file or directory
Or MySQL, establish a connection as follows:

CD/usr/lib/ln-S/usr/local/MySQL/lib/MySQL/libmysqlclient. so.15 libmysqlclient. so.15 // modify according to your own database address

V. Use

At this time, it can be said that xbt_tracker has been started. Yes. Congratulations!

Start xbt-tracker:./xbt_tracker

Disable xbt-tracker: Kill "cat xbt_tracker.pid" // process ID

Announce address: http: // localhost: 2710/announce

Status viewing address: http: // localhost: 2710/statistics or http: // localhost: 2710/statis

 

6. modify the configuration file:

mysql -h localhost -u root -p

create database xbt

use xbt
Insert the following code: insert into xbt_config (name, value) values ('announce _ interval ', '000000'); insert into xbt_config (name, value) values ('anonus us _ connect ', '1'); insert into xbt_config (name, value) values ('Anonymous _ announce', '1'); insert into xbt_config (name, value) values ('anonus us _ scrape ', '1'); insert into xbt_config (name, value) values ('Auto _ register', '1 '); insert into xbt_config (name, value) values ('clean _ up_interval ', '60'); insert into xbt_config (name, value) values ('daemon', '1 '); insert into xbt_config (name, value) values ('debug', '0'); insert into xbt_config (name, value) values ('gzip _ debug', '1 '); insert into xbt_config (name, value) values ('gzip _ scrape ', '1'); insert into xbt_config (name, value) values ('Listen _ IPA ', '*'); insert into xbt_config (name, value) values ('Listen _ port', '000000'); insert into xbt_config (name, value) values ('Log _ access', '0'); insert into xbt_config (name, value) values ('Log _ announce ', '0'); insert into xbt_config (name, value) values ('Log _ scrape ', '0'); insert into xbt_config (name, value) values ('pid _ file', 'xbt _ tracker. PID '); insert into xbt_config (name, value) values ('read _ config_interval', '000000'); insert into xbt_config (name, value) values ('read _ db_interval ', '60'); insert into xbt_config (name, value) values ('redirect _ url', ''); insert into xbt_config (name, value) values ('scrape _ interval ', '0'); insert into xbt_config (name, value) values ('table _ announce_log', 'xbt _ announce_log '); insert into xbt_config (name, value) values ('table _ files', 'xbt _ files'); insert into xbt_config (name, value) values ('table _ files_users ', 'xbt _ files_users'); insert into xbt_config (name, value) values ('table _ scrape_log ', 'xbt _ scrape_log'); insert into xbt_config (name, value) values ('table _ users', 'xbt _ users'); insert into xbt_config (name, value) values ('write _ db_interval ', '60 ');

Vi. Description of configuration fields in xbt_config

Next, you will find all possible configuration options and the default values in the xbt_config table.
Name: auto_register
Description: if enabled, it enables Automatic Registration of the seed.
Default Value: 0 (disabled)

Name: anonymous_connect
Description: if enabled, anyone (anonymous) is allowed to access the trail.
Default Value: 1 (Enabled)

Name: anonymous_announce
Description: if enabled, a trail published by anyone (anonymous) is allowed.
Default Value: 1 (Enabled)

Name: anonymous_scrape
Description: if enabled, anyone (anonymous) is allowed to scrape the trace.
Default Value: 1 (Enabled)

Name: Daemon
Description: If this server is enabled, it runs as a daemon (in the background ).
Default Value: 1 (Enabled)

Name: Debug
Description: If this server is enabled, it will also run in debug mode (go to http: // Tracker: Port/debug to view debugging information ).
Default Value: 0 (disabled)

Name: full_scrape
Description: If this server is enabled, it will be completely scraped to the client.
Default Value: 0 (disabled)

Name: gzip_debug
Description: debugging page for gzip compression (compression) enabled by this server.
Default Value: 1 (Enabled)

Name: gzip_scrape
Description: If this server is enabled, Gzip is compressed to scrape pages.
Default Value: 1 (Enabled)

Name: log_access
Description: If this server is enabled, a file is created with all files accessed to the server. This file will be named (xbt_tracker_raw.log)
Default Value: 0 (disabled)

Name: log_announce
Description: If this server is enabled, all access to the declaration table (xbt_announce_log) will be logged ).
Default Value: 0 (disabled)

Name: log_scrape
Description: If this server is enabled, all data is published to the scratch table (xbt_scrape_log ).
Default Value: 0 (disabled)

Name: announce_interval
Description: The default interval (in seconds) in which torrent files are declared.
Default: 1800 (30 minutes)

Name: clean_up_interval
Description: (in seconds), which are marked to be deleted at the default interval.
Default Value: 60 (1 minute)

Name: read_config_interval
Description: (in seconds). The default interval of the xbt binary will re-read its configuration (from the xbt_tracker.conf file ).
Default Value: 60 (1 minute)

Name: read_db_interval
Description: (in seconds). The default interval of the xbt binary will re-read its configuration (from the xbt_config table ).
Default Value: 60 (1 minute)

Name: scrape_interval
Description: (in seconds). A new scratch is allowed in the default interval.
Default Value: 0 (there is no new shortest time between scratches)

Name: write_db_interval
Description: (in seconds). The xbt binary updates the default value of the database.
Default Value: 15

Name: column_files_completed
Description: The default value of the 'complete' field in the xbt_files_users table.
Default Value: complete

Name: column_files_fid
Description: The default value of the 'International number' field in the xbt_files_users table.
Default Value: international number

Name: column_files_leechers
Description: The default value of the 'leechers' field in the xbt_files_users table.
Default Value: leechers.

Name: column_files_seeders
Description: The default value of the 'plant' field in the xbt_files_users table.
Default Value: seeding machine

Name: column_users_uid
Description: Default Value of the 'uid' field in the xbt_files_users and xbt_users tables.
Default Value: uid

Name: offline_message
Description: The offline information will appear in the client program.
Default Value: null. If the specified information tracing system is offline.

Name: pid_file
Description: The tracker in the file will be stored in the PID (process ID ).
Default Value: NULL

Name: query_log
Description: All Query file names in the xbt binary log.
Default Value: NULL

Name: redirect_url
Description: This URL is redirected on the client. If he/she attempts to access the URL through a normal tracking URL in the browser.
Default Value:

Name: table_announce_log
Description: it is the default value of the announce_log table.
Default Value: xbt_table_prefix (in xbt_tracker.conf) + announce_log

Name: table_deny_from_hosts
Description: The default value of the deny_from_hosts table.
Default Value: xbt_table_prefix (in xbt_tracker.conf) + deny_from_hosts

Name: table_files
Description: The default values of tables in these files.
Default Value: xbt_table_prefix (in xbt_tracker.conf) + File

Name: table_files_users
Description: The default value of the files_users table.
Default Value: xbt_table_prefix (in xbt_tracker.conf) + files_users

Name: table_scrape_log
Description: The default value of the scrape_log table.
Default Value: xbt_table_prefix (in xbt_tracker.conf) + scrape_log

Name: table_users
Description: The default value of the User table.
Default Value: xbt_table_prefix (in xbt_tracker.conf) + User

Name: torrent_pass_private_key
Description: torrent uses the private key by default.
Default Value: A 27-character random string.

Name: listen_ipa
Description: The xbt Tracking IP address.
Default Value: null. It will run on all available IP addresses.

Name: listen_port
Description: port. xbt tracks the operation.
Default: 2710 (TCP and UDP)

References: http://www.linuxpk.com/81158.html

Http://xbtt.sourceforge.net/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.