CentOS下安装BT下载软件transmission
1.安装transmission的依赖包
yum -y install gcc gcc-c++ m4 make automake libtool gettext openssl-devel pkgconfig perl-libwww-perl perl-XML-Parser curl curl-devel vsftpd libevent-devel libevent libidn-devel zlib-devel
2.安装intltool
cd /tmp wget http://ftp.gnome.org/pub/gnome/sources/intltool/0.40/intltool-0.40.6.tar.gz tar zxvf intltool-*.tar.gz cd intltool-* ./configure --prefix=/usr make make install
3.安装libevent,并配置pkg-config
wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz tar -zxvf libevent-2.0.21-stable.tar.gz cd libevent-2.0.21-stable ./configure --prefix=/usr make make install
添加环境变量
vi /etc/profile
在该文件最后加入:
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
4.安装transmission
wget http://download-origin.transmissionbt.com/files/transmission-2.77.tar.bz2 tar -xvf transmission-2.77.tar.bz2 cd transmission-2.77/ ./configure --prefix=/usr make && make install
5.添加新用户来运行transmission
useradd -mr transmission chmod g+rwx /home/transmission
6.创建init行脚本,用于运行Transmission(直接注册为服务,方便使用service xxxxx start|stop|restart)
wget -O /etc/init.d/transmissiond http://pastie.org/pastes/962731/download chmod 755 /etc/init.d/transmission
7.设置开机自启
chkconfig --add transmissiond chkconfig --level 345 transmissiond on
8.设置transmission
service transmissiond start
输入以上命令后会出现[OK],并自动生成配置文件,此时输入以下命令停止transmission(transmission结束时会覆盖配置文件,不停止就编辑的话是无效的.....)
service transmissiond stop
同样也会出现[OK],输入下面的命令编辑配置文件(settings.json)
vi /home/transmission/.config/transmission/settings.json
配置文件部分详解~
"rpc-authentication-required": true, //开启web登录验证
"rpc-enabled": true, //开启web端操作
"rpc-password": "{e62f5ae3a1df1563049deeee1f2e4ebe4dc7106dSJFoVuEb", //web端登录密码(已加密),修改后自动加密,可以直接修改
"rpc-port": 9091, //web端登录端口
"rpc-username": "username", //web端登录用户名
"rpc-whitelist": "127.0.0.1", //登录IP白名单
"rpc-whitelist-enabled": false, //登录验证IP,安装后默认开启,记得关闭,或者设置IP白名单
web端登录地址为: http://IP:端口,如http://127.0.0.1:9091,之后输入帐号密码即可