https://www.vccvps.com/archives/1336
https://www.jianshu.com/p/7fcc5a7b3a2d
安装
sudo apt install transmission-cli transmission-common transmission-daemon
#Created symlink /etc/systemd/system/multi-user.target.wants/transmission-daemon.service → /lib/systemd/system/transmission-daemon.service.
安装完之后查看状态
systemctl start transmission-daemon.service
systemctl status transmission-daemon.service
修改配置文件
systemctl stop transmission-daemon.service
sudo nano /var/lib/transmission/.config/transmission-daemon/settings.json
"download-dir": "/srv/dev-disk-by-label-A/video/\u672a\u770b\u7535\u5f71",
"incomplete-dir": "/srv/dev-disk-by-label-A/video/\u672a\u770b\u7535\u5f71",
"rpc-password": "123123",
"rpc-username": "user",
"rpc-whitelist": "*",
注意:是软链接 settings.json -> /etc/transmission-daemon/settings.json
重启,访问Transmission
Transmission默认端口是9091
修改transmission-daemon用户
在debian安装了transmission-daemon后,,默认是以"debian-transmission"启动,下载的文件也是属于该用户的。需要改成使用我的用户启动。
# 停止服务
sudo systemctl stop transmission-daemon.service
# 修改用户名
sudo vi /etc/init.d/transmission-daemon
# 修改USER变量为需要的用户名,保存
USER=aa
# 添加信息
sudo systemctl edit transmission-daemon.service
[Service]
User=aa
# 重启服务
sudo systemctl daemon-reload
sudo systemctl start transmission-daemon.service
安装transmission-web-control
wget https://github.com/ronggang/transmission-web-control/raw/master/release/install-tr-control-cn.sh
bash install-tr-control-cn.sh
当前 Transmission Web 目录为: /usr/share/transmission/web
- 找个时间搞懂transmission的权限问题,daemon-transmission作为用户运行程序
UDP:Socket缓冲区大小问题
cat /proc/sys/net/core/rmem_max
rmem_max:一个Socket的读缓冲区可由程序设置的最大值,单位字节;
wmem_max:一个Socket的写缓冲区可由程序设置的最大值,单位字节;
rmem_default:一个Socket的被创建出来时,默认的读缓冲区大小,单位字节;
wmem_default:一个Socket的被创建出来时,默认的写缓冲区大小,单位字节;
注:/proc是一个很特殊的文件系统,其并非真实存在于物理磁盘,而是当前系统运行状态的一个映射,存在于RAM中。
修改:
位置/etc/sysctl.conf
添加两行:
net.core.rmem_max = 16777216
net.core.wmem_max = 4194304
重新载入参数:
sysctl -p
https://hacpai.com/article/1556162494650
http://www.found5.com/view/451.html