树莓派搭建BT下载器
更新树莓派:
sudo apt-get install update
安装transmission:
sudo apt-get install transmission-daemon
给用户授权:
sudo usermod -a -G pi debian-transmission
设置Transmission的配置文件:
sudo nano /etc/transmission-daemon/settings.json
{
"alt-speed-down": 15,
"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": 15,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": true,
"blocklist-url": "http://list.iblocklist.com/?list=ydxerpxkpcfqjaybcssw&fileformat=p2p&archiveformat=gz",
"cache-size-mb": 4,
"dht-enabled": true,
"download-dir": "/home/pi/Downloads",
"download-limit": 100,
"download-limit-enabled": 0,
"download-queue-enabled": true,
"download-queue-size": 5,
"encryption": 1,
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
"incomplete-dir": "/home/pi/Downloads",
"incomplete-dir-enabled": true,
"lpd-enabled": false,
"max-peers-global": 200,
"message-level": 2,
"peer-congestion-algorithm": "",
"peer-id-ttl-hours": 6,
"peer-limit-global": 240,
"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": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "raspberry",
"rpc-port": 9091,
"rpc-url": "/transmission/",
"rpc-username": "transmission",
"rpc-whitelist": "127.0.0.1",
"rpc-whitelist-enabled": false,
"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": true,
"umask": 0,
"upload-limit": 100,
"upload-limit-enabled": 0,
"upload-slots-per-torrent": 14,
"utp-enabled": true
}
在这个配置文件中有很多可以更改的选项,对应着上面的配置文件说几个重点的部分,方便理解和自行修改。
blocklist参考了techjawab的github:
"blocklist-url": "http://list.iblocklist.com/?list=ydxerpxkpcfqjaybcssw&fileformat=p2p&archiveformat=gz",
设置下载目录为用户目录下的Downloads文件夹:
"download-dir": "/home/pi/Downloads",
设置未下载完成数据存放地点为Downloads文件夹:
"incomplete-dir": "/home/pi/Downloads",
设置Web登陆密码为:raspberry
"rpc-password": "raspberry",
设置Web登陆用户名:transmission
"rpc-username": "transmission",
允许Web登陆:(设置为true)
"utp-enabled": true
设置完成之后,保存setting.json文件,重新启动transmission服务:
sudo service transmission-daemon reload
到这里可以在浏览器中输入你的树莓派的ip地址和端口号放完transmission的web界面了,比如你的树莓派地址是:192.168.1.10,那么在浏览器中输入:
192.168.1.10:9091
登陆的用户名和密码使用配置文件中设置的内容,例子中的用户名是:transmission,密码是:raspberry。
如果遇到permission问题,按照文中的下载地址,使用以下命令提升Downloads目录的权限:
sudo chmod 777 -R /home/pi/Downloads/
登陆到Web界面之后,点击左上角的文件夹图标可以添加种子文件,树莓派就会开始下载了。
作者:曦沉
链接:http://www.jianshu.com/p/9dac4772cc72
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。