Setup Server - Linux

Tools needed
- SubVersion to pull the files on the computer

- J2SE SDK

- ant to build the project

- a file editor

Some distributions provide these as installable packages. Some other distribution will require that you download and install them manually. In that case, you may need the tools needed to build programs (GCC, GNU Make, ...)

Installing the tools
Introduction You'll need to return to your base directory between the various steps. This can be easily done by using the "cd" command (without any parameter)

Subversion

URL : http://subversion.apache.org/

File : subversion-1.6.11.tar.gz (version number may vary)

1) uncompress the archive

tar xzf subversion-1.6.11.tar.gz

2) go inside the source directory

cd subversion-1.6.11

3) configure the build system

./configure

4) Build and install SVN

make install

Installing J2SE

URL : http://java.sun.com

File : jdk-6u20-linux-i586.bin (J2SE, download JDK... Version number (6u18) and platform (i586) may change)

1) give execute rights to the file

chmod 755 jdk-6u20-linux-i586.bin

2) start the installer

./jdk-6u20-linux-i586.bin

Installing Ant

URL : http://ant.apache.org

File: apache-ant-1.8.1-src.tar.gz

1) extract the files

tar xzf apache-ant-1.8.1-src.tar.gz

2) Read the install manual

check the apache-ant-1.8.1/docs/manual/install.html

3) Install the dependencies

still to be written

4) Build ant

sh build.sh install

Downloading L2J
1) Create the directories where you'll download the L2J files

mkdir -p L2J/L2J

mkdir -p L2J/L2DP

2) download L2J

cd L2J/L2J

svn co http://www.l2jserver.com/svn/trunk

cd ../..

3) download L2DP

cd L2J/L2DP

svn co http://www.l2jdp.com/svn/trunk

cd ../..

4) optionnal : geodata

download the geodata file from one link found on some forums or use

svn co svn-address

Note : if you want to use a specific L2J release, you may replace "trunk" by "branches/release" where release is one of L2_GameServer_T1, L2_GameServer_T1.5, L2_GameServer_T2.1, L2_GameServer_T2.2, L2_GameServer_T2.3; L2_GameServer_c4, L2_GameServer_c5 or L2_GameServer_it.

You'll then need to download the corresponding Datapack (release is one of C4_Datapack, C5_Datapack, IT_Datapack, T1_Datapack, T1.5_Datapack, T2.1_Datapack, T2.2_Datapack or T2.3_Datapack)

Building L2J
1) Go in the L2J source directory and build the gameserver

cd L2J/L2J/L2_GameServer

ant

2) Move to the Community server and built it

cd ../L2_CommunityServer

ant

3) Move to the L2DP directory and build the datapack

cd ../../L2DP/datapack_development

ant

4) Copy the various compiled archive to main L2J

cd ../..

cp L2J/L2_GameServer/build/L2J_Server.zip.

cp L2J/L2_CommunityServer/build/l2j-community.zip.

cp L2DP/datapack_development/build/L2J_Datapack.zip.

You now have the three archives (four if you downloaded the geodata) needed to install L2J

Installing actual server
1) Install MySQL and create the DB

Most linux distributions already have MySQL available. You'll need to install both the server and the client package. If it's a separate archive, you may skip the development packages (they are only needed when you create C/C++ programs using MySQL)

If you've a full LAMP system (Linux Apache Mysql PHP), you may also install phpMyAdmin (http://www.phpmyadmin.net) which will make the use of MySQL easier. Some distributions also have it already packaged.

Once MySQL is installed, the first thing that you'll need to do is to change the root password. This can be done by the mysqladmin command :

mysqladmin -u root password NEWPASSWORD

Next, you'll have to create the Databases needed for L2J. Although Login server and Game server DB could be merged (no duplicate table name), it's much safer to create 3 separate databases

mysql -h localhost -u root -p  (you'll be prompted for a password)

create database l2jldb; (Login Server)

create database l2jgdb; (Game Server)

create database l2jcdb; (Community server)

Then, a good idea is to have a user specific to L2J access on the DB (with a password different from the root password)

grant CREATE,INSERT,DELETE,UPDATE,SELECT on l2jldb.* to l2j@localhost;

grant CREATE,INSERT,DELETE,UPDATE,SELECT on l2jgdb.* to l2j@localhost;

grant CREATE,INSERT,DELETE,UPDATE,SELECT on l2jcdb.* to l2j@localhost;

set password for l2j = password(' l2jpassword ');

flush privileges;

2) Create the L2J server dir

3) Install the database content

4) Edit the config files

5) First start of the server...

To be continued

Specific distributions

 * Ubuntu Server
 * Debian