全球主机交流论坛

标题: CentOS下transmission一键脚本 [附使用方法] [打印本页]

作者: smiler    时间: 2010-11-21 22:18
标题: CentOS下transmission一键脚本 [附使用方法]
挂BT(PT)利器。
自用的脚本,共享一下。

使用方法:
transmission-daemon -a *.*.*.* -b -m -p 9111 -P 51111 -w /home/bt -t -u admin -v admin

-a *.*.*.* :是允许访问web管理的IP,*.*.*.* 是所有IP,还可以是 192.168.1.* 之类的。
-b 打开peer服务器列表
-m 打开NAT-PMP 或 UPnP
-p web服务器的端口
-P peer端口默认是51413
-w 下载文件的默认存储路径
-t 打开web页面的密码验证
-u web 的用户名
-v web 的密码

以上命令启动后就可以使用 http://www.yourdomain.com:9111 访问到transmission的Web界面了。

使用 transmission-daemon --help 可以看到所有参数信息

用root用户启动后会有配置文件位于 /root/.config/transmission-daemon/settings.json
相关设置可参见官方文档 https://trac.transmissionbt.com/wiki/ConfigFiles

注:transmission非常好用,不过为了大家VPS的稳定,请尽量不要用在VPS上。我是用在自己家里的老爷机上挂PT的
  1. #!/bin/bash

  2. yum -y update
  3. yum -y install gcc gcc-c++ m4 make automake libtool gettext openssl-devel perl-XML-Parser

  4. wget -c http://download.transmissionbt.com/files/transmission-2.12.tar.bz2
  5. wget -c http://pkgconfig.freedesktop.org/releases/pkgconfig-0.18.tar.gz
  6. wget -c http://curl.haxx.se/download/curl-7.21.2.tar.gz
  7. wget -c http://ftp.gnome.org/pub/gnome/sources/intltool/0.40/intltool-0.40.6.tar.gz
  8. wget -c http://monkey.org/~provos/libevent-1.4.14b-stable.tar.gz


  9. tar zxvf pkgconfig-0.18.tar.gz
  10. cd ./pkgconfig-0.18
  11. ./configure
  12. make && make install

  13. cd ..

  14. tar zxvf curl-7.21.2.tar.gz
  15. cd ./curl-7.21.2
  16. ./configure
  17. make && make install

  18. cd ..

  19. tar zxvf intltool-0.40.6.tar.gz
  20. cd ./intltool-0.40.6
  21. ./configure
  22. make && make install

  23. cd ..

  24. tar zxvf libevent-1.4.14b-stable.tar.gz
  25. cd ./libevent-1.4.14b-stable
  26. ./configure
  27. make && make install

  28. cd ..

  29. tar jxvf transmission-2.12.tar.bz2
  30. cd ./transmission-2.12
  31. ./configure
  32. make && make install

  33. cd ..

  34. clear

  35. if which transmission-daemon
  36. then
  37. echo 'transmission successfully installed. you can use transmission-daemon --help show arguments.'
  38. else
  39. echo 'transmission Install failure!'
  40. fi
复制代码

[ 本帖最后由 smiler 于 2010-11-21 23:09 编辑 ]
作者: walkman660    时间: 2010-11-21 22:20
收藏~
作者: 小夜    时间: 2010-11-21 22:22
顶。
作者: 金满堂    时间: 2010-11-21 22:22
跟mlDonkey比咋样。
作者: hangaj    时间: 2010-11-21 22:23
好东东,收藏了
作者: smiler    时间: 2010-11-21 22:24
标题: 回复 4# 的帖子
不同的,mlDonkey是下电骡的,transmission是下BT的。
作者: 金满堂    时间: 2010-11-21 22:26
标题: 回复 6# 的帖子
貌似也可以下BT。

你的官恩娜刷一次换一次真爽啊.
作者: mikj521    时间: 2010-11-21 22:29
   不会用
作者: mope007    时间: 2010-11-21 22:32
暂时看不懂 顶一下
作者: liheyuan    时间: 2010-11-21 22:44
Transmission是Ubuntu系统自带那个么?
作者: 这位太太    时间: 2010-11-21 22:46
这个我喜欢,标记收藏,上次用84刷了1T+
各位口下留情
作者: yang    时间: 2010-11-21 22:54
你们这些坏蛋,难怪VPS越来越慢了
作者: jiangchunlin    时间: 2010-11-21 22:55
提示: 作者被禁止或删除 内容自动屏蔽
作者: smiler    时间: 2010-11-21 22:58
原帖由 yang 于 2010-11-21 22:54 发表
你们这些坏蛋,难怪VPS越来越慢了


