install amule-daemon (amuled)

amuleto pick up harro's posting about make cash with p2p at makecash.org i want to give you a little tutorial how to get the linux version of emule called "amule" running on your debian box.

Step 1. install amuled
add this line in /etc/apt/source.list
deb http://amule-debian.dyndns.org/ debian/
and execute
apt-get update
now you have to install the amule daemon including the cmd utils with
apt-get install amule-daemon

Step 2. create the amule user
create a user called amule and a group called amule. i'm not good with that user/permission crap so i cant really remember how i did it but try this:
addgroup amule
useradd -g amule amule

create directory amule in /home/ and copy all the /root/.aMule/ stuff into it with
cp -R /root/.aMule/ /home/amule/
and change the owner to the amule user and group with
chown -R amule:amule /home/amule/

Step 3. configure that thingy
open the config /home/amule/.aMule/amule.conf and change the /root/ pathes to the user path at /home/amule/... and change this:
[WebServer]
Enabled=1
Password=sdsdgfsgddsggsdgdgdgsdg
PasswordLow=
Port=12346
UseGzip=1
UseLowRightsUser=0
PageRefreshTime=120
Template=php-default
[ExternalConnect]
AcceptExternalConnections=1
ECAddress=0.0.0.0
ECPort=12345
ECPassword=jasdkjaksdjkasjdkasljd

you create the password with md5 like that:
echo -n "yourplaintextpass" | md5sum | cut -d " " -f 1
and change the ports! the default ports are in the config file as changed above or on wiki.amule.org.

Step 4. setting up the init.d script
insert a init.d script with creating a new file under /etc/init.d/amuled
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/amuled
WEB=/usr/bin/amuleweb
NAME=amuled
DESC=amuled
RUNAMULE=no
USER=amule

test -x $DAEMON || exit 0

# Include amule defaults if available
if [ -f /etc/default/amule ] ; then
. /etc/default/amule
fi

if [ "$RUNAMULE" != "yes" ];then
echo "Amule not to be started. Edit /etc/default/amule first."
exit 1
fi

set -e

case "$1" in
start)
echo -n "Starting $DESC: "
su $USER -c "$DAEMON -f"
while ! netstat -l -n -p -t | grep -q amuled ; do sleep 1 ; done
su $USER -c "$WEB --quiet &"
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
killall --quiet --ignore-case $WEB
killall --quiet --ignore-case $DAEMON
echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
killall --quiet --ignore-case $WEB
killall --quiet --ignore-case $DAEMON
sleep 1
su $USER -c "$DAEMON -f"
while ! netstat -l -n -p -t | grep -q amuled ; do sleep 1 ; done
su $USER -c "$WEB --quiet &"
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac

exit 0
if the thing now say "Amule not to be started. Edit /etc/default/amule first." create this file and insert just this line:
RUNAMULE=yes

Step 5. test if it works
i think thats it. i cant remember everything and i don't want to give you a absolute detailed instruction (for this you can read wiki.amule.org) but you prob can try now this line:
/etc/init.d/amuled start
if it tells you:
Starting amuled: amuled: OnInit - starting timer
Initialising aMule
Checking if there is an instance already running...
No other instances are running.
amuled: forking to background - see you
amuled.

yeah then everything is fine and you now run a emule client.

Step 6. get amuled a nice server list
stop the whole thing again with stop instead of start and fill the server.emet under /home/amule/.aMule/server.met with a good server list. for testing i used this:
wget http://www.srv1000.com/azz/server.met
i just found it somewhere... use your own, thats better.

Step 7. change the firewall is you need to
change your firewall settings if needed:
iptables -A INPUT -p tcp --dport 4662 -j ACCEPT
iptables -A INPUT -p udp --dport 4662 -j ACCEPT
iptables -A INPUT -p udp --dport 4665 -j ACCEPT
iptables -A INPUT -p udp --dport 4672 -j ACCEPT
#amule webserver
iptables -A INPUT -p tcp --dport 12346 -j ACCEPT

Step 8. start the daemon
start the amuled again with /etc/init.d/amuled start and try to connect:
amulecmd -p yourexternalport
and use your external password.

thats it i guess. the whole thing lacks i know but figure it out by yourself or bother the guys in #amule on irc.freenode.net, like i did.

what all this has to do with harro's post? if you dont get it yet:
apt-get remove amule-daemon

... but if you understand what harro is telling you:

start earning money!
rasermedia.com

start earning money!
softwareprofit.com

(i really like their banners. cruel world... :P)

Activity

One comment, leave your comment or trackback.
  1. darfur
    May 22nd 2007

    stfu about this


Leave a Reply


Search

The archives run deep. Feel free to search older content using topic keywords.