Page 1 of 2
Help with linux install
Posted: Mon Aug 19, 2013 2:52 pm
by emada
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision
Number: latest
L2JDP Revision
Number: latest
Im trying to install L2J on ubuntu 12.04 using this wiki help page -
http://l2jserver.com/wiki/Setup_Server_-_Linux
I got as far as :
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;
After that its gets a little cloudy. Anyone know what happens in steps 2,3, and so on or have any tips on what to do next? Thank you.
Re: Help with linux install
Posted: Mon Aug 19, 2013 5:17 pm
by jurchiks
2) cd /home/username/
md l2jserver
cd l2jserver
unzip l2j_server.zip and l2j_datapack.zip (or whatever their names are) in this folder
3) cd tools
./database_installer.sh (follow the instructions)
4) cd /home/username/l2jserver/login/config, edit .properties files (nano LoginServer.properties)
cd /home/username/l2jserver/game/config, edit .properties files (nano Server.properties)
5) cd /home/username/l2jserver/login/
./RegisterGameServer.sh
when game server is registered, you must move the generated hexid.txt from the current directory to gameserver/config dir:
mv hexid.txt /home/username/l2jserver/game/config/
also, you can register your admin account via
./startSQLAccountManager.bat
and after that
./LoginServer_loop.sh (not startLoginServer.sh!)
that's login server part, now game server:
cd /home/username/l2jserver/game/
./GameServer_loop.sh
That should be approximately it, but I have never ran l2j on a linux box so I might be wrong somewhere.
Re: Help with linux install
Posted: Mon Aug 19, 2013 6:26 pm
by UnAfraid
u missed chmod +x to bash scripts
also in unstable branch server registration is not required since its auto accept by default (only on localhost)
Re: Help with linux install
Posted: Mon Aug 19, 2013 6:44 pm
by emada
database_installer.sh gives this error:
Code: Select all
user@server01:/var/L2J/tools$ sudo chmod +x database_installer.sh user@server01:/var/L2J/tools$ sudo ./database_installer.sh
No output when running above cmd
Code: Select all
user@server01:/var/L2J/tools$ ./database_installer.sh bash: ./database_installer.sh: /bin/bash^M: bad interpreter: No such file or directoryuser@server01:/var/L2J/tools$ bash database_installer.bash: database_installer.: No such file or directory
w/o sudo
Code: Select all
user@server01:/var/L2J/tools$ bash database_installer.sh : invalid signal specification: trap: 2database_installer.sh: line 38: $'\r': command not founddatabase_installer.sh: line 39: syntax error near unexpected token `$'{\r'''atabase_installer.sh: line 39: `configure() {
trying to use bash
Code: Select all
user@server01:/var/L2J/tools$ sh database_installer.sh : bad trap: not foundstaller.sh: 38: database_installer.sh: ############################################## You entered script configuration area ## No change will be performed in your DB ## I will just ask you some questions about ## your hosts and DB. ##############################################database_installer.sh: 88: database_installer.sh: Syntax error: "elif" unexpected (expecting "then")
trying to use sh i see the script calls for bash but i thought i would try anyway.
yes i have bash
Code: Select all
user@server01:/var/L2J/tools$ bash -versionGNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu)Copyright (C) 2011 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.
ideas?
Re: Help with linux install
Posted: Mon Aug 19, 2013 8:31 pm
by JMD
emada wrote:database_installer.sh gives this error:
Code: Select all
user@server01:/var/L2J/tools$ sudo chmod +x database_installer.sh user@server01:/var/L2J/tools$ sudo ./database_installer.sh
No output when running above cmd
Code: Select all
user@server01:/var/L2J/tools$ ./database_installer.sh bash: ./database_installer.sh: /bin/bash^M: bad interpreter: No such file or directoryuser@server01:/var/L2J/tools$ bash database_installer.bash: database_installer.: No such file or directory
w/o sudo
Code: Select all
user@server01:/var/L2J/tools$ bash database_installer.sh : invalid signal specification: trap: 2database_installer.sh: line 38: $'\r': command not founddatabase_installer.sh: line 39: syntax error near unexpected token `$'{\r'''atabase_installer.sh: line 39: `configure() {
trying to use bash
Code: Select all
user@server01:/var/L2J/tools$ sh database_installer.sh : bad trap: not foundstaller.sh: 38: database_installer.sh: ############################################## You entered script configuration area ## No change will be performed in your DB ## I will just ask you some questions about ## your hosts and DB. ##############################################database_installer.sh: 88: database_installer.sh: Syntax error: "elif" unexpected (expecting "then")
trying to use sh i see the script calls for bash but i thought i would try anyway.
yes i have bash
Code: Select all
user@server01:/var/L2J/tools$ bash -versionGNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu)Copyright (C) 2011 Free Software Foundation, *fork*.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.
ideas?
why you torture yourself dude? Set up your server on your windows pc and then upload the files to your linux.
Re: Help with linux install
Posted: Mon Aug 19, 2013 8:37 pm
by emada
JMD wrote:
why you torture yourself dude? Set up your server on your windows pc and then upload the files to your linux.
well i would still need to run that database set up script, and i dont really have a windows pc to use.
Re: Help with linux install
Posted: Mon Aug 19, 2013 10:36 pm
by NosBit
emada wrote:database_installer.sh gives this error:
Code: Select all
user@server01:/var/L2J/tools$ sudo chmod +x database_installer.sh user@server01:/var/L2J/tools$ sudo ./database_installer.sh
No output when running above cmd
Code: Select all
user@server01:/var/L2J/tools$ ./database_installer.sh bash: ./database_installer.sh: /bin/bash^M: bad interpreter: No such file or directoryuser@server01:/var/L2J/tools$ bash database_installer.bash: database_installer.: No such file or directory
w/o sudo
Code: Select all
user@server01:/var/L2J/tools$ bash database_installer.sh : invalid signal specification: trap: 2database_installer.sh: line 38: $'\r': command not founddatabase_installer.sh: line 39: syntax error near unexpected token `$'{\r'''atabase_installer.sh: line 39: `configure() {
trying to use bash
Code: Select all
user@server01:/var/L2J/tools$ sh database_installer.sh : bad trap: not foundstaller.sh: 38: database_installer.sh: ############################################## You entered script configuration area ## No change will be performed in your DB ## I will just ask you some questions about ## your hosts and DB. ##############################################database_installer.sh: 88: database_installer.sh: Syntax error: "elif" unexpected (expecting "then")
trying to use sh i see the script calls for bash but i thought i would try anyway.
yes i have bash
Code: Select all
user@server01:/var/L2J/tools$ bash -versionGNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu)Copyright (C) 2011 Free Software Foundation, *fork*.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.
ideas?
Try to remove windows line endings from database_installer.sh
Re: Help with linux install
Posted: Mon Aug 19, 2013 11:19 pm
by emada
Nos wrote:
Try to remove windows line endings from database_installer.sh
that was it. thanx Nos
Re: Help with linux install
Posted: Tue Aug 20, 2013 9:00 am
by jurchiks
Now, if those Windows EOLs are in the repository, that should be fixed. Somebody should check it out, possibly other .sh files have the same thing.
Re: Help with linux install
Posted: Tue Aug 20, 2013 12:59 pm
by emada
jurchiks wrote:Now, if those Windows EOLs are in the repository, that should be fixed. Somebody should check it out, possibly other .sh files have the same thing.
database_installer.sh was the only one I had issues with. Thanks to everyone in this thread for all your help!!
Re: Help with linux install
Posted: Tue Aug 20, 2013 1:01 pm
by Konstantinos
emada wrote:jurchiks wrote:Now, if those Windows EOLs are in the repository, that should be fixed. Somebody should check it out, possibly other .sh files have the same thing.
database_installer.sh was the only one I had issues with. Thanks to everyone in this thread for all your help!!
if you have any problem ask me i use linux too.
Re: Help with linux install
Posted: Tue Aug 20, 2013 1:06 pm
by emada
Konstantinos wrote:if you have any problem ask me i use linux too.
Ok cool will do. Mind if I add you as a friend on this forum?
Re: Help with linux install
Posted: Tue Aug 20, 2013 1:13 pm
by Konstantinos
yes np
Re: Help with linux install
Posted: Tue Aug 20, 2013 6:49 pm
by UnAfraid
Nos fixed it already
Re: Help with linux install
Posted: Mon Nov 11, 2013 8:33 pm
by wormdrive
I'm having the same errors.
Would you mind showing where the EOL was removed in the .sh? I can't find where to remove it from - or should I [find] to remove?
I have chmod -x databaseinstaller.sh
and also I am getting the same error "command not found" with any other .sh (example startGameServer.sh)
Tried with sudo and sh - and get error.
sh gives the error:
: invalid signal specification: trap: 2
database_installer.sh: line 38: $'\r': command not found
database_installer.sh: line 39: syntax error near unexpected token `$'{\r''
'atabase_installer.sh: line 39: `configure() {