[GUIDE] Installation of Allods 7.0 on Linux (Linux/WSL)

Сорок два

Administrator
Staff member
Admin
Content Creator
Guide Author
Seller
Premium

Here's a guide to install an Allods Online version 7.0 server on a Linux server (WSL2 also works) with the mentioned prerequisites. Make sure to follow each step carefully to avoid any issues.



Guide to Installing an Allods Online Version 7.0 Server on Linux

This guide will provide you with the necessary steps to set up an Allods Online version 7.0 server on a Linux system. Ensure you have the following prerequisite software installed:
  1. Prerequisite Software:
    • PHP 7.4
    • MySQL 5 (Version 8 not supported)
    • PostgreSQL 9.3
    • PostgreSQL Extensions: unixODBC, odbc-postgresql, libpostgresql-jdbc-java
    • software-properties-common
    • ca-certificates
    • unrar
    • wget

Assuming our server will be located in the directory /srv/allods:



🛠️ Step 1: Download & extract Allods 7.0 server 🛠️

To download and extract the Allods 7.0 server, follow these steps:
  1. Download the "game" server folder (25GB) using wget:
    Bash:
    wget https://community.allods-developers.eu/data/attachments/[ADC]Game_7_0.rar
  2. Download the server files (1.4GB) using wget:
    Bash:
    wget https://community.allods-developers.eu/data/attachments/[ADC][Linux]Server_7_0.rar
  3. Extract the downloaded archives using unrar:
    Bash:
    cd /srv/allods
    unrar x [ADC]Game_7_0.rar
    unrar x [ADC][Linux]Server_7_0.rar
Once you've completed these steps, you'll have downloaded and extracted the Allods 7.0 server files, ready for configuration and setup.


🛠️Step 2: Installing PHP 7.4 🛠️
  1. Update apt repositories and add PHP repository:
    Bash:
    sudo apt update
    sudo apt -y install software-properties-common
    sudo add-apt-repository ppa:ondrej/php
    sudo apt-get update
  2. Install PHP 7.4 and necessary extensions:
    Bash:
    sudo apt install php7.4 php7.4-cli php7.4-mysql php7.4-odbc php7.4-pgsql
🛠️Step 3: Installing MySQL 5 & Creating database 🛠️
  1. Install MySQL 5 using the following command:
    Bash:
    sudo apt install mysql-server-5.7
  2. Follow the prompts to configure MySQL 5. Remember to set a secure password for the root user.
  3. Create allods database
    Bash:
    mysql -u root -p
    mysql> CREATE DATABASE allods;
  4. Import the MySQL dump file, follow these steps:
    a. Navigate to the directory where your MySQL dump file is located. For example:
    Bash:
    cd /srv/allods
    b. Run the following command to import the dump file into MySQL.
    Bash:
    mysql -u root -p < allods.sql
    c. After entering the command, you will be prompted to enter your MySQL password. Once entered, the MySQL dump file will be imported into your MySQL server, populating allods database with tables.

    Your databases should now be created and populated with data from the MySQL dump file, ready to be used by the Allods Online server.


Handling the "Package 'mysql-server-5.7' has no installation candidate" Error

If you encounter the "Package 'mysql-server-5.7' has no installation candidate" error, it may be due to an incompatibility of available versions with your system. Here's how to resolve this issue:

  1. Download the MySQL configuration file:
    Bash:
    wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb
  2. Install the downloaded configuration file:
    Bash:
    sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb
  3. During installation, a configuration interface will appear. Select MySQL 5.7 from the menu.
  4. Update apt repositories:
    Bash:
    sudo apt update
  5. Check available versions of MySQL Server:
    Bash:
    sudo apt policy mysql-server
    You should get output similar to this:
    Less:
      Installed: None
      Candidate: 8.0.17-0ubuntu2
      Version table:
         8.0.17-0ubuntu2 500
            500 http://nl.archive.ubuntu.com/ubuntu eoan/main amd64 Packages
            500 http://nl.archive.ubuntu.com/ubuntu eoan/main i386 Packages
         5.7.28-1ubuntu18.04 500
            500 http://repo.mysql.com/apt/ubuntu bionic/mysql-5.7 amd64 Packages
            100 /var/lib/dpkg/status
  6. Identify the available 5.7 version in the MySQL repository.
  7. Install the specific version of MySQL Server:
    Bash:
    sudo apt install mysql-server=<version-tag> mysql-client=<version-tag>
    Replace <version-tag> with the specific version you identified. In our case, it would be:
    Bash:
    sudo apt install mysql-server=5.7.34-1ubuntu16.04 mysql-client=5.7.34-1ubuntu16.04
