Transmission-daemon

Материал из ALT Linux Wiki
Версия от 10:35, 23 января 2016; MichaelShigorin (обсуждение | вклад) (правки команд/конфига/орфографии/пунктуации)

Введение

Torrent — протокол для обмена данными, обеспечивающий закачку и раздачу файлов фрагментарно; скачанные фрагменты становятся доступными для загрузки другими участниками.

Использование такого удобного сервиса как торрентов становится необходимостью в работе ПК дома и на производстве. Иметь в портфеле домашнего/малого офиса этот инструмент полезно при решении различных задач. В этой статье рассматривается использование торрент-клиента, работающего в качестве службы transmission-daemon на стороне сервера, управлять которым можно с любого устройства, где есть браузер.

Программы

Сервер ALT Linux xxx Centaurus pX

Установить
[root@torrent ~]# apt-get update
[root@torrent ~]# apt-get install apache2 transmission-daemon

Настройка

Устанавить права пользователь/группа для пользователя _transmission-daemon (создан при установке) на каталог ftp-сервера (необязательно);

[root@torrent ~]#
mkdir -p /srv/public/torrento 
chown -R _transmission-daemon:_transmission-daemon /srv/public/torrento

При необходимости вносим изменения в файл конфигурации:

[root@torrent ~]# vim /var/lib/transmission-daemon/settings.json
"alt-speed-down": 50,
    "alt-speed-enabled": false,
    "alt-speed-time-begin": 540,
    "alt-speed-time-day": 127,
    "alt-speed-time-enabled": false,
    "alt-speed-time-end": 1020,
    "alt-speed-up": 50,
    "bind-address-ipv4": "0.0.0.0",
    "bind-address-ipv6": "::",
    "blocklist-enabled": false,
    "blocklist-url": "http://www.example.com/blocklist",
    "cache-size-mb": 4,
    "dht-enabled": true,
    "download-dir": "/srv/public/torrento",     //закаченные
    "download-queue-enabled": true,
    "download-queue-size": 5,
    "encryption": 1,
    "idle-seeding-limit": 30,
    "idle-seeding-limit-enabled": false,
    "incomplete-dir": "/srv/public/torrento",  //розданные
    "incomplete-dir-enabled": false,
    "lpd-enabled": false,
    "message-level": 2,
    "peer-congestion-algorithm": "",
    "peer-id-ttl-hours": 6,
    "peer-limit-global": 200,
    "peer-limit-per-torrent": 50,
    "peer-port": 51413,
    "peer-port-random-high": 65535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,
    "peer-socket-tos": "default",
    "pex-enabled": true,
    "port-forwarding-enabled": true,
    "preallocation": 1,
    "prefetch-enabled": 1,
    "queue-stalled-enabled": true,
    "queue-stalled-minutes": 30,
     "ratio-limit": 2,
    "ratio-limit-enabled": false,
    "rename-partial-files": true,
    "rpc-authentication-required": false,
    "rpc-bind-address": "0.0.0.0",
    "rpc-enabled": true,
    "rpc-password": "<хэш пароля>",
    "rpc-port": 9091,    //порт для удалённого доступа
    "rpc-url": "/transmission/",
    "rpc-username": "",
    "rpc-whitelist": "127.0.0.1",
    "rpc-whitelist-enabled": true,
    "scrape-paused-torrents-enabled": true,
    "script-torrent-done-enabled": false,
    "script-torrent-done-filename": "",
    "seed-queue-enabled": false,
    "seed-queue-size": 10,
    "speed-limit-down": 100,
    "speed-limit-down-enabled": false,
    "speed-limit-up": 100,
    "speed-limit-up-enabled": false,
    "start-added-torrents": true,
    "trash-original-torrent-files": false,
    "umask": 18,
    "upload-slots-per-torrent": 14,
    "utp-enabled": true                                                   

Запускаем службу:

[root@torrent ~]# service transmission-daemon start
chkconfig transmission-daemon on