只放一些对自己有用的东西,不喜勿言!哈哈哈哈哈哈哈

How to install rTorrent 0.8.2 and rtgui 0.2.5 linstation ls2

上一篇 / 下一篇  2008-11-12 21:05:20 / 个人分类:电脑技巧

  • 1. 首先安裝必要的 web server 及 php 相關元件,並且在安裝完成後建立一個 phpinfo.php 檔案來測試 php 是否 work


    6N [J:f`sUs-l*t0$ sudo apt-get autoremove钱塘个人空间:F.y&hbGj6z:h f w
    $ sudo apt-get install apache2-mpm-prefork php5 php5-xmlrpc libapache2-mod-scgi钱塘个人空间/z-~0S'^eA(J/by
    $sudo vi /var/www/phpinfo.php

    < ?php
    #K+N_XaaQq(@ w/K0phpinfo();钱塘个人空间 iq3i#Q:AF8KL
    ?>

    http://localhost/phpinfo.php

  • 2. 安裝 rtorrent 並執行 rtorrent 來測試是否能啟動,不過剛安裝完的狀況會如下圖所示,缺少 .rtorrent.rc 檔案

    $ sudo apt-get install rtorrent钱塘个人空间c}N#dNM4QJ J
    $ rtorrent

  • 3. 建立並編輯一個 .rtorrent.rc 檔案在您的家目錄中,若您要以 root 權限執行 rtorrent 則將此檔案放到 root 目錄中,以下紅色標註部份內容請修改為符合自己環境

    $ vi .rtorrent.rc

    # This is an example resource file for rTorrent. Copy to
    +o5OQh1P0A0# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
    B(\*fU @+qS @vE(R0# uncomment the options you wish to enable.

    # Maximum and minimum number of peers to connect to per torrent.
    .T |Y ^-uE0min_peers = 50
    %zW^#eq,v(]D?0max_peers = 500

    # Same as above but for seeding completed torrents (-1 = same as downloading)
    _ z,D%zQ&X(ur0min_peers_seed = 10钱塘个人空间ugR#s7t2Uek*i AP.p
    max_peers_seed = 50

    # Maximum number of simultanious uploads per torrent.钱塘个人空间6jL:?oO}0S
    max_uploads = 3

    encoding_list = UTF-8

    # Global upload and download rate in KiB. “0″ for unlimited.钱塘个人空间*P3}0hC%U#M4V
    download_rate = 0钱塘个人空间&oQ$O#Jd;I3S,}
    upload_rate = 5

    # Default directory to save the downloaded torrents.
    $uH"t2V'{)J~*D0directory = /data/file

    # Default session directory. Make sure you don’t run multiple instance钱塘个人空间fc+v:]M dp
    # of rtorrent using the same session directory. Perhaps using a
    hk@7]!W:^CC0# relative path?钱塘个人空间okP5o'zs;?
    session = /data/session

    # Watch a directory for new torrents, and stop those that have been
    ]ukZ7Ko1T0# deleted.钱塘个人空间6X9eP4d?fdz4U
    schedule = watch_directory,5,5,load_start=/data/file/*.torrent
    &Q~)@*[X0
    #schedule = untied_directory,5,5,stop_untied=

    # Close torrents when diskspace is low.钱塘个人空间8LDVP1Vc1z
    #schedule = low_diskspace,5,60,close_low_diskspace=100M

    # Stop torrents when reaching upload ratio in percent,
    0L;Dh`A1hf)x0# when also reaching total upload in bytes, or when钱塘个人空间7Z6~J vi6UY
    # reaching final upload ratio in percent.
    U3NQhQ3m0# example: stop at ratio 2.0 with at least 200 MB uploaded, or else ratio 20.0钱塘个人空间!F(?V Z}ro!c(cCw
    #schedule = ratio,60,60,”stop_on_ratio=200,200M,2000″

    # The ip address reported to the tracker.钱塘个人空间 @cM:Zh2f ~
    ip = 127.0.0.1
    {KtAnC U0#ip = rakshasa.no

    # The ip address the listening socket and outgoing connections is钱塘个人空间b:W#l6no)]A
    # bound to.钱塘个人空间/y$S:Q9YzA{ jM
    #bind = *

    # Port range to use for listening.
    *dOu }S@ |0port_range = 6890-6999

    # Start opening ports at a random position within the port range.
    0C-P1J8H0AQ0#port_random = no

    # Check hash for finished torrents. Might be usefull until the bug is
    f5s+MW]zBx0# fixed that causes lack of diskspace not to be properly reported.
    3al5e8]-k+xh#k0check_hash = yes

    # Set whetever the client should try to connect to UDP trackers.钱塘个人空间j @:m"V0Ab0^P
    use_udp_trackers = yes

    # Alternative calls to bind and ip that should handle dynamic ip’s.钱塘个人空间Y6FF&@ CA
    #schedule = ip_tick,0,1800,ip=rakshasa钱塘个人空间QS D"Qy;a
    #schedule = bind_tick,0,1800,bind=rakshasa

    # Encryption options, set to none (default) or any combination of the following:钱塘个人空间fGCM0@:NbF L vFL
    # allow_incoming, try_outgoing, require, require_RC4, enable_retry, prefer_plaintext钱塘个人空间/n[-cnObX4|
    #
    $R6d Hv mix0# The example value allows incoming encrypted connections, starts unencrypted
    zA5_)b'IIs!w+k.v U0# outgoing connections but retries with encryption if they fail, preferring钱塘个人空间0l-?9])N-C7`/I M
    # plaintext to RC4 encryption after the encrypted handshake钱塘个人空间'i"S/Fdn
    #
    `wN yja0`O&s R0encryption = allow_incoming,enable_retry,prefer_plaintext

    # Enable DHT support for trackerless torrents or when all trackers are down.
    Y4n-N2VcR0# May be set to “disable” (completely disable DHT), “off” (do not start DHT),钱塘个人空间d }S+F$B
    # “auto” (start and stop DHT as needed), or “on” (start DHT immediately).钱塘个人空间0IE1y~Y cf
    # The default is “off”. For DHT to work, a session directory must be defined.钱塘个人空间A%Y{u4_o e(h
    #
    8qP? mmJ0dht = on

    # UDP port to use for DHT.钱塘个人空间R.qf%ZT^'N
    #钱塘个人空间qQ2s|5z b3y
    dht_port = 19000

    # Enable peer exchange (for torrents not marked private)钱塘个人空间!j*S!tcR
    #
    (Oe,kz6A0peer_exchange = yes

    #
    lT*T&Y1E?/K8j0# Do not modify the following parameters unless you know what you’re doing.
    %u/wwy,Z)F)I0#

    # Hash read-ahead controls how many MB to request the kernel to read钱塘个人空间:jS+V1Yi7a5\
    # ahead. If the value is too low the disk may not be fully utilized,
    3tq6z@`]U0# while if too high the kernel might not be able to keep the read钱塘个人空间R9X1` \ qU
    # pages in memory thus end up trashing.钱塘个人空间ZWOV V` L
    #hash_read_ahead = 10

    # Interval between attempts to check the hash, in milliseconds.钱塘个人空间z'`bPxo$^
    hash_interval = 150

    # Number of attempts to check the hash while using the mincore status,钱塘个人空间DPP)COV8zBVt
    # before forcing. Overworked systems might need lower values to get a钱塘个人空间7Nhdt$@
    # decent hash checking rate.钱塘个人空间i k dG!~U5a
    #hash_max_tries = 10

    umask = 0000钱塘个人空间k {]3K*b]q
    scgi_port = 127.0.0.1:5000

  • 4. 編輯 apache 設定檔

    $ sudo vi /etc/apache2/sites-enabled/000-default

    LoadModule scgi_module /usr/lib/apache2/modules/mod_scgi.so钱塘个人空间'zN|!wOhI
    SCGIMount /RPC2 127.0.0.1:5000

  • 5. 下載 rtgui 並且解壓縮到您的 web server 預設目錄中

    $ wget http://rtgui.googlecode.com/files/rtgui-0.2.5.tgz钱塘个人空间%z,c+^:t"bly6q\
    $ tar -zxvf rtgui-0.2.5.tgz
    d `)p |gA0$ mv rtgui-0.2.5 rtgui钱塘个人空间z8z7j @4} C5O%j+P[ N
    $ sudo mv -f rtgui /var/www/

  • 6. 編輯 config.php 檔案中的目錄路徑內容為符合您的需求

    $ sudo vi /var/www/rtgui/config.php

    < ?php钱塘个人空间w?9V TlRn_
    //
    .y)v(dmvq0// rtGui - Simon Hall 2007-2008钱塘个人空间/h D,RJC7[t R {
    //钱塘个人空间 q5U5n3yAk
    // http://rtgui.googlecode.com/
    @6C l+IQ+Cp#O0//

    // Connect string for your local RPC/rTorrent connection:钱塘个人空间o0fC5U$C B9^
    $rpc_connect="http://localhost/RPC2";

    // rtorrent 'watch' directory (used for upload torrent)钱塘个人空间*Zr2e;J_Xcv
    $watchdir=”/data/file/”;

    // Path to report disk usage
    &s!bb&p#TV}sm0$downloaddir=”/data/file”;

    // Time between ajax calls - default 5000 (5 secs). Disable with 0钱塘个人空间7a6X*k#fM2i^U
    $defaultrefresh=5000;

    // Display tracker URL for each torrent on main page - you might want to disable this if you run lots (ie 30+ ?) torrents - To get the tracker URL requires another RPC call for every torrent displayed. If it’s disabled, it only requires one RPC call to list all the torrents.
    f#@ ^\(x}l'o0$displaytrackerurl=TRUE;

    // URL to your rtGui installation (used in RSS feed). Include trailing slash.钱塘个人空间(V&@O/lq%f2`jK"j
    $rtguiurl=”http://fry/rtgui/”;

    // Speeds for the download cap settings dialog.钱塘个人空间$`^ m*u P4mh
    $defspeeds=array(5,10,15,20,30,40,50,60,70,80,90,100,125,150,200,250,300,400,500,750,1000);

    // Enable debug tabs钱塘个人空间9d;h8YbW
    $debugtab=FALSE;

    // Tracker hilighting…钱塘个人空间/[]+_T,rGd
    // Format is array(hexcolour, URL, URL, …) The URL is a string to match identifiy tracker URL钱塘个人空间@^*g w&v#fk j2w
    $tracker_hilite_default=”#900″; // Default colour钱塘个人空间y0LY Q"['C
    $tracker_hilite[]=array(”#990000″,”ibiblio.org”,”etree.org”);
    7f5Sa)ZK+p0$tracker_hilite[]=array(”#006699″,”another.com”,”mytracker.net”,”mytracker.com”);钱塘个人空间AZne1y^*|
    $tracker_hilite[]=array(”#996600″,”moretrackers.com”);
    OddG+crT0?>

  • 7. 修改完成後執行 rtorrent 並開啟瀏覽器並瀏覽您的 rtgui 目錄,此時您將可以看到如下圖:

    $ rtorrent

    http://localhost/rtgui/
    ^W#e8{.S6^0


  • TAG:

    引用 删除 Guest   /   2008-11-28 07:25:42
    5
     

    评分:0

    我来说两句

    显示全部

    :loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

    Open Toolbar