Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:dpi:dpi_components:mediaserver:btrt:start [2018/04/29 16:35] – [The main configuration file /etc/btrt/btrt.conf] kvazikrav | en:dpi:dpi_components:mediaserver:btrt:start [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== 5 Bittorent control option ====== | ||
- | {{indexmenu_n> | ||
- | ====== BTRT - BitTorrent Proxy Tracker ====== | ||
- | ===== Description ===== | ||
- | BTRT is a BitTorrent tracker allowing to optimize the network traffic distribution in favor of reducing traffic to external networks by increasing the amount of intranet traffic. Reducing the network traffic volume to external networks is achieved by prioritization of peer IP addresses in response to // | ||
- | BTRT replies to standard BitTorrent client HTTP requests: // | ||
- | |||
- | |||
- | |||
- | ===== Hardware requirements ===== | ||
- | The main requirement is imposed to the RAM size. BTRT holds the data about all torrent files and peers and more. To calculate the required amount of RAM you can use as basis of 512 bytes per peer. | ||
- | |||
- | |||
- | ===== Software requirements ===== | ||
- | BTRT runs on CentOS 6. To install the BTRT the following packages should be installed on the system: | ||
- | * '' | ||
- | * '' | ||
- | |||
- | ===== Use cases ===== | ||
- | ==== Local retracking ==== | ||
- | The simplest way to use BTRT is to use it as a local retracker. Several trackers that the BitTorrent client should access by sending // announce // requests can be specified in torrent-files. Special name '' | ||
- | |||
- | ==== " | ||
- | Local retracking allows to redistribute traffic only within the operator' | ||
- | When processing // | ||
- | ==== Handling of requests to external trackers ==== | ||
- | BTRT handles the // | ||
- | |||
- | When the // | ||
- | ===== Installation ===== | ||
- | The packet and its dependencies should be installed in order to properly install the application initially. It could be done by applying the command: | ||
- | <code bash> | ||
- | sudo yum install btrt | ||
- | </ | ||
- | |||
- | BTRT uses MySQL database. To perform further installation steps, you must run the service ** mysqld **: | ||
- | <code bash> | ||
- | sudo service mysqld start | ||
- | </ | ||
- | |||
- | User account and MySQL schema should be created before the first launch of BTRT (existing user account can also be used). | ||
- | It is highly recommended to create specific MySQL account for the BTRT. To do so, you need to connect to the MySQL server with superuser privileges: | ||
- | <code bash> | ||
- | mysql -hlocalhost -uroot -p | ||
- | </ | ||
- | |||
- | and execute the account and schema creation commands providing user password: | ||
- | <code mysql> | ||
- | CREATE USER ' | ||
- | CREATE DATABASE btrt; | ||
- | GRANT ALL PRIVILEGES ON btrt.* TO ' | ||
- | </ | ||
- | |||
- | After the account is created, you have to finish the privileged MySQL session by pressing the key combination ** Ctrl-D **. | ||
- | and create objects in the BTRT data schema, providing the name and password of the previously created MySQL user: | ||
- | <code bash> | ||
- | mysql -hlocalhost -ubtrt -p < / | ||
- | </ | ||
- | |||
- | Before the first start, you have to create an // | ||
- | |||
- | |||
- | |||
- | ===== Updating ===== | ||
- | To update a previously installed application, | ||
- | <code bash> | ||
- | sudo service btrt stop | ||
- | </ | ||
- | |||
- | then the updated btrt packet should be installed: | ||
- | <code bash> | ||
- | sudo yum update btrt | ||
- | </ | ||
- | |||
- | When upgrading from version 2.1 and below, you need to update the database structure: | ||
- | <code bash> | ||
- | mysql -hlocalhost -ubtrt -p < / | ||
- | </ | ||
- | |||
- | The consistency of the [[# | ||
- | <code bash> | ||
- | sudo service btrt start | ||
- | </ | ||
- | |||
- | |||
- | |||
- | ===== Configuration ===== | ||
- | The main configuration file is // | ||
- | |||
- | ==== Формат YAML ==== | ||
- | The base [[https:// | ||
- | * " | ||
- | |||
- | * value sequence, for example:\\ '' | ||
- | * | ||
- | It is possible to create complex data structures by using the basic elements. | ||
- | |||
- | One of the key principles describing complex structures behind the [[https:// | ||
- | <code bash> | ||
- | # | ||
- | # Logging parameters | ||
- | logging: | ||
- | path: "/ | ||
- | level: | ||
- | # | ||
- | # default logging level is " | ||
- | switch_time: | ||
- | </ | ||
- | |||
- | can be interpreted as data structure '' | ||
- | |||
- | As pointed out above, given that the guiding principle for editing documents in [[https:// | ||
- | |||
- | ==== The main configuration file / | ||
- | The main configuration file contains the description of most parameters used by the BTRT. Initially, when the package is installed, the configuration template // | ||
- | |||
- | To create a working configuration, | ||
- | |||
- | Description of connection to the MySQL database: | ||
- | <code bash> | ||
- | database: | ||
- | url: " | ||
- | user: " | ||
- | password: | ||
- | schema: | ||
- | </ | ||
- | |||
- | Description of the IP addresses pools: | ||
- | <code bash> | ||
- | peer_groups: | ||
- | # It is useful to have definition for peers in local network. | ||
- | # It can be used when peer from the local network is registered on non-local tracker (neighbor, forwarded tracker) | ||
- | - | ||
- | priority: | ||
- | cidr_file: | ||
- | cidr_list: | ||
- | - | ||
- | |||
- | # neighboring peers is used to identifying range of IP-addresses of peers connected to neighboring trackers | ||
- | - | ||
- | priority: | ||
- | cidr_file: | ||
- | cidr_list: | ||
- | - | ||
- | </ | ||
- | |||
- | Description of the " | ||
- | <code bash> | ||
- | neighbors: | ||
- | - | ||
- | refresh_interval: | ||
- | peers_expiry_interval: | ||
- | announce_request: | ||
- | </ | ||
- | |||
- | |||
- | ===== Управление ===== | ||
- | Основной исполняемый файл трекера - ''/ | ||
- | <code bash> | ||
- | btrt help | ||
- | </ | ||
- | |||
- | Трекер разработан для работы в качестве сервиса. Для старта сервиса необходимо выполнить следующую команду: | ||
- | <code bash> | ||
- | sudo service btrt start | ||
- | </ | ||
- | |||
- | для остановки сервиса: | ||
- | <code bash> | ||
- | sudo service btrt stop | ||
- | </ | ||
- | |||
- | При работе трекера создаются журнальные файлы в соответствии с настройками в конфигурационном файле. По умолчанию журнальные файлы создаются в каталоге ''/ |