From MLDonkey
Revision as of 00:45, 21 February 2008 by Trek00 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


with CVS

This procedure describes how I set up the core on my debian woody server. I hope it will be of use for you as well. Please correct mistakes! :)
On the remote machine:

Add a system user to run the binary

as root:

adduser mlnet

login as that user

su - mlnet

on the same machine you ran adduser from or "ssh remote-host -lmlnet" from another computer

compile the source

cvs "method":

export CVS_RSH="ssh"

cvs checkout:

cvs co -P mldonkey

also see HowToUseCvs and [savannah]

configure will now automatically download ocaml and compile it of course you can also install the debian packages for ocaml.

see what ./configure offers to you:

./configure --help (pay attention to the --enable-XXX and --disable-XXX parts)

I chose support for bittorrent only, and no support for gui:

./configure --enable-batch --disable-multinet --disable-donkey --enable-bittorrent

now we can compile:


starting the core

I chose to move the created binary "mlnet" to this user's home directory:

mv mlnet ../mlnet && cd

now we start the core.

./mlnet > /dev/null 2>&1 &

notice that it detaches itself from the console

configuring the core for remote access

Find out from which machines you want to be able to connect to the core and get their IPs. open a telnet session to the core:

telnet localhost 4000 (remember we are still on the remote machine)

for security reason I advise to assign a password to the default mldonkey user (which is "admin"):

useradd admin <new pass> (this will assign a password to the default mldonkey user)

then I like to add the user "mlnet" and give it a password as well

useradd mlnet <another password> (from here on I always use the "mlnet" user...)

IIRC we need to authenticate now before we can go on:

auth mlnet <pass> (where "<pass>" is the password chosen above)

now we can add the IPs (we are almost done!):

set allowed_ips " nnn.nnn.nnn.nnn-mmm.mmm.mmm.mmm" where "nnn..." and "mmm..." is a IP-range or a single IP.

close the telnet session and logout from the machine:

q to close the telnet session, logout for logging out (repeat until completely logged out from the remote computer)

and done! :-)

From now on we can access the core from any computer which IP we added to the list of "allowed_ips" to configure it further. If the machine is behind a firewall/router, remember to forward port 4001 (default GUI port) to the machine to be able to use a GUI, such as Sancho.

Also read about StartingSysVStyle from /etc/init.d.

NOTE: There are precompiled packages one could use..

without CVS

An installation for a remote use with a external gui like Sancho or G2gui

enter to the remote machine

ssh -l root <ip>

Add a system user to run mlnet

adduser --disabled-password mldonkey

Dowlaod and Compile the source

download the tarball (I had to do this for 2.7.7):

cd /home/mldonkey; wget

exracting from the compressed file

tar -xvjf mldonkey-2.7.7.tar.bz2

necessary files

apt-get install netcat ocaml zlib1g

enter the new directory and compiling

cd mldonkey-2.7.7

mlnet daemon

download the updated version of the MLDonkey script(i hope..)


(you can find here the updated script )

move the script and configuring it

mv MLDonkey /etc/init.d/MLDonkey
pico /etc/init.d/MLDonkey

now, change the user and the path; you have to see ...:

MLDONKEYDIR=/full/path/to/mldonkey/directory/ <---here /home/mldonkey/mldonkey-2.7.7

USERNAME=username <---here mldonkey

(Ctrl + O to save) (Ctrl + X to exit)

update-rc.d MLDonkey defaults

start and stop the core to create default config

sh /home/mldonkey/mldonkey-2.7.7/mlnet

and Ctrl + C to stop it

configuring the core for remote access

Find out from which machines you want to be able to connect to the core and get their IPs. configuring the ini

pico /home/mldonkey/.mldonkey/downloads.ini

change the allowed ips --> change the to allowed ips (I use to allow all my internal network)

Done =)

we have incoming on /home/mldonkey/.mldonkey/incomig and the mlnet on /home/mldonkey/mldonkey-2.7.7/mlnet

/etc/init.d/MLDonkey start/stop/restart and autostart when system init.

with the Debian "unstable" package

This method is to compile and install the mldonkey Debian package from the "unstable" version to a Debian "stable" version installation.

Configure the system

Login as root and edit the file /etc/apt/sources.list to add this line:

deb-src unstable main

then update archives lists doing this command:

# apt-get update

once updated, you can install the required dependecies:

# apt-get install autoconf docbook-xsl fakeroot g++ libgd2-noxpm-dev liblablgtk2-ocaml-gnome-dev libmagic-dev

Compile the source

Login as normal user and download the MLDonkey source package:

$ apt-get source mldonkey

then compile the package (please to change 2.9.3 in the version actually downloaded):

$ (cd mldonkey-2.9.3 && dpkg-buildpackage -b -rfakeroot -d)

Install the packages

Login as root and install the new MLDonkey packages (please to change 2.9.3-1 in the version actually downloaded):

# dpkg -i mldonkey-server_2.9.3-1_i386.deb mldonkey-gui_2.9.3-1_i386.deb

then remove unused packages:

# apt-get remove --purge autoconf docbook-xsl fakeroot g++ libgd2-noxpm-dev liblablgtk2-ocaml-gnome-dev libmagic-dev
Personal tools