不一定非得用在VPS上啊,是吧。
作者: sunday    时间: 2010-11-21 23:00
唉,这个不好,慢慢地等着悲剧吧,当初大家不愿意大面积share就是为了vps能稳定
作者: sunday    时间: 2010-11-21 23:01
除了 zhihao,我想大部分都是用vps来挂bt的吧
作者: coollyct    时间: 2010-11-21 23:06
看一下,标记起来。
作者: smiler    时间: 2010-11-21 23:06
原帖由 sunday 于 2010-11-21 23:01 发表
除了 zhihao,我想大部分都是用vps来挂bt的吧


我也没有,我是用自己家的机挂BT的。
作者: yywudi    时间: 2010-11-21 23:09
有了迅雷离线下载为啥还要这个捏?
作者: smiler    时间: 2010-11-21 23:11
原帖由 yywudi 于 2010-11-21 23:09 发表
有了迅雷离线下载为啥还要这个捏?


因为迅雷不能下PT(Private Tracker)呀。
作者: mikj521    时间: 2010-11-21 23:14
transmission-daemon: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

作者: skywing    时间: 2010-11-21 23:17
收藏了
作者: yywudi    时间: 2010-11-21 23:18
这玩意儿怎么限制上传速度啊?
下载50k上传500k看的很蛋疼
啥状况?
作者: smiler    时间: 2010-11-21 23:21
原帖由 mikj521 于 2010-11-21 23:14 发表
transmission-daemon: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory


你的curl编译似乎出状况了哦。。
作者: smiler    时间: 2010-11-21 23:22
原帖由 yywudi 于 2010-11-21 23:18 发表
这玩意儿怎么限制上传速度啊?
下载50k上传500k看的很蛋疼
啥状况?


点左下角的齿轮就会看到限速了,旁边那个乌龟就是限速开关。
作者: yywudi    时间: 2010-11-21 23:24
原帖由 smiler 于 2010-11-21 23:22 发表


点左下角的齿轮就会看到限速了,旁边那个乌龟就是限速开关。


多谢
光顾着看上面一排按钮
没发现左下角还藏着两个...
作者: test100    时间: 2010-11-22 11:37
经过1周测试,同样的源  mlDonkey 完胜 transmission ,准备放弃 transmission
作者: ramonde    时间: 2010-11-22 12:14
收藏了,也许会用得着
作者: qiqi13245    时间: 2010-11-22 12:42
搜藏
作者: eudx    时间: 2010-11-26 01:35
保存成.sh运行么?
我运行
transmission-daemon -a *.*.*.* -b -m -p 9111 -P 51111 -w /home/bt -t -u admin -v admin
直接提示一堆HELP
[root@node19 ~]# transmission-daemon -a *.*.*.* -b -m -p 9111 -P 51111 -w /home/bt -t -u admin -v admin
Transmission 2.12 (11412)  http://www.transmissionbt.com/
A fast and easy BitTorrent client

transmission-daemon is a headless Transmission session
that can be controlled via transmission-remote
or the web interface.

Usage: transmission-daemon [options]

Options:
-h   --help                             Display this help page and exit
-a   --allowed              <list>      Allowed IP addresses.  (Default:
                                         127.0.0.1)
-b   --blocklist                        Enable peer blocklists
-B   --no-blocklist                     Disable peer blocklists
-c   --watch-dir            <directory> Where to watch for new .torrent files
-C   --no-watch-dir                     Disable the watch-dir
      --incomplete-dir       <directory> Where to store new torrents until
                                         they're complete
      --no-incomplete-dir                Don't store incomplete torrents in a
                                         different location
-d   --dump-settings                    Dump the settings and exit
-e   --logfile              <filename>  Dump the log messages to this filename
-f   --foreground                       Run in the foreground instead of
                                         daemonizing
-g   --config-dir           <path>      Where to look for configuration files
-p   --port                 <port>      RPC port (Default: 9091)
-t   --auth                             Require authentication
-T   --no-auth                          Don't require authentication
-u   --username             <username>  Set username for authentication
-v   --password             <password>  Set password for authentication
-V   --version                          Show version number and exit
      --log-error                        Show error messages
      --log-info                         Show error and info messages
      --log-debug                        Show error, info, and debug messages
-w   --download-dir         <path>      Where to save downloaded data
      --paused                           Pause all torrents on startup
-o   --dht                              Enable distributed hash tables (DHT)
-O   --no-dht                           Disable distributed hash tables (DHT)
作者: now163    时间: 2010-11-26 09:51
原帖由 eudx 于 2010-11-26 01:35 发表
保存成.sh运行么?
我运行
transmission-daemon -a *.*.*.* -b -m -p 9111 -P 51111 -w /home/bt -t -u admin -v admin
直接提示一堆HELP
[root@node19 ~]# transmission-daemon -a *.*.*.* -b -m -p 9111 -P 51111 - ...

换个端口改成51112




欢迎光临 全球主机交流论坛 (https://fd.vvwvv.eu.org/) Powered by Discuz! X3.4