CentOS7搭建Transmission下载服务器
in Linux with 0 comment
CentOS7搭建Transmission下载服务器
in Linux with 0 comment

获取源码并编译:

wget https://github.com/transmission/transmission/archive/2.94.tar.gz 
tar -zxvf 2.94.tar.gz && cd transmission

编译执行:

yum -y install curl-devel curl libevent-devel
./autogen.sh
mkdir build && cd build
cmake ..
make
sudo make install

配置transmission

vim /home/lonny/.config/transmission-daemon/settings.json

修改

"download-dir": "path"
未完成目录,根据需求调整:
"incomplete-dir": "path",
"incomplete-dir-enabled": false,
关闭白名单:
"rpc-whitelist-enabled": true,
将true改为false,不然不在白名单的IP访问不到transmission的web界面
注:修改settings.json文件必须在transmission未运行的情况下,否则所有修改都不会保存生效

启动transmision

/usr/local/bin/transmission-daemon

还是添加个开机自启吧,我被trouble了很久,因为SELinux的原因导致服务无法正常启动,而且我没有想到这一点,等我临时关闭SELinux启动transmission正常,再开启SELinux重启transmission服务想要排错的时候,这个问题没!有!重!现!了!没有看到日志中有关于SELinux拦截tranmission的错误,所以没有找到问题。

[Unit]
Description=transmission service
After=network.target
[Service]
User=lonny
Group=users
Type=simple #官方是notify
ExecStart=/usr/local/bin/transmission-daemon -f #官方还有个--log-error参数
ExecReload=/bin/kill -s HUP $MAINPID
[Install]
WantedBy=multi-user.target

防火墙设定:

firewall-cmd --zone=public --add-port=9091/tcp --permanent
firewall-cmd --reload

访问http://serverip:9091可以看到web界面

https://github.com/ronggang/transmission-web-control

将src里面的文件替换到/usr/local/share/transmission/web目录

The article has been posted for too long and comments have been automatically closed.