内容简介:利用vps搭建BT离线下载
在vps的选取上应该注意以下几点:
- 硬盘足够大,如果你选个只有5G硬盘大小的vps,估计你也下不了什么;
- vps提供商允许bt ,这点很重要,部分国家对版权问题零容忍。在购买vps前一定要仔细看看TOS,看是否允许BT下载;
这里我选择了 ramnode 的vps
ramnode的 Acceptable Use Policy
中有写有:
The following are acceptable uses provided they comply with the rest of this AUP:
* IRC*
* Source games+
* Minecraft servers+
* VPN
* Adult material
* Video streaming
* Torrents (Only allowed in US locations - must be limited to 20Mbps total)
* Usenet (Must be limited to 20Mbps total)
*Any usage which results in any attacks against RamNode the company (not just the client’s VPS) may result in suspension and/or termination.
+Game servers are not allowed on Massive plans (CVZ and CKVM).
倒数第二条,写道: 在美国的vps允许限速20M的Torrents
所以我就选择了 ramnode ,80G硬盘大小的openvz构架vps
2.BT软件安装
BT客户端为 deluge
,deluge提供了 web-ui 管理,方便管理操作
ubuntu上使用PPA的方式安装:
sudo add-apt-repository ppa:deluge-team/ppa
sudo apt-get update
sudo apt-get install deluge deluge-web
安装完成后通过启动 deluge
:
deluge-web --ssl -p 8080 &
这里 --ssl
指开启ssl访问, 8080
是指访问端口,这时只需要访问 https://ip:8080
就可以看到 deluge
的web管理界面了,deluge的 默认密码 为 deluge
,进入后记得 及时修改密码
然后连接deluge服务:
到这里BT服务端基本就搭建完毕了, 记得给deluge的上传和下载限速20M
测试了下,下载速度还是蛮不错的,有2MiB/s
3.web服务搭建
BT下载平台搭建好后就可以随意下载BT文件了,但是怎么取回啦?
最方便的就是通过http服务了,打开网页就可以看到下载好的文件,直接点击就可以下载。从bt下载到文件的取回全都是通过web服务操作,是不是很方便啦
首先我选取的web服务软件是 lighttpd
sudo apt-get install lighttpd
这里我启用了 https+密码认证 模式,防止潜在的版权问题发生
修改 /etc/lighttpd/lighttpd.conf
的配置文件为:
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
# "mod_rewrite",
"mod_auth",
)
server.document-root = "/var/www/"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
# server.port = 80
# server.bind = "0.0.0.0"
server.dir-listing = "enable"
$SERVER["socket"] == "0.0.0.0:443" {
ssl.engine = "enable"
ssl.pemfile = "pem结尾的证书"
server.name = "域名"
}
$SERVER["socket"] == "[::]:443" {
ssl.engine = "enable"
ssl.pemfile = "pem结尾的证书"
server.name = "域名"
}
# http自动跳转到https
$SERVER["socket"] == ":80" {
$HTTP["host"] =~ ".*" {
url.redirect = (".*" => "https://%0$0")
}
}
$SERVER["socket"] == "[::]:80" {
$HTTP["host"] =~ ".*" {
url.redirect = (".*" => "https://%0$0")
}
}
index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
# default listening port for IPv6 falls back to the IPv4 port
## Use ipv6 if available
#include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
dir-listing.encoding = "utf8"
# 开启密码认证,同时在最前面的server.modules中加入mod_auth
# 如果不需要密码认证,把下面的代码删除即可
auth.debug = 0
auth.backend = "plain"
auth.backend.plain.userfile = "/etc/lighttpd/auth"
auth.require = ( "/" =>
(
"method" => "basic",
"realm" => "Password protected area",
"require" => "user=bt"
)
)
/etc/lighttpd/auth为密码认证文件位置,格式为 账号:密码 ,例如: root:admin
完成配置后,用 service lighttpd restart
命令重启lighttpd服务
最后,配置deluge下载路径为 /var/www/
最后访问 https://ip
后即可下载bt下载好的文件
下载速度相当快
以上所述就是小编给大家介绍的《利用vps搭建BT离线下载》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:- 利用 MinIO 轻松搭建静态资源服务
- 每日一博 | 利用 Docker 快速搭建 Oracle 开发环境
- centos7下利用yum搭建LAMP环境
- 利用webpack搭建脚手架一套完整流程
- 利用tinyproxy在Linux上搭建HTTP Proxy Server
- 利用Nginx轻松搭建高性能负载均衡服务器集群
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Distributed Algorithms
Nancy A. Lynch / Morgan Kaufmann / 1996-3-15 / USD 155.00
In "Distributed Algorithms", Nancy Lynch provides a blueprint for designing, implementing, and analyzing distributed algorithms. She directs her book at a wide audience, including students, programmer......一起来看看 《Distributed Algorithms》 这本书的介绍吧!