全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 7668|回复: 30
打印 上一主题 下一主题

CentOS下transmission一键脚本 [附使用方法]

[复制链接]
跳转到指定楼层
1#
发表于 2010-11-21 22:18:33 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
挂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 编辑 ]

评分

参与人数 5威望 +45 收起 理由
yywudi + 5 精品文章
mikj521 + 5 求使用方法
chipang + 5 精品文章
金满堂 + 10 我很赞同
小夜 + 20 精品文章

查看全部评分

31#
发表于 2010-11-26 09:51:43 | 只看该作者
原帖由 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
30#
发表于 2010-11-26 01:35:33 | 只看该作者
保存成.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)
29#
发表于 2010-11-22 12:42:33 | 只看该作者
搜藏
28#
发表于 2010-11-22 12:14:51 | 只看该作者
收藏了,也许会用得着
27#
发表于 2010-11-22 11:37:36 | 只看该作者
经过1周测试,同样的源  mlDonkey 完胜 transmission ,准备放弃 transmission
26#
发表于 2010-11-21 23:24:39 | 只看该作者
原帖由 smiler 于 2010-11-21 23:22 发表


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


多谢
光顾着看上面一排按钮
没发现左下角还藏着两个...
25#
 楼主| 发表于 2010-11-21 23:22:27 | 只看该作者
原帖由 yywudi 于 2010-11-21 23:18 发表
这玩意儿怎么限制上传速度啊?
下载50k上传500k看的很蛋疼
啥状况?


点左下角的齿轮就会看到限速了,旁边那个乌龟就是限速开关。
24#
 楼主| 发表于 2010-11-21 23:21:37 | 只看该作者
原帖由 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编译似乎出状况了哦。。
23#
发表于 2010-11-21 23:18:35 | 只看该作者
这玩意儿怎么限制上传速度啊?
下载50k上传500k看的很蛋疼
啥状况?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-11-9 07:04 , Processed in 0.065995 second(s), 14 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表