linux系统BT服务器搭建

来源:互联网 发布:js获取button按钮的值 编辑:程序博客网 时间:2024/04/25 11:59
linux 系统BT服务器搭建
1.安装bittorrent
    sudo apt-get install bittorrent

2.配置启动BT
    bttrack --port 6969 --dfile dstate >/dev/null 2>&1 &
         
3.将提供下载的文件制作成种子
    btmakemetafile [文件名/文件夹] http://www.mydomain.com:6969/announce
    ----www.mydomain.com是Linux服务器的域名(eg:http://172.29.10.114:6969/announce)

4.配置Web服务器
    (1) 安装Apache(下载网址http://httpd.apache.org)
       tar -zxvf httpd-2.2.29.tar.gz
       ./configure --prefix=/usr/local/apache --enable-so
       make
       sudo make install
    (2) sudo apt-get install apache2
    (3) Apache的配置文件httpd.conf(/url/local/apache/conf/httpd.conf),添加  
        AddType application/x-bittorrent .torrent
        ServerName  localhost:80
    (4) 重启Web服务
        sudo killall apache2
        sudo killall httpd
        sudo /usr/local/apache/bin/apachectl start

5.将制作的种子与原文件放在Web服务器的文档目录中以供用户下载
    服务器文档目录/usr/local/apache/htodocs

6.启动一个Downloader(最原始的共享源),使以后的用户可以获得最初的拷贝
    (1) btdownloadheadless.py --url http://www.mydomain.com/dahuaxiyou.avi.torrent --saveas dahuaxiyou.avi
    (2) btlaunchmany [Web服务器的文档目录路径]

0 0
原创粉丝点击