Jump to content

Recommended Posts

Posted

L2J For Linux Guide

 

These procedures have been tested on Fedora Core 3, Debian, Ubuntu and Gentoo. Your milage may vary, but this should work just for about any Linux distribution out there.

 

Requirements:

-------------

* MySQL Server (Install via your package manager)

* SVN client (Install via your package manager)

* ANT (Install via your package manager)

* zip/unzip (install via your package manager, should be default on most systems)

* screen (install via your package manager. Optional, but highly recommended)

* Java SDK/JVM (See discussion on Java further down)

* A NON-ROOT ACCOUNT TO RUN THE SERVERS AS!!!!!

(Please don't run the server as root, it's a bad idea Smile

 

For Debian/Ubuntu this should be "apt-get install mysql-server subversion ant unzip"

For Gentoo this should be "emerge mysql subversion dev-java/ant unzip"

For Fedora Core 3 "yum install subversion dev-java ant unzip"

 

The JDk/VM part is a little more tricky. First you need to pick between IBM or Sun Java. Sun Java is easier to get (IBM requires that you sign up and provide a bunch of personal information) but IBM Java is rumoured to be faster. I've seen no data either way so I'd suggest sticking with Sun Java. No matter which one you chose, download the 'self extracting binary' or 'tar gzip' version and set it aside. Don't download one that's managed by the system (IE, an RPM).

 

Installation:

------------

Now you need to figure out where you're going to install all this stuff. The L2J Server and Datapack source and installed, with the Java is around 500 megs, so make sure that you have aleast that much space on the partition you'll be using. I'd recommend having atleast a gig just to be on the safe side. On my system I create a partition for the L2J stuff and I'll be using that in my examples. The following are the directories that I have:

 

 

/l2j <- The base directory

/l2j/source <- Where I store the L2J Server/Datapack checked out from the SVN

/l2j/java <- Where I install the JDK/JVM

/l2j/server <- Where the completed product resides.

 

First let's deal with the Java install. This is actually rather simple. If you downloaded the Sun Java, just change into the /l2j directory then run the binary and then rename the directory to 'java'. If you downloaded the IBM version, change to the /l2j directory and untar, the rename.

 

Example for Sun Java:

cd /l2j

/path/to/jdk-1_5_0_<version>-linux-i586.bin (replace <version> with the actual version #)

mv jdk-1_5_0_01-linux-i586.bin java

 

Example for IBM Java

cd /l2j

tar zxvf /path/to/ibm-java2-sdk-50-linux-i386.tgz

mv ibm-java2-i386-50 java

 

Now we need to get the L2J server and Datapack. This is probably the easiest part of the install.

 

cd /l2j/source

svn

svn

 

Now we need to compile the L2J server. First, put /l2j/java/bin at the start of your path so that ant will use the freshly installed JDK, rather than the system installed on. This examples assumes you're running BASH, which is the default of 99% of the distributions. If you're running ksh or csh, you probably don't need this guide to begin with. Then change into the L2J server source directory and do the compile.

 

export PATH=/l2j/java/bin:${PATH**

cd /l2j/source/trunk/L2_Gameserver

ant

 

This compile should be fairly clean. There is only warning about "Some input files use unchecked or unsafe operations." You can ignore these. You should now have l2j-server.zip in the build directory. Copy this to the /l2j/server directory and extract.

 

cp /l2j/source/trunk/L2_Gameserver/build/l2-server.zip

cd /l2j/server

unzip -a l2-server.zip

 

Congratulations! It's a server without a datapack.

 

Now we need to install the datapack and the SQL files. First, we'll copy the data file into the server directory.

 

cp -a /l2j/source/L2J_Datapack/trunk/datapack_development/data/* /l2j/server/gameserver/data/.

 

Now we need to import the SQL files. The Datapack team has provided a very nice script to run to import the SQL files. Before we run this however, you'll need to create a MySQL server that the l2j server will use. As with the system user, please DO NOT USE ROOT! Using root for anything is bad, very bad. I'm not going to get into how to add a user to MySQL. If you have issues, take a look at mysql_setpermissions installed with MySQL or install PHPMyAdmin and use that. Once you've created a user, run the SQL installation script:

 

cd /l2j/source/L2J_Datapack/trunk/datapack_development/tools

./database_installer.sh

 

It's a fairly straight forward installer, asks you a bunch of questions then imports the data. We're almost there!

 

cd /l2j/server/login/config

** Edit the config files to match your setup

cd ../../gameserver/config

** Edit the config files to match your setup

cd ../data

** Edit the announcements.txt to not be lame!

 

Remember at the beginning of the guide I told you to create a non-root user for the L2J server? Now we are going to change the permissions on all of the installed directories so that the non-root user has access to read/modify the files. On my system I have the user 'lineage2'.

 

cd /l2j

chown -R lineage2 *

 

Now we're going to start up the server to test. We're going to start screen, start the login server in the first screen, create a second screen and start the game server, then test.

 

screen

cd /l2j/server/login

su -c "java -Xms512m -Xmx512m -cp javolution.jar:c3p0-0.9.0.jar:mysql-connector-java-3.1.10-bin.jar:l2jserver.jar net.sf.l2j.loginserver.LoginServer" lineage2

CTRL-A C (Create a new screen)

cd /l2j/server/gameserver

su -c "java -Xms512m -Xmx512m -cp bsf.jar:javolution.jar:bsh-2.0.jar:jython.jar:c3p0-0.9.0.jar:mysql-connector-java-3.1.10-bin.jar:l2jserver.jar net.sf.l2j.gameserver.GameServer" lineage2

 

Viola! You now have a running game server. Of course these command lines were just to test, you'll want to modify the looping startup scripts to fit your needs. One thing to remember. Put the "EXPORT PATH=/l2j/java/bin:${PATH**" command near the start of the script so that it finds the right Java version. If you don't do this, you're server will not properly start or run. Now instead the command lines become

 

su -c "LoginServer_loop.sh" lineage2

su -c "GameServer_loop.sh" lineage2

 

Some additional recommendations for security:

 

1) Do not use the 'root' user for either the MySQL connection name or the user running the L2J server. Always create new users with security limited to just what they need.

2) If you don't already, use iptables to block all incoming traffic from the Internet except on ports that you really need open

3) For optimal security, you should setup the L2J server to run 'jailed' to the /l2j path so that if the server is compromised, the attacker won't get access to any other part of your server. (If I have the energy later, I'll write a guide for L2J security under Linux)

 

Assuming you have all of the system related prerequisites, the entire process of installing the server is about 10 minutes.

 

Credits:preafericitu

Posted

That's usefull too Zeus! Thanks for sharing something like that. I am sure it will help all people who would like to open a server from a linux operation system.

 

ty mate!

  • 2 months later...
Posted

Linux is so confusing, i never will work with it lol

 

whats so confusing in it?if its too hard you can still install a desktop for it ;)

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • I have a highly customized Hi5 pack based on L2JMobius with a lot of features for performance and modern game design. Disclaimer: I do not run any public server, but I run a "private" server for a group of 10 friends and about 2000 AI bots that required me to do heavy modifications on core systems of the game.  So my opinion will obivously be biased towards L2JMobius.   What I can tell you though without bias is: Most of the features you are asking for are nowadays considered de-facto, don't pay money for them. TvT, offline mode, community boards, premiums, vote rewards are in most packs including the open source ones. So before you pay a thousand plus euro for a pack ask yourself what you are paying that money for, that open source packs don't have.   Also a lot of the "strong points" some old packs were made for are nowadays obsolete. L2JFree derived packs for example used to have a lot of GC optimizations (Trove library) which are not not maintained, but most importantly not needed cause Java has evolved a lot since then and the performance issues these tricks tried to solve back then, are currently solved by Java's JVM itself. So if someone tries to sell you packed / unpacked integers in special hashmap data structures and other such things know that they have really lost their value nowadays.    A lot of people are selling thin air, things that everyone has. "Quality geodata" being one of them. I mean what's "quality geodata" ? Has someone painted them by hand ? Hell there's an online tool for free in github that extracts quality geodata, I think Galagard made it ? In contrast I'll tell you without wanting to boast about it that I use 3D navmesh on my project because 2000 bots could not pathfind large distances on A* on geodata. As far as I know, L2JMobius has it in its subscription version too. So if I could do an acceptable transition to navmesh from geodata in a week alone, I would assume that a decent pack with dedicated developers could do it better and faster. Red flag if someone still tries to sell you geodata in 2026.   Multi-protocol support gives small value and is a high risk.   I would not go for multi-protocol support for a public server cause you are locking yourself to specific providers and the functionality they support. If you need to change (eg pricing issues), you will be locked to a handful of providers. And what are you really gaining from a new client on an old game version ? Better UI ? The engine is still the same, static targeting and menus.    Agentic AI will make old hard features easy to implement, and drop their money value. Pay for AI-proof value. And compared to what most insecure devs claim, its a very powerful tool that allows those who know how to use it to accelerate their development. So a lot of features that took in the past a lot of time and effort to be developed and were a reason to charge money, are becoming a commodity today. So think to: The thing I am paying money for right now, how easy will it be to implement in a year from now ? If for example you are paying money for a game launcher that Claude Code can generate in top 1 hour without issues, I think you are wasting money.    I want to emphasise this a lot. Software engineering is in a transition atm. Most things that were mediocre to implement, launchers, guards, CMS, are nowadays easy. Yet the dev community continues to market them as premium content. They are not, sooner or later, when everyone starts selling them, they will realize that they will have to offer value in more complex features.  Private or public ? Bottom line is that a private pack and 1000 euro wont get you a sucessful server. You're the one that make it or break it. There have been many sucessful servers both in private packs and public packs in the past. It's really on the hands of the beholder, not on the source. A pack that plays good is a good indicator to buy as Trance said, but I would disagree that it's not enough. A server owner is not a player. He's a business man and has to account for longevity, vendor lock-in, expandability, hidden costs,  amortization, price changes and many more. Don't pick a pack based on how it played only.    
    • You don’t even need to look for a ghost project. Just buy the files from a project you’ve personally tested or played. That’s a much better starting point.
    • TG Support: https://t.me/buyingproxysup | Channel: https://t.me/buyingproxycom Discord support: #buyingproxy | Server: Join the BuyingProxy Discord Server!  Create your free account here
    • You have to put deep inside your pocket for something like this, for sure 😄
    • Hello everyone, I'm looking for a High Five Java server pack for a long-term project. I'm not looking for free packs. I'm interested in purchasing a professional pack with full source code if it's worth the investment. My priorities are: Stable core Clean and well-structured source code Good geodata and AI Modern Community Board Offline Trade / Offline Craft Premium Account system Vote Reward system Auto Events (TvT, CTF, DM, etc.) HWID protection Auto Farm  Buffer / QoL systems Modern admin tools Good Olympiad & Seven Signs implementation Excellent instance support (Freya, Frintezza, Zaken, Beleth, etc.) A huge bonus would be: Multi-protocol support (High Five + newer clients such as Salvation/Classical clients) Full source code (no closed binaries) Some custom things over Elegia At the moment I'm considering packs like Sunrise and L2-Scripts, but I'd really like to hear opinions from people who have actually worked with them. If you've been running a serious High Five project, I'd appreciate your honest feedback: Which pack are you using? What are its strengths and weaknesses? Would you buy it again? Are there any better alternatives available today? I'm looking for real experience rather than advertisements. Thanks!
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..