Friday, October 17, 2008

HowTo: Install and setup MLDonkey on Gentoo

MLDonkey is an open source, free software multi-network peer-to-peer application. Currently the following protocols are supported: eDonkey, Overnet, Bittorrent, Gnutella, Gnutella2, Fasttrack, FileTP and Kademlia.

To cater to my brother's P2P needs I decided to install MLDonkey without X11 support leaving only the core with both telnet and web interfaces. The target computer was my 1.3GHz Pentium-M laptop headless server (faulty display) running Gentoo Hardened located at my parents house.

Bellow are the steps needed to install MLDonkey on Gentoo with Bittorrent, eDonkey and Overnet support:
  1. $ su
  2. # eix-sync
  3. # echo "net-p2p/mldonkey ocamlopt -doc -fasttrack -gd -gnutella -gtk -guionly -magic" >> /etc/portage/package.use
  4. # emerge -tav mldonkey
Now that MLDonkey is installed let's activate it at boot time and start the service:
  1. # rc-update add mldonkey default
  2. # /etc/init.d/mldonkey start

Now we are going to modify the MLDonkey configuration:

  1. # /etc/init.d/mldonkey status
  2. # exit
  3. $ telnet 4000
  4. > auth admin ""
  5. > passwd newpassword
  6. > set allowed_ips ""
  7. > save
  8. > exit
Basically, we've checked to see if MLDonkey was running and accessed it through its telnet interface. Initially the application is configured without an admin password, so step 5 takes care of that. On step 6 we set the ips that are allowed to connect to the application, in the example the localhost and all clients in the local network.

MLDonkey's web server can be accessed on http://localhost:4080, so fire-up your browser and point to the address. If your planning to access the server from another computer replace localhost bit by the server's ip or hostname.

The following are a few useful commands that can be passed on to MLDonkey:
  1. # /etc/init.d/mldonkey start
  2. # /etc/init.d/mldonkey stop
  3. # /etc/init.d/mldonkey restart
  4. # /etc/init.d/mldonkey status
There are tons of configuration options available both in the telnet and web interfaces so I've opted to mention only the basic stuff. For more information I suggest browsing the project's website at

No comments: