CentOS 7 安装aMule (emule) 电驴 ed2k 电骡子

Running aMule without a GUI is suitable for low-configuration VPS setups. You can run the aMule daemon (`amuled`) and manage it through the command-line interface (`amulecmd`) or the web interface. Here’s how you can compile and set up aMule on CentOS 7 without the GUI components:

### Step-by-Step Guide to Compile and Install aMule Daemon on CentOS 7

1. **Update Your System**:
   sudo yum update

2. **Install Required Dependencies**:
   - Install development tools and libraries needed for compiling aMule and its dependencies:
     sudo yum groupinstall "Development Tools"
     sudo yum install gd-devel geoip-devel libpng-devel libpcap-devel bzip2-devel wget

3. **Install wxBase**:
   - Download and compile wxBase, the non-GUI components of wxWidgets:
     cd /usr/local/src
     sudo wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.tar.bz2
     sudo tar -xvf wxWidgets-3.1.5.tar.bz2
     cd wxWidgets-3.1.5
     sudo mkdir base-build
     cd base-build
     sudo ../configure --with-base --disable-shared --disable-gui --with-libpng=builtin --with-zlib=builtin --with-expat=builtin --with-regex=builtin --with-libtiff=no --with-libjpeg=no --with-libmspack=no --with-libxpm=no
     sudo make
     sudo make install

4. **Download aMule Source Code**:
   - Get the latest source code from the aMule GitHub repository:
     cd /usr/local/src
     sudo git clone https://github.com/amule-project/amule.git
     cd amule
     sudo git checkout master

5. **Compile and Install aMule Daemon**:
   - Configure, compile, and install aMule without GUI support:
     sudo ./configure --disable-debug --enable-optimize --enable-amule-daemon --enable-amulecmd --enable-webserver --enable-geoip --enable-upnp --disable-monolithic --with-wx-config=/usr/local/bin/wx-config
     sudo make
     sudo make install

6. **Configure aMule Daemon**:
   - Run `amuled` once to create the initial configuration files:
   - You will need to edit the configuration file (`~/.aMule/amule.conf`) to set your preferences:
     nano ~/.aMule/amule.conf

7. **Configure Firewall**:
   - Open the necessary ports for eDonkey traffic:
     sudo firewall-cmd --permanent --add-port=4662/tcp
     sudo firewall-cmd --permanent --add-port=4672/udp
     sudo firewall-cmd --reload

8. **Start aMule Daemon**:
   - Start the aMule daemon:

### Using aMule Command Line Interface (`amulecmd`)

扫描二维码关注公众号,回复: 17394325 查看本文章

1. **Run `amulecmd`**:
   - You can use `amulecmd` to interact with the aMule daemon:

2. **Basic Commands**:
   - `help`: Lists all available commands.
   - `status`: Shows the current status of the aMule daemon.
   - `add [link]`: Adds a new ed2k link to download.
   - `search [keyword]`: Searches for files.

### Using aMule Web Interface

1. **Enable Web Interface**:
   - In your `~/.aMule/amule.conf`, ensure the web server is enabled and configured:

2. **Access Web Interface**:
   - Open your web browser and navigate to `http://your-vps-ip:4711` (the default port for the web interface).

### Summary

By following these steps, you’ll have aMule running on your CentOS 7 VPS without the GUI, which is suitable for low-resource environments. You can manage aMule using the command-line interface (`amulecmd`) or the web interface, providing flexibility while keeping the resource usage low.

"/usr/local/bin/amuled" -f -p ${HOME}/amuled.pid


Next, you need to do is generate remote.conf, the file where aMuleCMD stores its configuration information. (It can be found in the .aMule directory.) Among other things, this file contains the port number which aMule uses for External Connections as well as the md5sum hash of the password needed to access aMule.

To create a remote.conf file, enter at the command line:

amulecmd --create-config-from=/home/username/.aMule/amule.conf

where "username" is your user name.

aMuleCMD will read the necessary configuration information from amule.conf and generate a remote.conf file.

To do this on a remote system, enter this:

amulecmd -h hostname -p ECport -P ECpassword -w

[xxx@vultr .aMule]$ cat remote.conf


download 6


show dl

文件下载到 ~/.aMule/Incoming 

Shared directory

Deploying and running `amuled` (the daemon version of aMule, a multi-platform client for the eD2k network and Kademlia network) on your VPS 24/7 can indeed help improve the eMule P2P network in several ways:

1. **Increased Network Stability**: By being online continuously, your VPS will provide a stable node within the network, which can help maintain the overall stability and reliability of the eMule P2P network.

2. **Resource Availability**: Constantly running `amuled` means that the files you share will always be available to other users, improving the availability of resources within the network.

3. **Improved Search Results**: A continuously running node can contribute to more comprehensive search results for other users by maintaining a constantly updated index of available files.

4. **Better Distribution of Files**: As your node participates in the network, it will help distribute files more evenly across the network, making it easier for users to find and download files.

5. **Support for Kademlia Network**: If you enable the Kademlia network in `amuled`, your node will contribute to a decentralized network structure, which is more resilient to single points of failure and helps maintain the health of the network.

In summary, keeping `amuled` running 24/7 on your VPS will positively contribute to the eMule P2P network by providing stability, resource availability, and improved distribution.