简介
最近喜欢玩PT,因为切换到linux下面,所以需要找一个PT客户端,在网上查了一下资料,
发现Transmission是最合适的.在此介绍一下安装方法..
系统推荐使用Debian 9,自带BBR加速,关于BBR可以看我上一篇文章,BBR设置
如使用CentOS,请把apt-get 换成yum
Transmission 安装过程
1 首先使用系统自带的工具进行安装
apt-get install transmission-daemon
2 其次停止服务
service transmission-daemon stop
3 对配置文件进行修改
vim /etc/transmission-daemon/settings.json //修改DHT关闭 “dht-enabled”: false, //修改下载路径 “download-dir”: “/home/transmission/downloads”, //修改加密模式 “encryption”: 2, //修改缓存目录 "incomplete-dir": "/home/transmission/tmp", //修改自定义登录密码 “rpc-password”: “test”, //修改自定义登录账号 修改自定义账号“rpc-username”: “test”, //修改白名单模式 “rpc-whitelist-enabled”: false,
3 建立下载文件夹
service transmission-daemon stop mkdir -p /home/transmission/downloads mkdir -p /home/transmission/tmp cd /home chmod -R 777 transmission/ //xxx为你使用的用户名,很多下载失败基本上是权限问题 chgrp -R xxx transmission/
4 WEB端搭建
Transmission 有web页面,使用起来比较方便。
git项目地址 Transmission-web-control
cd /usr/share/transmission/web mv index.html index.original.html wget https://github.com/ronggang/transmission-web-control/raw/master/release/src.tar.gz tar -xzvf src.tar.gz
确认解压出的web端放在 web 下面就可以了。
5 重启服务
service transmission-daemon start
nginx 安装过程
上节提到用到web端,因为安装了web端,所以需要代理服务器把web跑起来,在这里推荐nginx.
1 使用系统工具进行安装
apt-get install nginx
2 对nginx进行配置
apt-get install nginx cp /etc/nginx/conf.d/ //xxx为自己取的名字 vim xxx.conf server { //yourdomain 你的域名 server_name yourdomain; //开启ssl,需要证书和密钥,如果不打算开启,可以无视下面三行 ssl on; ssl_certificate /etc/letsencrypt/live/cert.pem; ssl_certificate_key /etc/letsencrypt/live/privkey.pem; location / { proxy_pass http://localhost:9091; } }
3 重启nginx
nginx stop nginx start
4 域名指向服务器地址后,便可以使用域名进行访问了
种子制作
Transmission 使用 transmission-create 进行种子制作
可以用 transmission-create -h 查看帮助选项
aq:~$ transmission-create -h Usage: transmission-create [options]Options: -h --help Display this help page and exit -p --private Allow this torrent to only be used with the specified tracker(s) -o --outfile Save the generated .torrent to this filename -s --piecesize Set how many KiB each piece should be, overriding the preferred default -c --comment Add a comment -t --tracker Add a tracker's announce URL -V --version Show version number and exit //按照上面的说明 //其中-p和-o必须加上,xxxx.torrent 是想要生成的种子文件, xxxx/ 为文件夹或者文件 ./transmission-create -p -o /xxx.torrent -t https://tp.m-team.cc/announce.php -s 2048 xxxx/
这样种子就生成好了,然后把生成的种子,上传到PT站即可。
Comment