Ubuntu Server 10.4 使用经历(三)之 Transmission

心血来潮,很想知道Ubuntu Server下能不能装个BT Client,注意只是下载客户端,不是服务器。

上网搜搜相关内容,让我看到了transmission这个软件。下面总结一下其在Ubuntu中安装过程。

目标:实现Ubuntu Server 10.4 下的 bittorrent 下载

系统环境:

Ubuntu Server 10.4

Windows 7

Putty 远程访问安装

Transmission https://launchpad.net/transmission

 

1. 由于是第三方软件,需要添加新的sources

sudo vi /etc/apt/sources.list

添加如下内容:

#Unofficial Transmission repositry
#
from https://launchpad.net/~transmissionbt/+archive/ppa?field.series_filter=lucid
deb http://ppa.launchpad.net/transmissionbt/ppa/ubuntu lucid main
deb
-src http://ppa.launchpad.net/transmissionbt/ppa/ubuntu lucid main

注:由于10.4的代号为 lucid 所以地址源如上,如果使用其他版本请自己调整

 

2. 安装第三方软件密钥

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 365C5CA1

 

密钥在网站可以找到,这个直接添加就好

 

3.现在可以安装软件了,先更新一下源,然后安装

sudo apt-get update
sudo apt
-get install transmission-daemon

安装transmission-deamon时 会自动安装另两个软件包transmission-cli transmission-common,应该没有记错,如果没有安装请自行补上

通过aptitude search transmission 命令查看,如下:

i A transmission-cli - lightweight BitTorrent client (command line interface)
i A transmission
-common - lightweight BitTorrent client (common files)
i transmission
-daemon - lightweight BitTorrent client (daemon)

现在安装好,其实已经可以用了,在此之前我们简单配置一下

 

4.配置transmission

sudo service transmission-daemon reload

看看服务是否正常。补充:这一步很关键,如果不reload,直接restart,后面修改的json内容将被还原,最近才发现,呵呵~~

修改配置文件,困惑的地方来了

sudo vi /var/lib/transmission-daemon/info/settings.json

为什么这么说,原先以为这个文件在/etc/transmission-daemon/settings.json,折腾了半天都没有搞定,后来发现不在那里。

info目录使用sudo权限也不能访问,这个我没有搞懂,有谁知道,告诉我一声

文件内容如下:

{
"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": false,
"dht-enabled": true,
"download-dir": "/srv/samba/downloads",
"encryption": 1,
"incomplete-dir": "/srv/samba/downloads",
"incomplete-dir-enabled": false,
"lazy-bitfield-enabled": true,
"lpd-enabled": false,
"message-level": 2,
"open-file-limit": 32,
"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": 0,
"pex-enabled": true,
"port-forwarding-enabled": true,
"preallocation": 1,
"proxy": "",
"proxy-auth-enabled": false,
"proxy-auth-password": "",
"proxy-auth-username": "",
"proxy-enabled": false,
"proxy-port": 80,
"proxy-type": 0,
"ratio-limit": 2.0000,
"ratio-limit-enabled": false,
"rename-partial-files": true,
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "111111",
"rpc-port": 9091,
"rpc-username": "111111",
"rpc-whitelist": "127.0.0.1,*.*.*.*",
"rpc-whitelist-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"speed-limit-down": 100,
"speed-limit-down-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,
"upload-slots-per-torrent": 14
}

我只修改了下载的默认路径和用户名身份验证和rpc-whitelist,其他都默认,一部分配置内容可以在今后web页面中修改,比较容易懂。

其中rpc-password一项,你输入的时候是明文,通过运行

sudo service transmission-daemon restart

后,password一项内容就变为SHA1加密内容了。所以配置完后记得restart服务

rpc-whitelist为可以访问本程序的ip地址列表,我改为了全部,便于其它电脑连接。

其中的下载目录,是我之前配置的samba的共享目录中的一个,所以这样在Ubuntu服务器上下载完后,windows就可以直接访问拷贝了,很方便。

其他内容请根据自己情况自行修改。

 

5.web访问与remote-client访问

web访问很简单,在任何一台可以连接服务器的计算机上,在web browser中输入 http://<IP>:9091 其中<ip>为你的Ubuntu Server的网络地址

页面会提示用户名密码,然后跳转到http://<IP>:9091/transmission/web/下,这就可以通过web进行控制了。

当然也可以使用remote-client http://code.google.com/p/transmisson-remote-gui/

这样更加方便,并且使用起来感觉刚好,安装后配置服务器地址和端口等信息,就可以直接连接。

Windows 7 64bit下运行正常。

 

好了,大功告成,断断续续用了一天的时间搞定,这样Ubuntu Server没有图形界面也可也下载BT了,感觉这样的使用很爽,呵呵。

继续学习android,这个更新有点耽误了~

posted @ 2010-07-06 19:07  Ginoz  阅读(4023)  评论(0)    收藏  举报