Skip to content

Installing

Rogiel Sulzbach edited this page May 23, 2015 · 3 revisions

If you wish to install the game server you will need to have Java 6 installed in your computer. The emulator is developed to be compatible with any Java 6 JVM, that includes Oracle JVM (the "official" one) and OpenJDK.

The environment

Java Virtual Machine

  • Download any Java Runtime, preferable Oracle's proprietary at http://www.java.com/
  • Install the JVM (see Java.com instructions)

Note: JDK is recommended!

Database

L2JServer2 is written supporting multiple database engines, however at this stage only 2 engines are available: H2 and MySQL5. If you wish to use H2 you will have to compile from source (see Compiling), this instructions will only consider MySQL5 databases.

Now you have all the environment needed to run the server. Let's proceed to the configuration part.

The configuration

Note: At this early stage of development there is no install and no guarantee of compatibility between versions. In order to start running your server there's not much that need to be done. Once you have MySQL and Java installed it is easy:

Login server

  • Create a new MySQL database for login server;

  • Assign a new username and password to the database (optional);

  • Download the patched binary from GitHub;

  • Extract login server binary and edit login/config/loginserver.properties file replacing highlighted fields:

    URL = jdbc:mysql://localhost/database name here

    Login = username here

    Password = password here

You can change localhost to your database server address if your database is not located in the same machine.

Game server

  • Create a new MySQL database for game server;

  • Assign a new username and password to the database (optional);

  • Extract game server binary and edit config/database.properties file replacing highlighted fields:

    jdbc.url = jdbc:mysql://localhost/database name here

    jdbc.driver = com.mysql.jdbc.Driver

    jdbc.username = username here

    jdbc.password = password here

You don't have to change jdbc.driver field.

Starting servers

  • To start the login server you will need to execute StartLoginServer.sh in GNU/Linux or StartLoginServer.bat in Windows.

  • To start the game server you need to create a start.sh (for GNU/Linux) or a start.bat (for Windows) with the following content:

    java -jar l2j2-gameserver-2.0.0.jar

  • Don't forget do give execution permission if you are using GNU/Linux:

    chmod +x start.sh

Clone this wiki locally