Erstellt am: 28.12.2007 | Editiert am: 30.03.2008
rtorrent mit xmlrpc-c, lighttpd und ntorrent
rtorrent als Server und ntorrent als Client verwenden
rTorrent ist ein freier in C++ programmierter BitTorrent-Client für die Kommandozeile, der auf der libTorrent-Bibliothek basiert. Der große Vorteil von rtorrent ist, dass dieser ncurses nutzt und damit ideal geeignet ist um ihn mit screen oder dtach zu verwenden. Damit ich mich aber nicht immer auf die Shell einloggen muss, habe ich mir ntorrent auf verschiedenen Clients installiert um rtorrent administrieren zu können.
- Grundlegende Pakete installieren
- rtorrent aus der subversion benutzen und kompilieren
- Benutzer "torrent" erstellen
- torrent Verzeichnisse hinzufügen
- Erstelle die Datei .rtorrent.rc
- Lighttpd einrichten
- Autostart
- nTorrent als Client unter Ubuntu/Debian
- nTorrent als Client unter Windows
- Starte nTorrent
- Links und Quellen
- Kommentar schreiben
Grundlegende Pakete installieren
aptitude install build-essential libsigc++-2.0-dev pkg-config comerr-dev libcurl3-openssl-dev libidn11-dev libkadm55 libkrb5-dev libssl-dev zlib1g-dev libncurses5 libncurses5-dev libtool automake svn-arch-mirror screen libxmlrpc-c3-dev
rtorrent aus der subversion benutzen und kompilieren
cd /usr/src
svn co svn://rakshasa.no/libtorrent/trunk
cd trunk
svn up
cd libtorrent
./autogen.sh
./configure --prefix=/usr CXXFLAGS="-O2 -mtune=arm9tdmi -march=armv5"
make && make install
cd ../rtorrent
./autogen.sh
./configure --prefix=/usr CXXFLAGS="-O2 -mtune=arm9tdmi -march=armv5" \
--enable-aligned --with-xmlrpc-c
make && make install
svn co svn://rakshasa.no/libtorrent/trunk
cd trunk
svn up
cd libtorrent
./autogen.sh
./configure --prefix=/usr CXXFLAGS="-O2 -mtune=arm9tdmi -march=armv5"
make && make install
cd ../rtorrent
./autogen.sh
./configure --prefix=/usr CXXFLAGS="-O2 -mtune=arm9tdmi -march=armv5" \
--enable-aligned --with-xmlrpc-c
make && make install
Benutzer "torrent" erstellen
useradd torrent -g samba_user_group # Use your samba user group
passwd torrent
passwd torrent
torrent Verzeichnisse hinzufügen
Tip: Das Verzeichnis "irgendwo" sollte von Samba zugänglich sein
mkdir /irgendwo/torrent
mkdir /irgendwo/torrent/files
mkdir /irgendwo/torrent/session
mkdir /irgendwo/torrent/watch
mkdir /irgendwo/torrent/files
mkdir /irgendwo/torrent/session
mkdir /irgendwo/torrent/watch
Erstelle die Datei .rtorrent.rc
-> Bitte auf das Verzeichnis "irgendwo"" im Text aufpassen (kommt 3 mal vor)
login torrent
nano .rtorrent.rc
nano .rtorrent.rc
scgi_port = 127.0.0.1:5000
#scgi_local = /home/torrent/rpc.socket
upload_rate = 0
download_rate = 0
max_uploads = 3
min_peers = 40
max_peers = 100
ip = 127.0.0.1
# Encryption
#encryption = allow_incoming,enable_retry,prefer_plaintext
#peer_exchange = yes
# Default directory to save the downloaded torrents.
directory = /irgendwo/torrent/files
# Default session directory.
session = /irgendwo/torrent/session
# Watch a directory for new torrents, and stop those that have been deleted.
schedule = watch_directory,5,5,load_start=/irgendwo/torrent/watch/*.torrent
schedule = untied_directory,5,5,stop_untied=
# Close torrents when diskspace is low.
schedule = low_diskspace,5,60,close_low_diskspace=100M
# Port range to use for listening.
port_range = 52000-53999
# Set whetever the client should try to connect to UDP trackers.
use_udp_trackers = yes
check_hash = yes
#scgi_local = /home/torrent/rpc.socket
upload_rate = 0
download_rate = 0
max_uploads = 3
min_peers = 40
max_peers = 100
ip = 127.0.0.1
# Encryption
#encryption = allow_incoming,enable_retry,prefer_plaintext
#peer_exchange = yes
# Default directory to save the downloaded torrents.
directory = /irgendwo/torrent/files
# Default session directory.
session = /irgendwo/torrent/session
# Watch a directory for new torrents, and stop those that have been deleted.
schedule = watch_directory,5,5,load_start=/irgendwo/torrent/watch/*.torrent
schedule = untied_directory,5,5,stop_untied=
# Close torrents when diskspace is low.
schedule = low_diskspace,5,60,close_low_diskspace=100M
# Port range to use for listening.
port_range = 52000-53999
# Set whetever the client should try to connect to UDP trackers.
use_udp_trackers = yes
check_hash = yes
Lighttpd einrichten
Einfügen in /etc/lighttpd/lighttpd.conf: "mod_scgi",
nano /etc/lighttpd/conf-enabled/10-scgi.conf
server.modules += ( "mod_scgi" )
## Start an sCGI server for nTorrent and rtorrent
scgi.debug = 0
scgi.server = ( "/RPC2" =>
( "127.0.0.1" =>
( #"socket" => "/home/torrent/rpc.socket",
"host" => "127.0.0.1",
"port" => 5000,
"check-local" => "disable",
"disable-time" => 0, # don't disable scgi if connection fails
)
)
)
## Start an sCGI server for nTorrent and rtorrent
scgi.debug = 0
scgi.server = ( "/RPC2" =>
( "127.0.0.1" =>
( #"socket" => "/home/torrent/rpc.socket",
"host" => "127.0.0.1",
"port" => 5000,
"check-local" => "disable",
"disable-time" => 0, # don't disable scgi if connection fails
)
)
)
Autostart
nano /etc/rc.local
su -c 'screen -q -dmS rtorrent rtorrent' torrent
-> Reboote falls rtorrent gerade am laufen ist
nTorrent als Client unter Ubuntu/Debian
mkdir ~/ntorrent
cd ~/ntorrent
wget http://ntorrent.googlecode.com/files/nTorrent-bin-20071015.tar.bz2
tar xfvj nTorrent-bin-20071015.tar.bz2
rm nTorrent-bin-20071015.tar.bz2
sudo chmod 755 nTorrent.sh
cd ~/ntorrent
wget http://ntorrent.googlecode.com/files/nTorrent-bin-20071015.tar.bz2
tar xfvj nTorrent-bin-20071015.tar.bz2
rm nTorrent-bin-20071015.tar.bz2
sudo chmod 755 nTorrent.sh
Ein Desktop Icon unter Ubuntu/Gnome einrichten
sudo gedit /usr/share/applications/ntorrent.desktop
[Desktop Entry]
Name=nTorrent
Comment=rtorrent remote
Exec=/home/DEIN-ACCOUNT/ntorrent/nTorrent.sh
Icon=/home/DEIN-ACCOUNT/ntorrent/icons/ntorrent48.png
Terminal=false
MultipleArgs=false
Type=Application
Categories=Application;GTK;GNOME;Network;FileTransfer;
StartupNotify=true
Name=nTorrent
Comment=rtorrent remote
Exec=/home/DEIN-ACCOUNT/ntorrent/nTorrent.sh
Icon=/home/DEIN-ACCOUNT/ntorrent/icons/ntorrent48.png
Terminal=false
MultipleArgs=false
Type=Application
Categories=Application;GTK;GNOME;Network;FileTransfer;
StartupNotify=true
nTorrent als Client unter Windows
- -> nTorrent von http://ntorrent.googlecode.com/ herunterladen (siehe Links und Quellen)
- -> Ein Verzeichnis erstellen und dorthin nTorrent entpacken
- -> Java herunterladen und installieren
- -> ntorrent.jar starten
Starte nTorrent
- Protocol: http
- Host: Your Server IP like 192.168.1.2
- Connection Port: 80
- Mountpoint: /RPC2
Links und Quellen
- ntorrent Projekt Seite
- RTorrent XMLRPC Guide
- Mein englischer post zu rtorrent mit xmlrpc-c, lighttpd und ntorrent
Kommentar schreiben
- Benötigte Felder sind mit einem Stern (*) markiert.





