Difference between revisions of "AMule"

From ArchWiki
Jump to navigation Jump to search
(added missing '-d' to useradd)
(Installation: style)
 
(47 intermediate revisions by 18 users not shown)
Line 1: Line 1:
[[Category:Internet Applications (English)]]
+
{{Lowercase title}}
{{i18n|AMule}}
+
[[Category:Internet applications]]
{{DISPLAYTITLE:aMule}}
+
[[ja:AMule]]
 +
[[zh-hans:AMule]]
 +
[http://www.amule.org/ aMule] is an eMule-like client for the [[w:eDonkey Network|eDonkey Network]] and [[w:Kademlia|Kademlia]] networks, supporting multiple platforms.
  
aMule is an eMule-like client for the eD2k and Kademlia networks, supporting multiple platforms.
+
== Installation ==
  
==Installation==
+
[[Install]] the {{pkg|amule}} package.
aMule is available in the official [extra] repositories. To install, run:
 
# pacman -S amule
 
  
amuled is a full featured aMule daemon, running without any user interface (GUI). It is controlled by remote access through aMuleWeb, or aMuleGUI.
+
{{ic|amuled}} is a full featured aMule daemon, running without any user interface (GUI). It is controlled by remote access through aMuleGUI (GTK+), aMuleWeb, or aMuleCmd.
  
amuleweb is a web interface that allows one to control amuled by using a web browser.
+
== Services ==
  
==Configuration==
+
The package provides two ''systemd'' [[daemon|services]]: {{ic|amuled}} and {{ic|amuleweb}}. First you need to [[#Configuration|configure]] it. You need to provide passwords for external connection and admin password for {{ic|amuleweb}}. Start {{ic|amuled}} service and {{ic|amuleweb}} if you require it. Enable them to start aMule every boot.
===amuled===
 
====Create configuration files====
 
First we need to create a user for executing amule daemon:
 
# useradd -m -d /srv/amule -s /bin/bash amule
 
  
Then we run amuled once to create the configuration files:
+
Once {{ic|amulweb}} service is started, it is available at {{ic|http://127.0.0.1:4711}} (or with external address of your host).
# su amule
 
$ amuled --ec-config
 
  
Now amuled will ask you for a temporary password, enter something (amule for example, this doesn't matter), and use Ctrl-C to terminate amuled.
+
== Configuration ==
  
====Edit configuration files====
+
At package installation time a new user account '''amule''' created. This account is used to run ''systemd'' services.
Now we need to configure amuled properly.
 
First, we need to set up a password for the external connection of amuled.
 
$ echo -n <your password here> | md5sum | cut -d ' ' -f 1
 
  
The output of the above command is the encrypted password. Now you can edit the config file:
+
All configuration and temporary files are kept in amule home directory {{ic|/var/lib/amule}} among them:
$ nano /srv/amule/.aMule/amule.conf
+
* config file for amuled {{ic|/var/lib/amule/.aMule/amule.conf}}
 +
* config file for amuleweb {{ic|/var/lib/amule/.aMule/remote.conf}}
  
Under section [ExternalConnect], set:
+
At the package instalation time ''pacman'' generates a simple {{ic|amule.conf}} file with preset external connection password. The same password is used for ''amuleweb'' config file. One can use the password for connecting amule from other remote clients such as ''amule-gui''.
AcceptExternalConnections=1
 
ECPassword=<encrypted password>
 
  
====Create daemon====
+
To generate password, run:
 +
$ echo -n ''your password here'' | md5sum | cut -d ' ' -f 1
  
To make amuled run on system start, we need to create the daemon /etc/rc.d/amuled:
+
The output of the above command is the encrypted password. Now you edit the config file by adding following lines under section {{ic|[ExternalConnect]}}:
 +
{{hc|1=/var/lib/amule/.aMule/amule.conf|2=
 +
[ExternalConnect]
 +
AcceptExternalConnections=1
 +
ECPassword=<encrypted password>
 +
}}
  
  # touch /etc/rc.d/amuled
+
Do not forget that all files under {{ic|/var/lib/amule}} should be owned by '''amule''' user.
 +
  # chown amule:amule -R /var/lib/amule
  
Then copy the following to the file:
+
== amuleweb ==
  
<pre>
+
{{Note|''amuleweb'' provides much less features than ''amulegui'' (and displays much less info on downloads), and it has to ask for password quite often (unless your browser could save it). It is therefore advisable to use amulegui instead (which starts up very fast as well), and if you decide to do so, you could skip this step.}}
#!/bin/bash
 
  
USER=amule
+
=== Create configuration files ===
  
. /etc/rc.conf
+
Start ''amuleweb'' too using the user you just created to create the configuration file:
. /etc/rc.d/functions
+
$ sudo -u amule amuleweb --write-config --password=''password here'' --admin-pass=''web password here''
  
case "$1" in
+
Note that here, the ''password here'' is the unencrypted password you used to configure amuled. ''web password here'' is the unencrypted for the log in on the web interface. This command will write configuration file as such.
start)
 
  stat_busy "Starting aMule Daemon"
 
      su "$USER" -c "$(printf "%q -f>/dev/null" "/usr/bin/amuled" )"
 
  stat_done
 
  ;;
 
stop)
 
  stat_busy "Stopping aMule Daemon"
 
    killall --quiet --ignore-case "/usr/bin/amuled"
 
  stat_done
 
  ;;
 
restart|force-reload)
 
  $0 stop
 
  sleep 1
 
  $0 start
 
  ;;
 
*)
 
  printf "Usage: %q {start|stop|restart|force-reload}\n" "$0" >&2
 
  exit 1
 
  ;;
 
esac
 
  
exit 0
+
{{Tip|If the default URL for nodes.dat for Kad network does not work, you can get URL from there: [http://nodes-dat.com]}}
</pre>
 
  
Make it executable:
+
== amulegui ==
# chmod 755 /etc/rc.d/amuled
 
  
Add it to your {{filename|/etc/rc.conf}}, so it will be autostarted.
+
Amulegui is a GTK+ interface for aMule.
DAEMONS=( ... network '''amuled''' ... )
 
  
===amuleweb===
+
=== Configuring notifications ===
====Create configuration files====
 
Start amuleweb too using the user you just created to create the configuration file:
 
$ amuleweb --write-config --password=<password here> --admin-pass=<web password here>
 
  
Note that here, the <password here> is the unencrypted password you used to configure amuled. <web password here> is the unencrypted for the log in on the web interface. This command will write configuration file as such.
+
Some automatic actions settings are avaible through Settings → Events. The core command ''notify-send'' (requires {{pkg|libnotify}}) is useful to set notifications, using some amule variables. In example, set the ''core command'' in the section ''Download completed'' for a notification when a download is complete:
 +
notify-send -i amule "%NAME completed (%SIZE bytes)"
 +
The option "-i amule" includes the amule icon (a custom file may be specified adding its path between apostrophes, instead of "amule" icon filename).
  
====Create daemon====
+
== See also ==
Create the daemon {{filename|/etc/rc.d/amuleweb}}:
 
  
# touch /etc/rc.d/amuleweb
+
* [http://wiki.amule.org/wiki/Getting_Started Getting_Started at aMule wiki].
 
 
Copy the following to the file.
 
 
 
<pre>
 
#!/bin/bash
 
 
 
USER=amule
 
 
 
. /etc/rc.conf
 
. /etc/rc.d/functions
 
 
 
case "$1" in
 
start)
 
  stat_busy "Starting aMule Web Daemon"
 
      su "$USER" -c "$(printf "%q --quiet &" "/usr/bin/amuleweb" )"
 
  stat_done
 
  ;;
 
stop)
 
  stat_busy "Stopping aMule Web Daemon"
 
    killall --quiet --ignore-case "/usr/bin/amuleweb"
 
  stat_done
 
  ;;
 
restart|force-reload)
 
  $0 stop
 
  sleep 1
 
  $0 start
 
  ;;
 
*)
 
  printf "Usage: %q {start|stop|restart|force-reload}\n" "$0" >&2
 
  exit 1
 
  ;;
 
esac
 
 
 
exit 0
 
</pre>
 
 
 
Make it executable:
 
# chmod 755 /etc/rc.d/amuleweb
 
 
 
Also add it to your {{filename|/etc/rc.conf}}, so it will be autostarted.
 
DAEMONS=( ... network amuled '''amuleweb''' ... )
 
 
 
{{Note|Don't forget to set amule's shell to '''/bin/false''' as we don't want to give it shell access to the machine. Edit {{filename|/etc/password}} and replace '''/bin/bash''' by '''/bin/false''' for user amule:}}
 
amule:x:1001:1001::/srv/amule:/bin/false
 
 
 
==Usage==
 
Now you can start the daemon by
 
# /etc/rc.d/amuled start
 
# /etc/rc.d/amuleweb start
 
 
 
Now you can connect to amuleweb using http://yourserver:4711/
 

Latest revision as of 09:38, 6 August 2017

aMule is an eMule-like client for the eDonkey Network and Kademlia networks, supporting multiple platforms.

Installation

Install the amule package.

amuled is a full featured aMule daemon, running without any user interface (GUI). It is controlled by remote access through aMuleGUI (GTK+), aMuleWeb, or aMuleCmd.

Services

The package provides two systemd services: amuled and amuleweb. First you need to configure it. You need to provide passwords for external connection and admin password for amuleweb. Start amuled service and amuleweb if you require it. Enable them to start aMule every boot.

Once amulweb service is started, it is available at http://127.0.0.1:4711 (or with external address of your host).

Configuration

At package installation time a new user account amule created. This account is used to run systemd services.

All configuration and temporary files are kept in amule home directory /var/lib/amule among them:

  • config file for amuled /var/lib/amule/.aMule/amule.conf
  • config file for amuleweb /var/lib/amule/.aMule/remote.conf

At the package instalation time pacman generates a simple amule.conf file with preset external connection password. The same password is used for amuleweb config file. One can use the password for connecting amule from other remote clients such as amule-gui.

To generate password, run:

$ echo -n your password here | md5sum | cut -d ' ' -f 1

The output of the above command is the encrypted password. Now you edit the config file by adding following lines under section [ExternalConnect]:

/var/lib/amule/.aMule/amule.conf
[ExternalConnect]
AcceptExternalConnections=1
ECPassword=<encrypted password>

Do not forget that all files under /var/lib/amule should be owned by amule user.

# chown amule:amule -R /var/lib/amule

amuleweb

Note: amuleweb provides much less features than amulegui (and displays much less info on downloads), and it has to ask for password quite often (unless your browser could save it). It is therefore advisable to use amulegui instead (which starts up very fast as well), and if you decide to do so, you could skip this step.

Create configuration files

Start amuleweb too using the user you just created to create the configuration file:

$ sudo -u amule amuleweb --write-config --password=password here --admin-pass=web password here

Note that here, the password here is the unencrypted password you used to configure amuled. web password here is the unencrypted for the log in on the web interface. This command will write configuration file as such.

Tip: If the default URL for nodes.dat for Kad network does not work, you can get URL from there: [1]

amulegui

Amulegui is a GTK+ interface for aMule.

Configuring notifications

Some automatic actions settings are avaible through Settings → Events. The core command notify-send (requires libnotify) is useful to set notifications, using some amule variables. In example, set the core command in the section Download completed for a notification when a download is complete:

notify-send -i amule "%NAME completed (%SIZE bytes)"

The option "-i amule" includes the amule icon (a custom file may be specified adding its path between apostrophes, instead of "amule" icon filename).

See also