Linux Centos 系统上安装BT客户端 Transmission
Transmission是一种BitTorrent客户端,特点是一个跨平台的后端和其上的简洁的用户界面,以MIT许可证和GNU通用公共许可证双许可证授权,因此是一款*软件,还被众多linux发行版,包括Ubuntu、Mandriva、Mint、Fedora、Puppy、openSUSE 选作默认BT下载工具;Imageshack的服务使用其技术。
上面已经提到了很多种Linux系统都内置了这软件,可是使用最广的Centos居然无视掉了,情何以堪,只能靠自己了。
首先这个教程极其简单,如果已经是熟悉Linux的,建议编译源码安装,*度更高,毕竟Linux追求的就是*度。
在Linux Centos系统上编译源码安装Transmission的教程推荐这篇。
文中一些基础命令不会详细写出,如果有问题的留言吧。好了,正式开始:
更新历史:
2011/05/02 - 初次发布
2011/05/30 - 更新至版本2.31(官方更新说明),安装过程无改动。
暂停更新
前期准备
- 可选,yum -y remove libevent libevent-devel 先删掉这两个组件,因为有可能安装的时候发生冲突。
- 从这里上对应版本下载全部的一套rpm包到一个目录中,如/tmp。教程使用的是2.22版和32位系统,更多更新可以关注这个博客,也可以从我的GoogleCode里拿,包含最新的软件,已经打包成zip格式,使用时候先解压。
- 导入证书
rpm --import http://geekery.altervista.org/download.php?filename=GEEKERY-GPG-KEY
安装(注意顺序)
1、安装libevent的rpm包
rpm -ivh libevent-2.0.10-1geekery.i386.rpm
Preparing... ########################################### [100%]
1:libevent ########################################### [100%]
Preparing... ########################################### [100%]
1:libevent ########################################### [100%]
2、安装transmission-common的rpm包
rpm -ivh transmission-common-2.22-1geekery.i386.rpm
Preparing... ########################################### [100%]
1:transmission-common ########################################### [100%]
Preparing... ########################################### [100%]
1:transmission-common ########################################### [100%]
3、安装transmission-daemon的rpm包
rpm -ivh transmission-daemon-2.22-1geekery.i386.rpm
Preparing... ########################################### [100%]
1:transmission-daemon ########################################### [100%]
Preparing... ########################################### [100%]
1:transmission-daemon ########################################### [100%]
4、安装transmission-cli的rpm包
rpm -ivh transmission-cli-2.22-1geekery.i386.rpm
Preparing... ########################################### [100%]
1:transmission-cli ########################################### [100%]
Preparing... ########################################### [100%]
1:transmission-cli ########################################### [100%]
5、最后安装transmission的rpm包
rpm -ivh transmission-2.22-1geekery.i386.rpm
Preparing... ########################################### [100%]
1:transmission ########################################### [100%]
Preparing... ########################################### [100%]
1:transmission ########################################### [100%]
配置
1、启动软件,以自动生成默认配置文件。
service transmission-daemon start
Starting transmission-daemon: [ OK ]
Starting transmission-daemon: [ OK ]
2、然后关掉软件,或强行关闭掉,查看进程确保软件完全关闭。
service transmission-daemon stop
killall transmission-daemon
killall transmission-daemon
3、编辑配置文件,有时候位置可能不同,请先用locate命令找下transmission文件夹的位置。
vi /var/lib/transmission/settings.json
下面只标出主要参数的说明,详情可以参考这里
{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": true,
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 4,
"dht-enabled": true, //DHT支持
"download-dir": "/var/lib/transmission/Downloads", //下载完成的保存路径
"encryption": 1,
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
"incomplete-dir": "/var/lib/transmission/Downloads", //未下载完成的保存路径
"incomplete-dir-enabled": false,
"lazy-bitfield-enabled": true,
"lpd-enabled": false,
"message-level": 2,
"open-file-limit": 32,
"peer-congestion-algorithm": "",
"peer-limit-global": 240, //全局种子最大连接数
"peer-limit-per-torrent": 60, //单一种子最大连接数
"peer-port": 51413,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": false,
"peer-socket-tos": "default",
"pex-enabled": true,
"port-forwarding-enabled": true,
"preallocation": 1,
"prefetch-enabled": 1,
"ratio-limit": 2,
"ratio-limit-enabled": false,
"rename-partial-files": true,
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "{096110376f678fa59ac93b4ba2ef383fba6a9edcBELB4tYF", //密码
"rpc-port": 9091, //网页GUI使用的端口
"rpc-url": "/transmission/",
"rpc-username": "", //用户名
"rpc-whitelist": "*.*.*.*",
"rpc-whitelist-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"speed-limit-down": 100,
"speed-limit-down-enabled": false,
"speed-limit-up": 100,
"speed-limit-up-enabled": false,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 18, //这里改为0,可以控制默认下载文件权限为777
"upload-slots-per-torrent": 14 //每个种子上传连接数
}
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": true,
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 4,
"dht-enabled": true, //DHT支持
"download-dir": "/var/lib/transmission/Downloads", //下载完成的保存路径
"encryption": 1,
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
"incomplete-dir": "/var/lib/transmission/Downloads", //未下载完成的保存路径
"incomplete-dir-enabled": false,
"lazy-bitfield-enabled": true,
"lpd-enabled": false,
"message-level": 2,
"open-file-limit": 32,
"peer-congestion-algorithm": "",
"peer-limit-global": 240, //全局种子最大连接数
"peer-limit-per-torrent": 60, //单一种子最大连接数
"peer-port": 51413,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": false,
"peer-socket-tos": "default",
"pex-enabled": true,
"port-forwarding-enabled": true,
"preallocation": 1,
"prefetch-enabled": 1,
"ratio-limit": 2,
"ratio-limit-enabled": false,
"rename-partial-files": true,
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "{096110376f678fa59ac93b4ba2ef383fba6a9edcBELB4tYF", //密码
"rpc-port": 9091, //网页GUI使用的端口
"rpc-url": "/transmission/",
"rpc-username": "", //用户名
"rpc-whitelist": "*.*.*.*",
"rpc-whitelist-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"speed-limit-down": 100,
"speed-limit-down-enabled": false,
"speed-limit-up": 100,
"speed-limit-up-enabled": false,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 18, //这里改为0,可以控制默认下载文件权限为777
"upload-slots-per-torrent": 14 //每个种子上传连接数
}
4、给予下载目录的所有者为transmission:transmission,并启动软件
service transmission-daemon start
Starting transmission-daemon: [ OK ]
Starting transmission-daemon: [ OK ]