本教程在kimsufi特价独服KS7(centos7)测试通过,完美无差错,特记录已被后用。
当前所使用系统Centos7.5(其他系统自测),Transmission2.94最新版,关闭selinux,关闭防火墙(或自行配置规则)
由于一些软件官网下载速度过慢,所以我这里都替换成了本地( whsir )链接,介意的话自行去官网下载。
1、安装相关依赖
yum groupinstall -y 'development tools'
yum -y install gcc gcc-c++ m4 make automake libtool gettext openssl-devel wget perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker psmisc
2、编译libevent
cd /usr/local/src
wget http://down.whsir.com/downloads/libevent-2.1.8-stable.tar.gz
tar zxf libevent-2.1.8-stable.tar.gz
cd libevent-2.1.8-stable
./configure --prefix=/usr
make && make install
cd ..
3、编译expat
wget http://down.whsir.com/downloads/expat-2.2.5.tar.bz2
tar xf expat-2.2.5.tar.bz2
cd expat-2.2.5
./configure --prefix=/usr
make && make install
cd ..
4、编译XML-Parser
wget http://down.whsir.com/downloads/XML-Parser-2.44.tar.gz
tar zxf XML-Parser-2.44.tar.gz
cd XML-Parser-2.44
perl Makefile.PL
make && make install
cd ..
5、编译intltool
wget http://down.whsir.com/downloads/intltool-0.51.0.tar.gz
tar zxf intltool-0.51.0.tar.gz
cd intltool-0.51.0
./configure --prefix=/usr
make && make install
cd ..
6、编译libcurl
wget https://curl.haxx.se/download/curl-7.60.0.tar.gz
tar zxf curl-7.60.0.tar.gz
cd curl-7.60.0
./configure --prefix=/usr
make && make install
cd ..
7、编译zlib
wget http://down.whsir.com/downloads/zlib-1.2.11.tar.gz
tar zxf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure --prefix=/usr
make && make install
echo "export PKG_CONFIG_PATH=/usr/lib/pkgconfig" >> ~/.bashrc
source ~/.bashrc
cd ..
8、最后下载编译transmission
wget http://down.whsir.com/downloads/transmission-2.94.tar.xz
tar xf transmission-2.94.tar.xz
cd transmission-2.94
./configure
make && make install
9、初始化transmission配置文件,-g是指定transmission配置文件路径
transmission-daemon -g /usr/local/transmission
10、停止transmission(想要修改transmission配置,一定要先停止)
killall transmission-daemon
11、修改transmission配置文件
更多配置文件解释看这篇文章:
https://www.haibakeji.com/archives/213.html
vi /usr/local/transmission/settings.json
"download-dir": "/sdb/bt/Downloads", 下载完成的保存路径
"incomplete-dir": "/sdb/bt/tmp", 未下载完成的保存路径
"incomplete-dir-enabled": false, 启用未下载完成的保存路径
"rpc-authentication-required": true, 远程控制验证,默认关闭
"rpc-password": "haibakeji", 默认密码这里是加密的,启动后会自动加密
"rpc-port": 9091, 网页GUI的端口号,可自行修改
"rpc-username": "haibakeji", 远程电脑登录网页GUI的用户名称
"rpc-whitelist": "127.0.0.1", 允许远程连接的IP地址白名单,支持通配符,多个IP以逗号分隔
"rpc-whitelist-enabled": false, 启用IP认证模式,如果启用,那么只能在白名单的地址才能连接
12、修改后使用新配置运行
transmission-daemon -g /usr/local/transmission
13、打开浏览器输入
http://你的IP地址:9091
例:http://192.168.0.79:9091
如果打不开,请检查防火墙及selinux默认web的路径/usr/local/share/transmission/web
14、最后进行汉化
此汉化包来自于“栽培者”,github地址:https://github.com/ronggang/transmission-web-control,在此感谢作者的汉化
14.1 下载自动汉化脚本
wget https://github.com/ronggang/transmission-web-control/raw/master/release/install-tr-control-cn.sh
14.2 运行脚本,选择自动汉化
bash install-tr-control-cn.sh
如果命令成功执行,将出现以下界面:
按照提示,输入相应的数字,按回车即可。
14.3 汉化完成,登陆查看新界面
PS:如需开机启动transmission,请执行以下命令:
echo "transmission-daemon -g /usr/local/transmission" >> /etc/rc.local
教程参考
https://blog.whsir.com/post-2881.html