L2JMobius Prelude Of War CentOS 7.7+ Guide

L2JMobius Installation (CentOS 7 Edition)

L2JMobius Server on CentOS 7.7+

In this guide we are using a VPS by Hetzner. We are also using ssh authentication an not user name + password as this too much risky. You should as well avoid as much as you can using user name and password when dealing with servers!
The guide is about Prelude Of War but you can adapt to compile any other version that Mobius provides :)
A few notes:

  • The guide is meant to be taken step by step and line by line.
  • We are not devs or affiliated and we do not provide any support

Firstly let’s update our instance.

yum update -y

In our case there was no update available but still, checking for updates is a must!


Install OpenJDK

L2JMobius is using OpenJDK 14 in contrast with L2JServer that is still using v11

curl -O https://download.java.net/java/GA/jdk14.0.1/664493ef4a6946b186ff29eb326336a2/7/GPL/openjdk-14.0.1_linux-x64_bin.tar.gz
mv jdk-14.0.1 /opt/
cat <<EOF | sudo tee /etc/profile.d/jdk14.sh
export JAVA_HOME=/opt/jdk-14.0.1
export PATH=\$PATH:\$JAVA_HOME/bin


source /etc/profile.d/jdk14.sh

You should get this result if all good (do not copy/paste)



Install Git & tools

L2JMobius uses Git as version control system on BitBucket, use it to get the latest versions. But along with git we will install a few other tools that are missing but needed.

yum install git wget nano unzip



Install ANT

L2JMobius uses ANT to build the components from the source code.

wget http://ftp.cc.uoc.gr/mirrors/apache//ant/binaries/apache-ant-1.10.7-bin.tar.gz -P /tmp
tar xf /tmp/ apache-ant-1.10.7 bin.tar.gz -C /opt/ant
ln -s /opt/ant/bin/ant /usr/bin/ant

nano /etc/profile.d/ant.sh

export CLASSPATH=.

chmod +x /etc/profile.d/ant.sh
source /etc/profile.d/ant.sh

After that you should restart your instance

shutdown -r now

When the server is online again connect and check ant’s version

ant -version

If you get any error, google it. We don’t provide support for ant ^^


Install the Database Server

First we add the repo for it

nano /etc/yum.repos.d/MariaDB.repo

And paste in the text bellow

# MariaDB 10.4 CentOS repository list - created 2019-08-11 20:34 UTC
# http://downloads.mariadb.org/mariadb/repositories/
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/centos7-amd64

And time to install the MariaDB

yum install MariaDB-server MariaDB-client

And then we need to run the DB

systemctl start mariadb
systemctl enable mariadb

During the secure installation we will be asked a few questions, our answers were
Y, N, Y, Y, Y, Y

mariadb -u root -p

Just hit enter no password



Obviously you can use other user name and add a password in the ” ” but you will have to edit the server files as well! DO NOT FORGET THAT!

Get the Source Code

L2JMobius official repositories are listed bellow

mkdir -p /opt/l2jmobius/git && cd /opt/l2jmobius/git
git clone https://bitbucket.org/MobiusDev/l2j_mobius.git 



Build the Server from Source Code

Now we use Ant to build the server files. This can take a while depending on the processing speed of your server. In my VPS took some time :)

cd /opt/l2jmobius/git/l2j_mobius/L2J_Mobius_7.0_PreludeOfWar/


Deploy the Server

The deployment process at the moment is simply unzipping the built files.

mkdir -p /opt/l2jmobius/server
unzip /opt/l2jmobius/git/l2j_mobius/build/L2J_Mobius_7.0_PreludeOfWar.zip -d /opt/l2jmobius/server


Get L2J CLI and Install the Database

L2J CLI is a tool developed by Zoey76 from l2jserver.com that allows us to implement automated deployments and initial configurations. And with a little modification can be used to install the database of L2JMobius

mkdir -p /opt/l2jmobius/cli && cd /opt/l2jmobius/cli
wget https://l2jserver.com/files/binary/cli/l2jcli-1.0.2.zip -P /tmp
unzip /tmp/l2jcli-*.zip -d /opt/l2jmobius/cli
chmod 755 l2jcli.sh

You will need to edit with nano the files
that are located in /opt/l2jmobius/cli/config to match your database’s info. In this guide’s case change the db name from l2jls and l2jgs to l2jmobius and user to root and no password
When you are done editing the 2 files to match your database continue

db install -sql /opt/l2jmobius/server/db_installer/sql/login/ -u root -p  -m FULL -t LOGIN -c -mods
db install -sql /opt/l2jmobius/server/db_installer/sql/game/ -u root -p  -m FULL -t GAME -c -mods


Initial Configuration

You need to give certain permissions for the server to run properly.

cd /opt/l2jmobius/server/login && mkdir -p log
chmod 755 LoginServer.sh
chmod 755 LoginServerTask.sh
chmod 755 RegisterGameServer.sh
cd /opt/l2jmobius/server/game && mkdir -p log
chmod 755 GameServer.sh
chmod 755 GameServerTask.sh


Create Administrator Account

Use the L2J CLI to create an administrator account, 8 is the maximum account level (master) Note I haven’t confirmed if this is the case in L2JMobius, those info are from L2JServer. Obviously you can change the ADMIN with anything you like and you will be asked for password

cd /opt/l2jmobius/cli
account create -u ADMIN -p -a 8

If everything went well we can proceed into starting our gaming server!

Start the Server

To start the server you need to run two scripts.

cd /opt/l2jmobius/server/login
cd /opt/l2jmobius/server/game

That’s all folks! The server should be up and running in a couple of minutes!
You will need a modified client in order to play the game and also you will need to connect to your server via ftp or secure shell and edit the settings to increase the rates/drops or anything you like!

Some download links for the game and modded client

L2J-Mobius Prelude of War
Client Mirror 1: https://drive.google.com/uc?id=1rXtgV9l67b5lBeK_wmCKITE1DQ7EgEJ8&export=download
Client Mirror 2: https://drive.google.com/uc?id=1IugZjcpS5n9_EJPLCecB3H_tLmVlqo2L&export=download
System: https://mega.nz/#!98likSra!vP3uaDwJs8oiY5q60UzBSXAbgNELWX_dycWb98Mz96U


The guide has been updated on:
28/4/2020 – Updated OpenJDK from 12 to 14.01
28/4/2020 – Updated Client version to match the most recent build]]

Comfuzio is a gamer since very young age, ahead of his era and Hellenic society in general.He is also very funny and informative!

Latest articles

Diablo IV [PC] My review

JMCtech.gr και skroutz.gr


Προηγούμενο άρθρο
Επόμενο άρθρο

Related articles