1. 首页
  2. 服务器

如何在Centos 7和Debian上安装Transmission Torrent客户端

传输是一种很好的轻量级bittorrent。在这篇文章中,我提供了有关如何在centos和debian服务器上设置Transmission torrent客户端的说明。

CENTOS 7

步骤1-安装EPEL套件

yum install epel-release
yum -y update

第2步-为CentOS 7安装Torrent客户端传输

yum install transmission-daemon

第3步-编辑配置和权限

开始传输然后停止它以编辑config json

systemctl start transmission-daemon.service
systemctl stop transmission-daemon.service
vim /var/lib/transmission/.config/transmission-daemon/settings.json

编辑默认设置

"dht-enabled": false,
"encryption": 2,
"rpc-password": "mypassword",
"rpc-username": "myusername",
"rpc-whitelist-enabled": false,
"download-dir": " /home/wwwroot/pt",

开始发射

systemctl start transmission-daemon.service

创建下载文件夹并授予权限

mkdir -p /home/wwwroot/pt
chmod -R 755 /home/wwwroot/pt
chown -R transmission /home/wwwroot/pt
chgrp -R transmission /home/wwwroot/pt

享受

第4步-(可选)NGINX反向代理,用于安全传输Web界面

server {
listen 80;
server_name yourdomin.com;
return 301 https://$host$request_uri;
}
server {
listen 443;
server_name yourdomin.com;
root /usr/share/transmission/web;
ssl_certificate /usr/local/nginx/conf/vhost/xxx.pem;
ssl_certificate_key /usr/local/nginx/conf/vhost/xxx.key;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
location / {
proxy_read_timeout 300;
proxy_pass_header X-Transmission-Session-Id;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
if you changed the port number for transmission daemon, then adjust the
folllowing line
proxy_pass http://127.0.0.1:9091/transmission/web/;
}
Also Transmission specific
location /rpc {
proxy_pass http://127.0.0.1:9091/transmission/rpc;
}
location /upload {
proxy_pass http://127.0.0.1:9091/transmission/upload;
}
}

德比安

第1步-为Debian安装Torrent客户端传输

apt-get update
apt-get install transmission-daemon -y

第2步-编辑配置和权限

停止传输以进行配置文件编辑

/etc/init.d/transmission-daemon stop
vim /var/lib/transmission-daemon/info/settings.json

编辑默认设置

"dht-enabled": false,
"encryption": 2,
"rpc-password": "mypassword",
"rpc-username": "myusername",
"rpc-whitelist-enabled": false,
"download-dir": " /home/wwwroot/pt",

创建下载文件夹并授予权限

mkdir -p /home/wwwroot/pt
chmod -R 755 /home/wwwroot/pt
chown -R debian-transmission /home/wwwroot/pt
chgrp -R debian-transmission /home/wwwroot/pt

开始传播并享受

/etc/init.d/transmission-daemon start

原创文章,作者:cheshirex,如若转载,请注明出处:https://www.homedt.net/20444.html

联系我们

联系QQ:28575315