I managed to install a bittorrent client on the MyBook World. I chose rtorrent for its lightweightness and relative user-friendlyness. Once set up it looks like something like this. If you’re looking for a GUI bittorrent client you better look the other way.
In this article I’ll describe how to transform your Network Hard drive into a lightweight torrent box by installing:
Ready? Then ssh your MyBook and log in as root, and follow these step by step instructions.
Let’s start by pkg-config, as it is needed for other softwares to check whether a library is installed or not. The installation is trivial and shouldn’t cause any difficulties.
# cd /tmp/ # wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.22.tar.gz # tar -zxvf pkg-config-0.22.tar.gz # cd pkg-config-0.22 # ./configure # make # make install
Ditto…
# cd /tmp/ # wget http://www.openssl.org/source/openssl-0.9.8g.tar.gz # tar -zxvf openssl-0.9.8g.tar.gz # cd openssl-0.9.8g # ./Configure gcc # make # make install
A programming API to build text interfaces…
# cd /tmp/ # wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz ...
A C++ library…
# wget http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.0/libsigc++-2.0.17.tar.gz ...
A library that provides URL transferts.
# wget http://curl.haxx.se/download/curl-7.16.4.tar.gz ...
libTorrent is rTorrent’s engine.
export PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig/
# wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.11.9.tar.gz # tar -zxvf libtorrent-0.11.9.tar.gz # cd libtorrent-0.11.9 # ./configure
config.h with a text editor like vi and comment out the line:#define USE_MADVISE 1
/* #define USE_MADVISE 1 */ # make # make install
We’re almost there.
# wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.7.9.tar.gz # tar -zxvf rtorrent-0.7.9.tar.gz # cd rtorrent-0.7.9 # ./configure # make # make install
rtorrent and there might be some errors. I had the following ones:
rtorrent: can't load library 'libcurl.so.4'Do:
ln -s /usr/local/lib/libcurl.so.4 /lib/
rtorrent: can't load library 'libtorrent.so.10'Do:
ln -s /usr/local/lib/libtorrent.so.10 /lib/
I first said it was impossible to install GNU Screen on a MyBook World but tcblack mentioned he managed to do it.
One thing a bit stupid now is that you can use rTorrent, but it terminates as soon as you close you terminal. Sure you can run it in the background in using rtorrent &, but then you can’t see rTorrent’s interface anymore. The solution is a terminal multiplexer, which allows you to access multiple terminal sessions. You can start rTorrent from one computer with dtach, leave the session, and then get back the window from another computer. Exactly what we need here.
# wget ftp://ftp.gnu.org/pub/gnu/screen/screen-4.0.3.tar.gz # tar -xvf screen-4.0.3.tar.gz # cd /tmp/myfiles/screen-4.0.3 # ./configureEdit pty.c and surround the
# include line 38 by /* */ to comment this line out.
nano pty.c # make # make install # install -m 644 etc/etcscreenrc /etc/screenrc # cp ./screen /bin
You will use dtach and rtorrent this way:
dtach -c /tmp/socket-rtorrent rtorrent
That’s it: you just transformed you network hard drive into a download box. You’ll need to configure rtorrent according to your taste and internet connexion settings. It’s not rocket science and the documentation is well done. You can copy my .rtorrent.rc file, too.