Ubuntu Server Compile Walkthrough as of 0.6

Support forum for questions about compiling and running EQ2Emulator on Linux.

Moderator: Team Members

Post Reply
intodesi
Posts: 87
Joined: Wed Feb 06, 2008 8:17 am
Location: Reno, NV

Ubuntu Server Compile Walkthrough as of 0.6

Post by intodesi » Thu Jun 26, 2008 8:17 pm

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.
The IRS, its not an agency, its a service. They do it because they love us.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Post by John Adams » Fri Jun 27, 2008 7:09 am

Stickied! Nice job.
Now if only this could end up in the Wiki! ;)

nyquist
Posts: 29
Joined: Wed Jun 25, 2008 5:25 am
Location: Raleigh, NC

Post by nyquist » Fri Jun 27, 2008 10:14 am

I agree, this is a very nice post; add it to the wiki for us :)
--nyquist

intodesi
Posts: 87
Joined: Wed Feb 06, 2008 8:17 am
Location: Reno, NV

Post by intodesi » Fri Jun 27, 2008 4:56 pm

I will update the wiki now.. if it hasnt been done :)
The IRS, its not an agency, its a service. They do it because they love us.

intodesi
Posts: 87
Joined: Wed Feb 06, 2008 8:17 am
Location: Reno, NV

Post by intodesi » Fri Jun 27, 2008 5:12 pm

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))
The IRS, its not an agency, its a service. They do it because they love us.

twintear
Posts: 5
Joined: Sun Nov 18, 2007 10:57 am

Post by twintear » Tue Oct 28, 2008 2:23 am

wow~~~
it's so helpful...

revrogue
Posts: 3
Joined: Fri Oct 24, 2008 2:22 pm

Post by revrogue » Tue Oct 28, 2008 10:19 am

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.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Post by John Adams » Tue Oct 28, 2008 11:05 am

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.

Andrew
Retired
Posts: 71
Joined: Fri Dec 14, 2007 8:33 am
Location: England
Contact:

Post by Andrew » Thu Oct 30, 2008 5:39 pm

Why are you running eq2world as root for? There's no need to do that.

intodesi
Posts: 87
Joined: Wed Feb 06, 2008 8:17 am
Location: Reno, NV

Post by intodesi » Sun Nov 16, 2008 10:22 pm

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. ;)
The IRS, its not an agency, its a service. They do it because they love us.

bobbydole
Posts: 32
Joined: Mon Jul 28, 2008 1:10 pm

Re: Ubuntu Server Compile Walkthrough as of 0.6

Post by bobbydole » Wed Mar 04, 2009 1:24 pm

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.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Ubuntu Server Compile Walkthrough as of 0.6

Post by John Adams » Wed Mar 04, 2009 1:49 pm

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.

bobbydole
Posts: 32
Joined: Mon Jul 28, 2008 1:10 pm

Re: Ubuntu Server Compile Walkthrough as of 0.6

Post by bobbydole » Wed Mar 04, 2009 2:30 pm

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

User avatar
thefoof
Retired
Posts: 630
Joined: Wed Nov 07, 2012 7:36 pm
Location: Florida

Re: Ubuntu Server Compile Walkthrough as of 0.6

Post by thefoof » Thu Dec 19, 2013 11:21 pm

Updated this guide on wiki to reflect the current SVN makeup.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests