Page 1 of 1

Ubuntu Server Compile Walkthrough as of 0.6

Posted: Thu Jun 26, 2008 8:17 pm
by intodesi
Not: Some of this is copy pasted from the wiki...also.. if you are a better writter rewrite this :)
First you must install MySQL as well as the required dependencies needed from the repositories.

Code: Select all

sudo apt-get install mysql-server libmysqlclient15-dev build-essential subversion
Then you must install lua and its dependencies.

Code: Select all

sudo apt-get install liblua5.1-0-dev
and also

Code: Select all

sudo apt-get install lua5.1
Then
Download the source
To compile and run the server you must install download the source code. For this example we are going to run our server in a folder called eq2server and download the code into a folder called eq2emulator.

Code: Select all

mkdir eq2server
cd eq2server
svn co https://eq2emulator.svn.sourceforge.net/svnroot/eq2emulator eq2emulator
Before downloading the svn, Ubuntu will give you the following.
Error validating server certificate for 'https://eq2emulator.svn.sourceforge.net:443':
- The certificate is not issued by a trusted authority. Use the
fingerprint to validate the certificate manually!
Certificate information:
- Hostname: *.svn.sourceforge.net
- Valid: from Tue, 09 Oct 2007 14:15:07 GMT until Mon, 08 Dec 2008 15:15:07 GMT
- Issuer: Equifax Secure Certificate Authority, Equifax, US
- Fingerprint: fb:75:6c:40:58:ae:21:8c:63:dd:1b:7b:6a:7d:bb:8c:74:36:e7:8a
(R)eject, accept (t)emporarily or accept (p)ermanently?
Type P and enter, it will then download the SVN
Compile it
Now we have downloaded the source we need to compile it. If you are compiling the source on a 64 bit OS then you will need to change the makefile located in the Source/World folder.

Code: Select all

cd eq2emulator/Source/World/
make
This should compile the source code and you will be left with a program called World.
Setting it up
Now you have built the program you need to put all the pieces together. Copy the following files into the eq2server folder.
/eq2emulator/Source/World/eq2world
/eq2emulator/Config Files/EQ2_Structs.xml
/eq2emulator/Config Files/LoginServer.ini
/eq2emulator/Config Files/world_db.ini
/eq2emulator/Config Files/World Structs/WorldStructs.xml
/eq2emulator/Config Files/World Structs/charactersheet_struct.txt
/eq2emulator/Config Files/Common Structs/CommonStructs.xml
/eq2emulator/Config Files/SpawnScripts <--entire Directory
/eq2emulator/Config Files/Spells <-- Entire Directory
Once you have done that you will now have to edit a few files. First open LoginServer.ini
worldname=WORLD_NAME_HERE
worldaddress=EXTERNAL_IP_HERE
#internalworldaddress=INTERNAL_IP_HERE (If used, otherwise blank)
* worldname should be the name you registered your server as on eq2emulator.net.
* worldaddress should be your IP address as seen by other people. If you do not know your IP address you can get it from whatismyip.com
* internalworldaddress is your internal IP address in cases where you are behind a router you may have a different IP address as seen from the outside.
After that you must then edit world_db.ini which holds your database information.
host=ip address
user=username
password=password
database=eq2
* host refers to your MySQL IP address. If your MySQL database is on the same computer that is running that server then put "localhost" (without quotes)
* user is your MySQL username that you want the login server to connect to your database with
* password is your MySQL password
* database is the name of the database on your MySQL server. You must create this database before you start the server.
Starting Your World
After you have completed the entire compilation process without error the following will start your world

Code: Select all

