Lineage 2 свой сервер linux

L2J Server

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com

[Guide] L2J Server on Linux 2017

Post by amadejs » Sat Dec 09, 2017 12:02 am

How to run L2j Hi5 server on Linux Debian/Ubuntu server operating systems.

################## Disclaimer ###########################
This guide IS NOT security based and it is for testing
only. Use at your own risk! Also this guide will not
describe how to install and configure game client.
#########################################################

Tested on Ubuntu/Debian server operating systems (01.12.2017).

From my personal experienceon VirtualBox minimal server requirements for few palyers:
1 VCPU
3G RAM
20 GB HDD

1) Install server operating system. I recommend keep as minimal as possible, install minimal server software + openssh-server.

2) Connect to your server via SSH client putty or other and preapre software:

$ apt-get install git-core openjdk-8-jdk vim htop dstat unzip
$ mkdir ~/development $ mkdir ~/server $ cd ~/development/
 $ git clone https://bitbucket.org/l2jserver/l2j_server.git $ git clone https://bitbucket.org/l2jserver/l2j_datapack.git
$ cd ~/development/l2j_datapack $ ./gradlew
$ cd ~/development/l2j_server/ $ ./gradlew 
$ mv ~/development/l2j_datapack/build/distributions/L2J_DataPack_2017-12-08.zip ~/server/ $ mv ~/development/l2j_server/build/distributions/L2J_Server_2017-12-08.zip ~/server/ $ cd ~/server/ $ unzip L2J_Server_2017-12-08.zip $ unzip L2J_DataPack_2017-12-08.zip $ mkdir ~/server/game/log $ mkdir ~/server/login/log $ chmod 750 ~/server/login/*.sh $ chmod 750 ~/server/game/*.sh
$ sudo apt-get install mysql-server
 $ service mysql status $ netstat -anp | grep :3306
mysql> create database l2jgs; mysql> create database l2jls; mysql> grant insert, select, update, delete, alter, create, trigger, drop, index on l2jls.* to 'l2lsuser'@'localhost' identified by 'D0ntUs3SamePassw0rds'; mysql> grant insert, select, update, delete, alter, create, trigger, drop, index on l2jgs.* to 'l2gsuser'@'localhost' identified by 'MySup3rComplexPassw0rd';
$ cd ~/server/sql/login/ $ for i in `ls | grep .sql`; do sudo mysql --defaults-file=/etc/mysql/debian.cnf l2jls < $i; done
$ cd ~/server/sql/game/ $ for i in `ls | grep .sql`; do sudo mysql --defaults-file=/etc/mysql/debian.cnf l2jgs < $i; done 

10) Edit config files and provide database user and password. . These passwords and usernames are only for example .

$ nano ~/server/login/config/LoginServer.properties
$ nano ~/server/game/config/Server.properties
$ cd ~/server/login/; ./startLoginServer.sh
$ tail ~/server/login/log/stdout.log

[09/12 00:37:41] Listening for GameServers on 127.0.0.1:9014
[09/12 00:37:41] Telnet server is currently disabled.
[09/12 00:37:41] L2LoginServer: is now listening on: *:2106

$ cd ~/server/game/; ./startGameServer.sh
$ tail ~/server/game/log/stdout.log 

[09/12 01:11:22] Connecting to login on 127.0.0.1:9014
[09/12 01:11:22] Registered on login as Server 1: Bartz
[09/12 01:11:22] GameServer: is now listening on: *:7777

Читайте также:  Kaspersky mail gateway linux

Re: [Guide] L2J Server on Linux 2017

Post by KGB1st » Sat Dec 09, 2017 4:05 am

looks like good stuff, but linux users nedeed a bash script..
last my modification on my testing server supports a batch script for updating the server from git repo, whith recompilation and installation

Re: [Guide] L2J Server on Linux 2017

Post by amadejs » Sat Dec 09, 2017 8:05 am

I agree that bash/python script for automation is useful. But my goal was to show how to put all puzzle pieces together.
It is better to know what is under the hood at first, after that you can make your automation script for your own taste. But will see, maybe i will post some script for automation.

Advanced User

Sacrifice Advanced User
Posts:1025 Joined:Thu Aug 14, 2014 6:31 am Location:Spain

Re: [Guide] L2J Server on Linux 2017

Post by Sacrifice » Sat Dec 09, 2017 6:00 pm

Retail GameMaster and Developer using Eclipse for Java Developers (64 bits), OpenJDK14 (64 bits), MySQL 8.0+ (64 bits).

Re: [Guide] L2J Server on Linux 2017

Post by Luven » Tue Oct 16, 2018 9:07 pm

$ cd ~/development/l2j_datapack $ ./gradlew
$ cd ~/development/l2j_server/ $ ./gradlew 

Build Failed. Here's the output.

Build in build/distributions/L2J_Server_2018-10-16.zip > Task :compileJava FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileJava'. > Could not target platform: 'Java SE 10' using tool chain: 'JDK 8 (1.8)'. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 0s 

Btw I'm running Linux Centos 7, building the datapack is OK, building the server. FAIL.

Читайте также:  Преимущества виндовс 10 перед линукс

Can anyone help at this? Please??

Re: [Guide] L2J Server on Linux 2017

Post by regenx » Sat Oct 27, 2018 3:48 am

building the server. FAIL. - related to Eclipse (check if you have same JRE version or JDK) and not to Linux.

@adamejs
You forgot to use nohup (for remote connections).

Re: [Guide] L2J Server on Linux 2017

Post by Luven » Tue Oct 30, 2018 3:50 pm

$ cd ~/development/l2j_datapack $ ./gradlew
$ cd ~/development/l2j_server/ $ ./gradlew 

Build Failed. Here's the output.

Build in build/distributions/L2J_Server_2018-10-16.zip > Task :compileJava FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileJava'. > Could not target platform: 'Java SE 10' using tool chain: 'JDK 8 (1.8)'. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 0s 

Btw I'm running Linux Centos 7, building the datapack is OK, building the server. FAIL.

Can anyone help at this? Please??

Solved. I just installed another version of Java (1.10+ to compile the server, while the datapack works with 1.8 ). Working with 2 Java environments works fine with me.
Just to have an idea: https://stackoverflow.com/questions/439 . 7-1-7?rq=1

But now I'm stuck at point 9 . Output is:

[xxx@new-host login]# for i in `ls | grep .sql`; do sudo mysql --defaults-file=/etc/mysql/debian.cnf l2jls < $i; done Could not open required defaults file: /etc/mysql/debian.cnf Fatal error in defaults handling. Program aborted 

But Mysql server IS installed and active, previous steps are ok.
Google seems not to be helping..

Читайте также:  Линукс интернет через телефон

Advanced User

Sacrifice Advanced User
Posts:1025 Joined:Thu Aug 14, 2014 6:31 am Location:Spain

Re: [Guide] L2J Server on Linux 2017

Post by Sacrifice » Fri Nov 02, 2018 1:38 pm

Retail GameMaster and Developer using Eclipse for Java Developers (64 bits), OpenJDK14 (64 bits), MySQL 8.0+ (64 bits).

Источник

Оцените статью
Adblock
detector