安装Transmission
apt install transmission-daemon
配置Transmission
先停止Transmission
systemctl stop transmission-daemon.service
然后编辑配置文件/var/lib/transmission-daemon/info/settings.json
nano /var/lib/transmission-daemon/info/settings.json
重点需要修改的地方
"rpc-password": "管理密码", #web-ui的密码,可直接修改,重新运行或者reload服务的时候会自动被加密
"rpc-port": 9091,
"rpc-url": "/transmission/",
"rpc-username": "用户名", #用户名
"rpc-whitelist": "127.0.0.1",
"rpc-whitelist-enabled": false, #如果你要让其他网段连入,请设false
对照表
"alt-speed-up": 500, #计划时段上传限速值
"alt-speed-down": 500, #计划时段下载限速值
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": true, #启用计划工作,为false时,以上计划配置则不生效
"alt-speed-time-end": 420, #计划结束时间,为零点到开始时间的分钟数,比如7:00就是7*60=420。另外,该时间是用的GMT时间,即北京时间-8小时。比如你计划北京时间7点30分开始,这个数字应该是(7-8+24)*60+30=1410
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": true,
"blocklist-updates-enabled": false,
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 4, #缓存大小,以MB为单位,建议设大一些,避免频繁读写硬盘而伤硬盘,建议设为内存大小的1/6~1/4
"compact-view": false,
"dht-enabled": false, #关闭DHT(不通过tracker寻找节点)功能,不少PT站的要求,但BT下载设置为true会使得下载更好
"download-dir": "/home/yys/Downloads", #下载的内容存放的目录
"download-queue-enabled": true,
"download-queue-size": 5,
"encryption": 1, #0=不加密,1=优先加密,2=必须加密
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
"incomplete-dir": "/home/yys/Downloads",
"incomplete-dir-enabled": false,
"inhibit-desktop-hibernation": true,
"lpd-enabled": false, #禁用LDP(本地节点发现,用于在本地网络寻找节点),不少PT站的要求
"main-window-height": 500,
"main-window-is-maximized": 0,
"main-window-width": 615,
"main-window-x": 337,
"main-window-y": 211,
"message-level": 2,
"open-dialog-dir": "/home/yys/\u684c\u9762",
"peer-congestion-algorithm": "",
"peer-limit-global": 240, #全局连接数
"peer-limit-per-torrent": 60, #每个种子最多的连接数
"peer-port": 51413, #预设的port口
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": false, #不建议改为true
"peer-socket-tos": "default",
"pex-enabled": false, #禁用PEX(节点交换,用于同已与您相连接的节点交换节点名单),不少PT站的要求
"port-forwarding-enabled": true,
"preallocation": 1, #预分配文件磁盘空间,0=关闭,1=快速,2=完全。建议取1开启该功能,防止下载大半了才发现磁盘不够。取2时,可以减少磁盘碎片,但速度较慢。
"prefetch-enabled": 1,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 30,
"ratio-limit": 2,
"ratio-limit-enabled": false,
"rename-partial-files": true, #在未完成的文件名后添加后缀.part,false=禁用
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "{c8c083168db9fff40b5136b6d0f3f4a864110a78\/oH51JaE", #web-ui的密码,可直接修改,重新运行或者reload服务的时候会自动被加密
"rpc-port": 9091, #默认web-ui的port口,可自行更改
"rpc-url": "/transmission/",
"rpc-username": "transmission", #默认登入名称
"rpc-whitelist": "127.0.0.1",
"rpc-whitelist-enabled": true, #如果你要让其他网段连入,请设false
"scrape-paused-torrents-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "/home/yys",
"seed-queue-enabled": false,
"seed-queue-size": 10,
"show-backup-trackers": true,
"show-extra-peer-details": false,
"show-filterbar": true,
"show-notification-area-icon": false,
"show-options-window": true,
"show-statusbar": true,
"show-toolbar": true,
"show-tracker-scrapes": true,
"sort-mode": "sort-by-age",
"sort-reversed": false,
"speed-limit-down": 300, #平时的下载限速
"speed-limit-down-enabled": true, #启用平时下载限速
"speed-limit-up": 30, #平时上传限速
"speed-limit-up-enabled": true, #启用平时上传限速
"start-added-torrents": false,
"statusbar-stats": "total-ratio",
"torrent-added-notification-enabled": true,
"torrent-complete-notification-enabled": true,
"torrent-complete-sound-enabled": true,
"trash-can-enabled": true,
"trash-original-torrent-files": false,
"umask": 18,
"upload-slots-per-torrent": 14
"utp-enabled": true, #启用μTP协议
"watch-dir": "/home/yys/\u4e0b\u8f7d",
"watch-dir-enabled": false
更多配置参数,可去 diting-Configuration-Files探索。
保存修改后设置开机自动启动
systemctl enable transmission-daemon
systemctl start transmission-daemon.service
WebUI美化
安装transmission-web-control进行美化
wget https://github.com/ronggang/transmission-web-control/raw/master/release/install-tr-control-cn.sh
chmod +x install-tr-control-cn.sh
bash install-tr-control-cn.sh
按照提示,输入相应的数字,按回车即可
管理Transmission
service transmission-daemon stop
service transmission-daemon start
通过浏览器访问 http://IP:9091 WEBUI管理使用
制作种子
find / -name transmission-create
寻找transmission安装目录
transmission-create
获得参数说明帮助
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 <file> Save the generated .torrent to this filename
-s --piecesize <size in KiB> Set how many KiB each piece should be, overriding
the preferred default
-c --comment <comment> Add a comment
-t --tracker <url> Add a tracker's announce URL
-V --version Show version number and exit
参数说明:
- -p 表示这是私用的种子,这个 PT 必须要加上
- -o 生成的种子输出位置,不要忘记把名字打上
- -t tracker 服务器地址,自行查询各大站点
- -s 每个文件块的大小,单位是 KB,设置的 4096,也就是 4M
- 最后空一格写源文件的位置,也就是文件的存放位置,可以是一个文件或者一整个目录
示范
transmission-create -p -o /种子输出目录/种子文件名.torrent -t https://pt.m-team.cc/announce.php -s 4096 /要做种的文件目录/文件名
文件的命名里不要出现空格,会生成错误的文件
发布种子
- 将制作好的种子文件.torrent发布到相关PT站点
- 请不要将视频移动、改名、删除,可以让更多人下载到这个种子。
- 上传种子后一定要下载网站的新种子文件,然后选择资源的上级目录,开始做种。
- 网站会统计每一个用户的下载量和上传量,下载量和上传量在一定程度上决定着用户的等级,有没有权限下载文件。每一个用户注册后会得到一个passkey,用户从网站里面下载的种子里面包含了私人的passkey。通过passkey识别每一个用户,统计每一个用户的下载、上传和做种时间等等。