By following these steps, you should be able to resolve the error and successfully install MySQL Server 5.7. Once the installation is complete, you can proceed with the Allods Online server setup guide.



🛠️Step 4: Installing PostgreSQL 9.3 🛠️
  1. Add the PostgreSQL repository:
    Bash:
    sudo apt-get install wget ca-certificates
    wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
    sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
  2. Update apt repositories:
    Bash:
    sudo apt update
  3. Install PostgreSQL 9.3:
    Bash:
    sudo apt install postgresql-9.3 postgresql-client-9.3
  4. Create postgres user
    Bash:
    sudo adduser postgres
  5. Enable and start postgresql
    Bash:
    sudo systemctl enable postgres && systemctl start postgresql
  6. (Optionnal)Create a dedicated user (for example allods, in this guide I'll use this command to create allods user with password 1450)
    Bash:
    su - postgres
    createuser --interactive --pwprompt --superuser

Note: Ensure not to install a version of PostgreSQL higher than 9.3 to avoid a potential error related to incompatibility. Or you'll have an error similar to this one : you'll have an error : An SQLException was provoked by the following failure: java.lang.NumberFormatException: For input string: "22 (Ubuntu 10"



🛠️Step 5: Configuring PostgreSQL Extensions & allow remote connection 🛠️

In this step, we will configure PostgreSQL to allow remote connections. Follow these instructions:
  1. Install the required extensions:
    Bash:
    sudo apt install unixodbc odbc-postgresql libpostgresql-jdbc-java
  2. Modify the postgresql.conffile:
    Bash:
    sudo vi /etc/postgresql/9.3/main/postgresql.conf
    
    #Find the line:
    #listen_addresses = 'localhost'
    
    #Uncomment the line and change it to:
    listen_addresses = '*'
  3. Save and close the file.
  4. Modify the pg_hba.conf file:
    Bash:
    sudo vi /etc/postgresql/9.3/main/pg_hba.conf
    
    #Find the line:
    host all all 127.0.0.1/32 md5
    
    #Replace with it:
    host all all 0.0.0.0/0 md5
  5. Save and close the file.
  6. Restart the PostgreSQL server to apply the changes:
    Bash:
    sudo service postgresql restart

That's it ! You have now configured the necessary softwares to run an Allods Online version 7.0 server on your Linux server.

🛠️Step 6: Setting up PostgreSQL Databases 🛠️

Before proceeding with launching the different servers, we need to create PostgreSQL users and databases: accounts, billing, shard, ships. You can create them using the CREATE DATABASE command.
  1. Connect to your PostgreSQL server:
    Bash:
    sudo -u postgres psql

  2. Create databases for Allods Online:
    SQL:
    CREATE DATABASE accounts;
    CREATE DATABASE billing;
    CREATE DATABASE shard;
    CREATE DATABASE ships;
    \q
🛠️Step 7: Launching the Servers 🛠️

Now let's proceed with launching the various servers: accountServer, masterServer, masterServerAgent, billingServer, itemMallServer, and finally Shard.


Note: When configuring server settings, it's recommended to use the LAN IP address of your Ubuntu or WSL (Windows Subsystem for Linux) system for better local network communication. You can find the LAN IP address of your Ubuntu or WSL system using the following command:

Bash:
ip addr show | grep inet | grep -v 127.0.0.1 | grep -oP '(?<=inet\s)\d+(\.\d+){3}'

Select the first address that is displayed. In my case the IP is 172.30.113.41

Ensure to place the LAN IP address in the <auth> XML tag for the account server and in the <frontEnd> XML tag for the shard server during configuration. This ensures proper communication between the servers on your local network.


For accountServer:
  1. Navigate to the accountServer directory:
    Bash:
    cd /srv/allods/server_bin/accountServer
  2. Modify shard.xml to edit your database connection information. By default, if you strictely followed this guide, the PostgreSQL username is allods, and the password is 1450. You don't need to change the rest of the configuration to continue with this guide.
  3. Launch the accountServer:
    Bash:
    ./accountServer.sh start
    You should see Capture d'écran 2024-03-19 225716.png
The accountServer should now be running. Repeat similar steps for other servers, modifying their respective configuration files.

You can continue with the remaining servers following similar steps, ensuring that you configure database connection information appropriately in their respective configuration files before launching.

Note: Make sure to keep the server processes running in the background or as daemons using tools like screen or creating service units if necessary.



That's it ! You have now launched the Allods Online servers on your Linux system. You can proceed with further configurations or testing as required.

🛠️Step 8: Using the Servers Management Script 🛠️

After configuring and launching the different servers, you can simplify server management using a script that I wrote called servers.sh. This script, located at the root of the /server_bin directory, takes three parameters: start, status, and stop. It allows you to start, check the status, and stop all servers with a single command.
Here's how to use the script:
  1. Navigate to the /server_bin directory:
    Bash:
    cd /srv/allods/server_bin
  2. Run the script with the start parameter to start all servers:
    Bash:
    ./servers.sh start
  3. You can check the status of all servers by running:
    Bash:
    ./servers.sh status
  4. To stop all servers, use the stop parameter:
    Bash:
    ./servers.sh stop
By utilizing this script, you can efficiently manage the Allods Online servers with ease. It provides a convenient way to start, check status, and stop all servers simultaneously.

Here's an example of how to use the server management script:


🛠️ Step 9: Creating an Allods Account with PHP 🛠️

To create an Allods account programmatically using PHP, you can utilize the aorg.php script located at the root of the /srv/allods directory. This script takes two arguments: a nickname and a password. Before using the script, ensure you have modified the database connection information within the script if needed.

Follow these steps to create an Allods account:
  1. Navigate to the /srv/allods directory:
    Bash:
    cd /srv/allods
  2. Run the aorg.php script with the appropriate arguments. Replace <nickname> and <password> with the desired values for the account:
    Bash:
    php aorg.php <nickname> <password>
    For example:
    Bash:
    php aorg.php sorokdva 1450
  3. If everything goes well, the script will return:
    Code:
    Account successfully registered!
This indicates that the Allods account has been successfully created in the database with the provided nickname and password. You can now use this account to access the Allods Online game.

🛠️ Step 10: Connecting to the Game 🛠️

To connect to the game, follow these steps:
  1. Download the Allods Online client (
    You do not have permission to view link Log in or register now.
    ).
  2. Modify the Profiles/accountServer.cfg file. Update the account_srv_host variable with the LAN IP address of your machine. In our case, the IP address is 172.30.113.41.
  3. Launch the Allods Online launcher located in the bin folder.
  4. Enter your account credentials to log in and start playing the game.
By following these steps, you can connect to the Allods Online game server and begin your adventure in the world of Sarnaut. Enjoy your gaming experience !

Conclusion

Congratulations ! You have successfully configured and launched an Allods Online version 7.0 server on your Linux system. By following the steps outlined in this guide, you have set up the necessary software prerequisites, configured PostgreSQL for remote connections, and launched the various servers required for running the game.

Throughout this process, you've learned how to install PHP 7.4, MySQL 5, and PostgreSQL 9.3 along with their respective extensions. Additionally, you've configured PostgreSQL to accept remote connections, ensuring flexibility in accessing your database server.

Furthermore, with the provided script servers.sh, you can easily manage the server processes by starting, checking status, and stopping them with a single command, simplifying server administration tasks.

Moreover, you've learned to import MySQL dump files for database setup and to create Allods accounts using PHP scripts. Additionally, it's important to note that when configuring server settings, using the LAN IP address of your Ubuntu or WSL system enhances local network communication efficiency.

As you continue your journey with Allods Online, remember to stay updated with any new releases or patches and keep your server environment secure by implementing best practices for server management and security.

I hope this guide has been helpful in your endeavor to create and maintain an Allods Online server. Should you encounter any issues or have further questions, don't hesitate to refer to the official documentation or seek assistance from the Allods Developers Community.

Happy gaming !

 
OP
Сорок два

Сорок два

Administrator
Staff member
Admin
Content Creator
Guide Author
Seller
Premium


RESERVED FOR QUESTIONS / PROBLEMS RESOLUTION

 
If someone wants to simplify the process a little bit, I attach my dockerfiles I used to start databases for the server.
P.S. you have to create databases manually connecting to the containers, use command

docker exec -it <CONTAINER_ID> bash

mysql/Dockerfile

Code:
FROM mysql:5.7

ENV MYSQL_ROOT_PASSWORD=<PASSWORD>

RUN /etc/init.d/mysql start &&\n    mysql -u root -p -e "CREATE DATABASE allods_master;" && \n    mysql -u root -p -e "\q"

CMD /usr/sbin/mysqld

postgres/Dockerfile

Code:
FROM ubuntu:20.04

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update

RUN apt-get install -y libldap-common

RUN apt-get install -y curl ca-certificates gnupg
RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main" > /etc/apt/sources.list.d/pgdg.list

RUN apt-get update
RUN apt-get install -y postgresql-9.3

RUN apt-get install -y unixodbc
RUN apt-get install -y odbc-postgresql
RUN apt-get install -y libpostgresql-jdbc-java

RUN chown postgres:postgres /var/run/postgresql/9.3-main.pg_stat_tmp

USER postgres

RUN /etc/init.d/postgresql start && psql --command "CREATE DATABASE accounts;" && psql --command "\q"

CMD /usr/lib/postgresql/9.3/bin/postgres -D /var/lib/postgresql/9.3/main -c config_file=/etc/postgresql/9.3/main/postgresql.conf

docker-compose.yml

Code:
version: \'3.7\'
services:
  postgres:
    container_name: postgresql-9.3
    build: ./postgres
    image: postgres:9.3
    ports:
      - "5432:5432"
    volumes:
      - ./postgres/data:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: <PASSWORD>
  mysql:
    container_name: mysql-5.7
    build: ./mysql
    image: mysql:5.7
    ports:
      - "3306:3306"
    volumes:
      - ./mysql/data:/var/lib/mysql
 

al5yal511

Administrator
Staff member
Admin
Guide Author
you can rent a vps from databasemart.com.. os CentOS 7

CPUModel: E5-2697V2 MemorySize: 128.00GB DiskDescription: 240GB SSD + 2TB SSD Operating System: CentOS 7.x 64-bit
You do not have permission to view link Log in or register now.


You do not have permission to view link Log in or register now.
 
OP
Сорок два

Сорок два

Administrator
Staff member
Admin
Content Creator
Guide Author
Seller
Premium
you can rent a vps from databasemart.com.. os CentOS 7

CPUModel: E5-2697V2 MemorySize: 128.00GB DiskDescription: 240GB SSD + 2TB SSD Operating System: CentOS 7.x 64-bit
You do not have permission to view link Log in or register now.


You do not have permission to view link Log in or register now.
What's the price ? Cannot find the server you are describing
 

Top Bottom