PS:在Centos环境下搭建Transmission2.92最新版,这可能是目前全网唯一一份最新最全最完整的Transmission教程了……
当前实验环境:Centos6.9 64(Centos7.3测试过也没有问题,其他版本自测),关闭selinux,关闭iptables(或自行开放iptables port)
安装所需依赖(依赖详见https://github.com/transmission/transmission/wiki/Building-Transmission)
1 2 |
yum groupinstall -y 'development tools' yum -y install gcc gcc-c++ m4 make automake libtool gettext openssl-devel |
开始编译一些依赖,注意以下编译顺序不能错,都是一环套一环的,所有源码我都是下载到/usr/src目录下,编译后自行cd目录,所有源码包都是传到了我的服务器上,所有包都是从官网下载,如果介意请自行从官方网站下载,make的时候如果没有错误在进行make install。
1 |
cd /usr/src |
编译libevent
1 2 3 4 5 6 |
wget https://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 |
编译expat
1 2 3 4 5 6 |
wget https://down.whsir.com/downloads/expat-2.1.0.tar.gz tar zxf expat-2.1.0.tar.gz cd expat-2.1.0 ./configure --prefix=/usr make make install |
编译XML-Parser
1 2 3 4 5 6 |
wget https://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 |
如果在perl Makefile.PL这步显示下面错误
Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 2.
BEGIN failed--compilation aborted at Makefile.PL line 2.
安装yum -y install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker后在执行perl Makefile.PL
编译intltool
1 2 3 4 5 6 |
wget https://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 |
编译libcurl
1 2 3 4 5 6 |
wget https://down.whsir.com/downloads/curl-7.54.0.tar.gz tar zxf curl-7.54.0.tar.gz cd curl-7.54.0 ./configure --prefix=/usr make make install |
编译zlib
1 2 3 4 5 6 |
wget https://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 |
修改/root/.bashrc文件
1 2 |
echo "export PKG_CONFIG_PATH=/usr/lib/pkgconfig" >> ~/.bashrc source ~/.bashrc |
最后开始编译transmission2.92
1 2 3 4 5 6 |
wget https://down.whsir.com/downloads/transmission-2.92.tar.xz tar xf transmission-2.92.tar.xz cd transmission-2.92 ./configure make make install |
初始化transmission配置文件,-g是指定transmission配置文件路径
1 |
transmission-daemon -g /usr/local/transmission |
停止
1 |
killall transmission-daemon |
如果没有killall命令,安装工具包
1 |
yum -y install psmisc |
修改transmission配置文件(更多配置文件解释看这篇文章:https://blog.whsir.com/post-1182.html)
1 2 3 4 5 6 7 8 9 10 11 |
vi /usr/local/transmission/settings.json "download-dir": "/sdb/bt/Downloads", 下载完成的保存路径 "incomplete-dir": "/sdb/bt/tmp", 未下载完成的保存路径 "incomplete-dir-enabled": true, 启用未下载完成的保存路径 "rpc-authentication-required": true, 远程控制验证,默认关闭 "rpc-password": "whsir", 默认密码这里是加密的,启动后会自动加密 "rpc-port": 9091, 网页GUI的端口号,可自行修改 "rpc-username": "whsir", 远程电脑登录网页GUI的用户名称 "rpc-whitelist": "127.0.0.1", 允许远程连接的IP地址白名单,支持通配符,多个IP以逗号分隔 "rpc-whitelist-enabled": false, 启用IP认证模式,如果启用,那么只能在白名单的地址才能连接 |
修改后使用新配置运行Transmission
1 |
transmission-daemon -g /usr/local/transmission |
打开浏览器输入
http://你的IP地址:9091
例:http://192.168.0.79:9091
如果打不开,请检查防火墙及selinux
web的路径/usr/local/share/transmission/web
更多关于Transmission请看:https://blog.whsir.com/post-category/linux/transmission
原文链接:Transmission2.92最新版完整编译安装过程,转载请注明来源!
太棒了,解决了困扰了我好几个星期的问题,赞一个,centos5.8系统测试通过~
wget http://down.whsir.com/downloads/transmission-2.92.tar.xz
tar xf transmission-2.92.tar.gz
应该把 transmission-2.92.tar.gz 改为 transmission-2.92.tar.xz
谢谢提醒,已更正
请问是什么原因造成的
可参考我写的这篇文章https://blog.whsir.com/post-1275.html
./libtransmission.a(natpmp.o): In function
tr_natpmpPulse':
evutil_inet_ntop'/usr/src/transmission-2.92/libtransmission/natpmp.c:137: undefined reference to
collect2: ld returned 1 exit status
make[1]: *** [bitfield-test] Error 1
make[1]: Leaving directory `/usr/src/transmission-2.92/libtransmission'
make: *** [all-recursive] Error 1
此报错是因为没有libiconv