cd eq2server
sudo ./eq2world
To stop your world the following will need to be typed
((To stop your world.. sometimes ctrl C works.. others hit F2 to open a new terminal and type

Code: Select all

pkill eq2world
if like me and use putty on windows to control you linux box, simply close putty.. or like me if you run webadmin.. set up a cron job to start and stop yourself at desired days and times ((i do this to keep things refreshed)) and webadmin also alows you to control process (kill or terminate them) and also run commands ((pkill eq2server))
If you need help with an Ubuntu install.. and I missed something in this Walkthrough.. just yell at me.. and I will remember what I did.. i just drink to much and end up forgetting half the shit I do untill someone reminds me.

Posted: Fri Jun 27, 2008 7:09 am
by John Adams
Stickied! Nice job.
Now if only this could end up in the Wiki! ;)

Posted: Fri Jun 27, 2008 10:14 am
by nyquist
I agree, this is a very nice post; add it to the wiki for us :)

Posted: Fri Jun 27, 2008 4:56 pm
by intodesi
I will update the wiki now.. if it hasnt been done :)

Posted: Fri Jun 27, 2008 5:12 pm
by intodesi
Ok Wiki is updated :).. but all you people who use ubuntu.. and i missed something.. just ask.. I will remember the forgotten steps.. like i said.. I Drink too much ((if thats even possible))

Posted: Tue Oct 28, 2008 2:23 am
by twintear
wow~~~
it's so helpful...

Posted: Tue Oct 28, 2008 10:19 am
by revrogue
Yes I agree this is beyond helpfull, however you might add in there that the update port is now 9102, else there will be an error when trying to run the server.

Posted: Tue Oct 28, 2008 11:05 am
by John Adams
To avoid any confusion, the standard login server port for "release" code is 9101.
If you are using "development" code, fetching from SVN as in this guide, you should use port 9102.
I do not want Release users to think 9101 is invalid.

Posted: Thu Oct 30, 2008 5:39 pm
by Andrew
Why are you running eq2world as root for? There's no need to do that.

Posted: Sun Nov 16, 2008 10:22 pm
by intodesi
I am running as root because its a test server thats offline. Sorry i didnt make it a point to let people know not to do that.. I just made the assumption people knew better. ;)

Re: Ubuntu Server Compile Walkthrough as of 0.6

Posted: Wed Mar 04, 2009 1:24 pm
by bobbydole
In order to for the make proccess to finish completely, I had to modify the makefile..

Code: Select all

nano Source/World/makefile
Change :
LINKOPTS=-rdynamic -L. -lstdc++ -lm -lz -L/usr/lib/mysql -L/usr/mysql/lib -lmysqlclient -llua-5.1 -ldl
to
LINKOPTS=-rdynamic -L. -lstdc++ -lm -lz -L/usr/lib/mysql -L/usr/mysql/lib -lmysqlclient -llua5.1 -ldl
Notice the -llua5.1 instead of -llua-5.1

I'm running Ubuntu 8.10.

Re: Ubuntu Server Compile Walkthrough as of 0.6

Posted: Wed Mar 04, 2009 1:49 pm
by John Adams
Oh, that. Yeah, I had to change mine for Fedora, too... to -llua (remove the 5.1 completely).

At least I used to, I honestly haven't done a complete checkout on Linux in some time.

Re: Ubuntu Server Compile Walkthrough as of 0.6

Posted: Wed Mar 04, 2009 2:30 pm
by bobbydole
Ok, I've got my server all setup, but I noticed there were no instructions on setting up the DB, not sure I've just missed this, or it's not there. Here's what I did:

Start up mysql, login using the root user

Code: Select all

bobbydole@scruffy:~/eq2server$ mysql -u root -p
Then create the eq2 database:

Code: Select all

mysql> create database eq2;
Query OK, 1 row affected (0.17 sec)
Add a user eq2 with a password of password, and grant them access to the eq2 database:

Code: Select all

mysql> GRANT ALL PRIVILEGES ON eq2.* TO 'eq2'@'localhost' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)
It can be confusing since the user is the same as the db, but the 'TO 'eq2'@'localhost' ' is the user, eq2 from localhost. The ON eq2.* is the database name.

Update world_db.ini with the new user

Code: Select all

[Database]
host=localhost
user=eq2
password=password
database=eq2

Re: Ubuntu Server Compile Walkthrough as of 0.6

Posted: Thu Dec 19, 2013 11:21 pm
by thefoof
Updated this guide on wiki to reflect the current SVN makeup.