红联Linux门户
Linux帮助

Ubuntu系统安装Transmission

发布时间:2017-07-04 09:10:38来源:linux网站作者:杯杯杯杯具
虚拟机Ubuntu 16.10
Transmission 2.92(https://launchpad.net/~transmissionbt/+archive/ubuntu/ppa)
 
一、添加源
sudo add-apt-repository ppa:transmissionbt/ppa
sudo apt-get update
中间出现的问题:
1.无法解析ppa.launchpad.net(目测是我的网络问题,可以无视)
Err:15 http://ppa.launchpad.net/transmissionbt/ppa/ubuntu yakkety InRelease    
Could not resolve 'ppa.launchpad.net'
Fetched 974 kB in 10s (96.9 kB/s)                                              
W: Failed to fetch http://ppa.launchpad.net/transmissionbt/ppa/ubuntu/dists/yakkety/InRelease  Could not resolve 'ppa.launchpad.net'
W: Some index files failed to download. They have been ignored, or old ones used instead.
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
但事实上我的主机是可以ping通的,虚拟机不行,目测是dns的问题,改dns为8.8.8.8解决
(如果改dns无效,可以选择在/etc/hosts末尾加一行91.189.95.83  ppa.launchpad.net)
2.一波未平一波又起
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
报这个错主要原因是有别的程序在使用apt,可以kill掉使用apt的程序
总算是结束了,进入下一步。
 
二、安装
sudo apt-get install transmission-daemon
这一步就很简单了,一步到位
 
三、配置
sudo nano /var/lib/transmission-daemon/info/settings.json
首先,如果你的Ubuntu系统不是本地的话,请将rpc-whitelist改成“*”,或者将rpc-whitelist-enabled更改为false
管理界面默认密码是transmission,rpc-password后面可直接修改成想要的明文密码,会在启动后自动转换为hash
download-dir设置保存位置
dht-enabled更改dht的开关,pt的各位改成false
peer-port更改端口号,默认是51413
blocklist-enabled修改ip过滤,文末再提
其他的自行理解,不再赘述
 
四、美化WebUI
原版UI反正我是看不下去了,使用ronggang大佬的美化补丁来美化成应有的样子 https://github.com/ronggang/transmission-web-control
wget https://github.com/ronggang/transmission-web-control/raw/master/release/tr-control-easy-install.sh
sudo bash tr-control-easy-install.sh
 
五、重启transmission-daemon,enjoy it!
sudo service transmission-daemon restart
YourIP:9091(本机则为127.0.0.1:9091)
 
六、有关blocklist
在/var/lib/transmission-daemon/.config/transmission-daemon/blocklists目录中新建一个文件ip,写入如下
ipv4:0.0.0.0-59.67.31.255
ipv4:59.67.48.0-115.24.239.255
ipv4:115.25.0.0-115.26.31.255,0
ipv4:115.26.64.0-121.193.127.255
ipv4:121.193.144.0-172.15.255.255
ipv4:172.32.0.0-202.112.255.255
ipv4:202.113.16.0-202.113.175.255
ipv4:202.113.192.0-211.81.47.255
ipv4:211.81.64.0-219.243.31.255
ipv4:219.243.48.0-222.30.15.255
ipv4:222.30.32.0-255.255.255.255
重启transmission即可屏蔽非TJU的ipv4连接
但是就测试来看,还是会有跑流量的问题。
 
本文永久更新地址:http://www.linuxdiyf.com/linux/31849.html