Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Linux Servers

Support::Linux Servers Support forum for Linux EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-09-2010, 10:31 PM
arggonuts
Fire Beetle
 
Join Date: Jan 2010
Posts: 15
Default Newbie Help: Modern Setup Guide?

I'm sure you get quite a few threads about this, so I apologize, but I haven't been able to figure this out. As stated, I'm a newbie to Linux and to EQEmu. I tried setting it up on my Windows 7 file server but as expected it would not successfully run. I'd get hung up on launching the new loginserver, but that's for an entirely other thread.

All said and done, I'm running Linux Mint on my server box for the explicit purpose of running an EQEmu server over my LAN. I've been bouncing between the setup guides for both Windows and Linux and I'm just not able to get it to work. By no means am I a computer newbie and I'm very easily trainable, but I just can't find a guide that utilizes the latest sources.

Anyways, I'm breaking down and I'm going to try to use the AX Classic just to get it to work, bit I'd really like to be able to build it on the Linux end from scratch. Thanks in advance for any help you all can provide.
Reply With Quote
  #2  
Old 01-09-2010, 11:10 PM
prickle
Hill Giant
 
Join Date: Sep 2009
Posts: 147
Default

I use Ubuntu for my Linux box, so I predominently used this Wiki when I setup my EQEmu server:
http://www.eqemulator.net/wiki/wikka...ianLinuxServer

I did a ~brief~ read up on Mint and it is based on Debian. So, Mint uses a similar package manager (GUI wise) (it uses the exact same package manager tool via command line ... "apt-get") to Debian and Ubuntu. So, the above Debian guide should give you a decent base to work with. You'll need to figure out which parts of the guide do and don't apply to your setup, but the Debian guide covers everything you need to get an EQEmu server up and running...

Once the prerequisits are taken care of the following is used to make updates:

1) Grab the SVN Source (consult your distro's documentation on installing SVN if it isn't already installed)
Code:
svn checkout http://projecteqemu.googlecode.com/svn/trunk/ projecteqemu-read-only
2) Patch the makefiles, if your Linux box isn't Intel hardware (I use AMD):
Code:
grep -Ril i686 * | xargs perl -pi -e 's/i686/native/g'
grep -Ril Di386 * | xargs perl -pi -e 's/ -Di386//g'
3) Make clean:
Code:
make clean
4) Make:
Code:
make
5) Copy your current server to make a new server directory for the new build (I use revision numbers to identify builds):
Code:
cp -r <old revision> <new revison>
6) Copy new binaries into the new server directory:
Code:
cp <build dir>/world/world <new server dir>/world
cp <build dir>/zone/zone <new server dir>/zone
cp <build dir>/EMuShareMem/libEMuShareMem.so <new server dir>/libEMuShareMem.so
cp <build dir>/eqlaunch/eqlaunch <new server dir>/eqlaunch
cp <build dir>/utils/cleanipc <new server dir>/cleanipc
hope this helps
Reply With Quote
  #3  
Old 01-09-2010, 11:15 PM
arggonuts
Fire Beetle
 
Join Date: Jan 2010
Posts: 15
Default

Thanks for the reply. This looks like it will help. I will let you know!
Reply With Quote
  #4  
Old 01-10-2010, 12:19 AM
arggonuts
Fire Beetle
 
Join Date: Jan 2010
Posts: 15
Default

I'm getting the same error that I had been getting with the sources I'd downloaded without SVN.

Code:
..//common/SocketLib/Mime.cpp -o ../common/SocketLib/Mime.o
..//common/SocketLib/Mime.cpp: In member function 'bool Mime::LoadMimeFile(conststd::string&)':
..//common/SocketLib/Mime.cpp:40: error: 'fopen' was not declared in this scope
..//common/SocketLib/Mime.cpp:42: error: 'fgets' was not declared in this scope
..//common/SocketLib/Mime.cpp:43: error: 'feof' was not declared in this scope
..//common/SocketLib/Mime.cpp:61: error: 'fclose' was not declared in this scope
make[1]: *** [../common/SocketLib/Mime.o] Error 1
make[1]: Leaving directory '/home/ken/projecteqemu-read-only/EQEmuServer/world'
make: *** [all] Error 2
My box is an Intel BOXD945GCLF2D Intel Atom processor 330 Intel 945GC Mini ITX Motherboard/CPU Combo so I don't believe step 2 applied to me.

I tried using Ubuntu, but it gave me quite a few graphics driver problems so I tried Mint instead.

Anyways, this is about as far as I've been able to get compiling myself. I get rather lost if I just try to use the pre-compiled "EQEmu-Rev1052-Bots.zip".

I never got too into cpp so I wouldn't be able to see an error in the Mime.cpp file anyways.

Again, thanks for any help you can provide.

EDIT: I just found the thread the same or similar error. I'll post back after trying that.
Reply With Quote
  #5  
Old 01-10-2010, 03:10 AM
arggonuts
Fire Beetle
 
Join Date: Jan 2010
Posts: 15
Default

Alright, Everything is good, though I'm not sure how to proceed after what you've given me. The other guides from here on aren't really helping me much. I know what I need to do, but not really how to do it in Linux with updated links and such. So if anyone else can help me out with the building the database, and all the rest of that jazz.

I'll keep working on it. Thanks for any help.
Reply With Quote
  #6  
Old 01-10-2010, 05:21 AM
prickle
Hill Giant
 
Join Date: Sep 2009
Posts: 147
Default

for database stuff it's fairly straight forward. If you do not have the phpMyAdmin package installed on Mint then you can always use command line.

With command line you'll do something like:
Code:
mysql -u<User Name> -p
<type in password>
after the above you will be greeted with a mysql prompt ( mysql> ). You'll want to log in as the admin user for your MySQL installation (usually 'root' on typical Linux installs) during the above steps.

Next you will want to run the following commands:
Code:
create <database name>;
use <database name>;
source <path to .sql files>;
With the above it's a little bit easier if you 'cd' to the directory with your database files (sql files) first. That way you can just use "source <filename>" to import the SQL file. Repeat for all the other SQL files you need to import.

Optionally, if you have phpMyAdmin installed you can do the following:
.point your web browser to your servers phpMyAdmin (on my box it's http://localhost/phpmyadmin/)
.log in as the MySQL admin/root user
.in the "MySQL localhost" section of the first page after logging in, type in a database name you want to use for this
.click create
.Click the databases tab
.Click the database you just created
.click the Import tab
.Click browse
.locate your sql files
.Select ONE of them
.Click open
.Click Go
.Repeat for however many files you need to import

hope this helps
Reply With Quote
  #7  
Old 01-10-2010, 05:42 AM
arggonuts
Fire Beetle
 
Join Date: Jan 2010
Posts: 15
Default

It did. I sort of figured that out on my own though, but you clarified that I did it correctly. Now I'm hung up the startup script and getting a login server.

I'll be in a unique situation with no internet access and serving to a LAN, so I believe minilogin server is the only way for me, but I'm confused as to how to make it work in Linux. Works perfectly fine under windows, which is lovely that something actually does. I got all the tables entered into the database, but now I'm confused if minilogin server will be running client-side or server-side. Because of that, I'm confused about ip addresses and such in the configs.

The only thing now though is I'm constantly wondering if I left something out due to the differences in all the guides and my own knowledge. Oh well, only one way to find out once I get the server started and a login set up.
Reply With Quote
  #8  
Old 01-10-2010, 03:40 PM
prickle
Hill Giant
 
Join Date: Sep 2009
Posts: 147
Default

My server ~only~ serves my LAN. So, I use the "privatelogin" server found on the following .... errrr... forgot external links not allowed... Google for "eqemu privatelogin" it comes up as the first one (devnoob site).

The login server runs server side.

Also, Make sure you UNcomment out the following lines in your eqemu_config.xml file:
Code:
		<address>YOUR-LAN-IP</address>
		<localaddress>YOUR-LAN-IP</localaddress>

		<loginserver>
			<host>YOUR-LAN-IP</host>
			<port>5998</port>
			<account>YOURINFO</account>
			<password>YOURINFO</password>
		</loginserver>
The first two lines in the above code block kicked my ass, because I forgot to UNcomment them (remove <!-- and --> from those particular lines).
Reply With Quote
  #9  
Old 01-10-2010, 04:25 PM
arggonuts
Fire Beetle
 
Join Date: Jan 2010
Posts: 15
Default

I swear you're standing right behind me. I'm messing with the eqemu_config.xml right now.

Thanks for the info on the private loginserver. I'll be checking that out. Things are slowly but surely coming together. Couple things though:

My eqemu_config.xml doesn't exist in my server directory. Not sure if I was supposed to create it from scratch or what not. I'll be nabbing one from the 1052 build, copying it over and editing it as needed. I think that's right.

The start/stop scripts. I've been following the "Advanced EqEmu Linux Setup" in the wiki as much as I can, and that's just not working at all for me. I was messing around with "./world" and I get the error
Code:
Unable to load 'eqemu_config.xml" : Failed to open file
That's basically where I'm at now. No idea how to work the start/stop scripts and about to start messing with the eqemu_config.xml.

Anyways, thanks. Hopefully we can create a decent newbie guide out of this thread when we're done.
Reply With Quote
  #10  
Old 01-10-2010, 05:01 PM
prickle
Hill Giant
 
Join Date: Sep 2009
Posts: 147
Default

This line from the tutorial I linked (the Debian tutorial) sets up the default files:
ln -s ../source/EQEmu-0.7.0-1118/utils/defaults/* .

I personally perfer to copy the files so I use:
Code:
cp -R <build dir>/utils/defaults/* <new serer dir>/
That will copy the default eqemu_config.xml file to your server dir. However, it will be named "eqemu_config.xml.full". Change the name of that file to "eqemu_config.xml" with the following commands:
Code:
rm -f eqemu_config.xml
mv eqemu_config.xml.full eqemu_config.xml
Then edit the file to suit your needs.

The start up scripts that work are also found in the tutorial that I linked earlier:

"start" script:
Code:
#!/bin/sh

#ulimit -c 99999999

rm -f .zone_shutdown
rm -f .world_shutdown

set -x

LNAME="zone"     #launcher name
if [ "$1" = "test" ]; then
        LNAME="test"
fi

P=`pwd`
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$P"

#make sure we have a place to log
mkdir -p logs 2>&1 > /dev/null

#clear out old logs, if both are stopped
if [ ! -e .lock-zones -a ! -e .lock-world ] ; then
  for f in logs/eqemu_*.log
  do
        if [ "$f" = "logs/eqemu_commands_zone.log" ]; then
                continue;
        fi

        rm -f $f
  done
fi

#boot up world
if [ ! -e .lock-world ] ; then
        touch .lock-world
#       ./world 2>&1 > logs/world &
        ./persist_world 2>&1 > logs/world &
        # wait for shared memory to load
        sleep 15
fi

#start up the official launcher
if [ ! -e .lock-launcher ]; then
        touch .lock-launcher
        ./eqlaunch $LNAME 2>&1 > logs/launcher &
fi
"stop" script:
Code:
#!/bin/sh

touch .zone_shutdown
touch .world_shutdown

killall world eqlaunch zone
sleep 3

if ps ax|grep -e 'w[o]rld' -e 'z[o]ne' -e 'eq[l]aunch' >/dev/null; then
                killall -9 world eqlaunch zone
                sleep 2
fi

./cleanipc
rm -f .lock-zones .lock-world .lock-login .lock-launcher
"persist_world" script:
Code:
#!/bin/sh

#ulimit -c 99999999

while true
do
        ./world "$@"
        if [ -r ".world_shutdown" ]; then
                exit 0
        fi

        echo `date` "World crashed." >>crashlog
        sleep 2
done
Once you create those files you need to make them "executable". You can do that with the following command:
Code:
chmod +x <file name>
Reply With Quote
  #11  
Old 01-10-2010, 05:09 PM
arggonuts
Fire Beetle
 
Join Date: Jan 2010
Posts: 15
Default

Awesome, Thanks for the scripts. I'll let you know how they go when I get to them. Right now I'm troubleshooting ./world.
Code:
[Debug] [RULES__ERROR] Unable to find rule 'Bots:BotManaRegen'
[Debug] [RULES__ERROR] Unable to interpret rule record for Bots:BotManaRegen
[Debug] [RULES__ERROR] Unable to find rule 'Bots:BotFinishBuffing'
[Debug] [RULES__ERROR] Unable to interpret rule record for Bots:BotFinishBuffing
[Debug] [RULES__ERROR] Unable to find rule 'Bots:CreateBotCount'
[Debug] [RULES__ERROR] Unable to interpret rule record for Bots:CreateBotCount
[Debug] [RULES__ERROR] Unable to find rule 'Bots:SpawnBotCount'
[Debug] [RULES__ERROR] Unable to interpret rule record for Bots:SpawnBotCount
[Debug] [RULES__ERROR] Unable to find rule 'Bots:BotQuest'
[Debug] [RULES__ERROR] Unable to interpret rule record for Bots:BotQuest
[Debug] [RULES__ERROR] Unable to find rule 'Bots:BotGroupBuffing'
[Debug] [RULES__ERROR] Unable to interpret rule record for Bots:BotGroupBuffing
[Debug] [RULES__ERROR] Unable to find rule 'Bots:BotSpellQuest'
[Debug] [RULES__ERROR] Unable to interpret rule record for Bots:BotSpellQuest
[Debug] [WORLD__INIT] Loaded default rule set 'default'
[Debug] [WORLD__INIT] Clearing temporary merchant lists..
[Debug] [WORLD__INIT] Loading EQ time of day..
[Debug] [WORLD__INIT] Loading launcher list..
[Debug] [WORLD__INIT] Reboot zone modes ON
[Debug] [WORLD__INIT] Deleted 0 stale player corpses from database
[Debug] [WORLD__INIT] Deleted 0 stale player backups from database
[Debug] [WORLD__INIT] Purging expired instances
[Debug] [WORLD__INIT] Zone (TCP) listener started.
[Debug] [WORLD__INIT] Client (UDP) listener started.
[Debug] [COMMON__THREADS] Starting EQStreamFactoryReaderLoop with thread ID -1293640848
[Debug] [COMMON__THREADS] Starting EQStreamFactoryWriterLoop with thread ID -1302033552
[Debug] [NET__IDENTIFY] Registered patch 6.2
[Debug] [NET__IDENTIFY] Registered patch Titanium
[Debug] [NET__IDENTIFY] Registered patch SoF
[Debug] [WORLD__LS] Connecting to login server...
[Debug] [COMMON__THREADS] Starting TCPConnectionLoop with thread ID -1321206928
[Debug] [WORLD__LS_ERR] Could not connect to login server: TCPConnection::Connect(): connect() failed. Error: Connection refused
That's where I'm at right now. A lot of it looks like stuff I can figure out pretty easily. I've hung up on the bots issues right now though. I'd like to get everything working flawlessly because after Friday I won't have a stable internet connection for about 2 months.

EDIT: Yep, figured out everything but the bots issues. When I (re)source the load_bots.sql it says duplicate entries, but I can't find the entries at all in MySQL admin. Not sure how familiar you are with bots.
Reply With Quote
  #12  
Old 01-10-2010, 05:16 PM
prickle
Hill Giant
 
Join Date: Sep 2009
Posts: 147
Default

you need to source in the bots.sql file. This file can be found in the <build dir>/utils/sql/svn/ directory.

You also need to do the following:
Code:
cp -R <build dir>/utils/patch_* <new server dir>/
It also looks like your login server isn't configured properly. You'll need to fix that config file as well.
Reply With Quote
  #13  
Old 01-10-2010, 05:53 PM
arggonuts
Fire Beetle
 
Join Date: Jan 2010
Posts: 15
Default

Alright. Looks like I'll be set. I'll let you know how it goes.

I knew I'd have to mess with the login stuff. I'm just now working on the login server you suggested. Thanks again!
Reply With Quote
  #14  
Old 01-10-2010, 08:36 PM
arggonuts
Fire Beetle
 
Join Date: Jan 2010
Posts: 15
Default

Here's where I'm at now. Loginserver:
Code:
ken@ken-server ~/loginserver $ ./privatelogin
Using database 'loginserver' at localhost
Reading LoginServer.ini...
[LS-Config] Server Name: eqemu
[LS-Config] Server Description: eqemu
LoginServer.ini read.
Server mode: Private Login
============================
EQEmu Private Login v1.04PL
http://eqemu.devnoob.com
============================
EQNetworkServer.Open() error
Segmentation fault
Here's my .ini(s) for privatelogin:
Code:
db.ini
[Database]
host=localhost
user=ken
password=password
database=loginserver
Code:
loginserver.ini
[LoginConfig]
ServerName=eqemu
ServerDescription=eqemu
ServerMode=PrivateLogin
ServerPort=5999
ipaddress=
allowanonservers=0
statsaddress=
statsport=
It LOOKS like everything else is working. When I run the start script, it doesn't give me any errors and just returns to the prompt when finished loading. I think that's right? However, when I run ./world on its own I still get:
Code:
[Debug] [RULES__ERROR] Unable to find rule 'Bots:BotQuest'
[Debug] [RULES__ERROR] Unable to interpret rule record for Bots:BotQuest
[Debug] [RULES__ERROR] Unable to find rule 'Bots:BotGroupBuffing'
[Debug] [RULES__ERROR] Unable to interpret rule record for Bots:BotGroupBuffing
[Debug] [RULES__ERROR] Unable to find rule 'Bots:SpawnBotCount'
[Debug] [RULES__ERROR] Unable to interpret rule record for Bots:SpawnBotCount
[Debug] [RULES__ERROR] Unable to find rule 'Bots:CreateBotCount'
[Debug] [RULES__ERROR] Unable to interpret rule record for Bots:CreateBotCount
[Debug] [RULES__ERROR] Unable to find rule 'Bots:BotFinishBuffing'
[Debug] [RULES__ERROR] Unable to interpret rule record for Bots:BotFinishBuffing
[Debug] [RULES__ERROR] Unable to find rule 'Bots:BotManaRegen'
[Debug] [RULES__ERROR] Unable to interpret rule record for Bots:BotManaRegen
[Debug] [RULES__ERROR] Unable to find rule 'Bots:BotSpellQuest'
[Debug] [RULES__ERROR] Unable to interpret rule record for Bots:BotSpellQuest
[Debug] [WORLD__INIT] Loaded default rule set 'default'
[Debug] [WORLD__INIT] Clearing temporary merchant lists..
[Debug] [WORLD__INIT] Loading EQ time of day..
[Debug] [WORLD__INIT] Loading launcher list..
[Debug] [WORLD__INIT] Reboot zone modes ON
[Debug] [WORLD__INIT] Deleted 0 stale player corpses from database
[Debug] [WORLD__INIT] Deleted 0 stale player backups from database
[Debug] [WORLD__INIT] Purging expired instances
[Debug] [WORLD__INIT] Zone (TCP) listener started.
[Debug] [COMMON__THREADS] Starting EQStreamFactoryReaderLoop with thread ID -1293694096
[Debug] [WORLD__INIT] Client (UDP) listener started.
[Debug] [COMMON__THREADS] Starting EQStreamFactoryWriterLoop with thread ID -1302086800
[Debug] [NET__IDENTIFY] Registered patch 6.2
[Debug] [NET__IDENTIFY] Registered patch Titanium
[Debug] [NET__IDENTIFY] Registered patch SoF
[Debug] [WORLD__LS] Connecting to login server...
[Debug] [COMMON__THREADS] Starting TCPConnectionLoop with thread ID -1320162448
[Debug] [WORLD__LS] Connected to Loginserver: 192.168.1.19:5999
[Debug] [WORLD__LS_ERR] Login server responded with FatalError.
[Debug] [WORLD__LS_ERR]      Bad password
[Debug] [COMMON__THREADS] Ending TCPConnectionLoop with thread ID -1320162448
I'm going to guess that the login server problems are related to each other, e.g. I need to have the privatelogin running before I launch world. I did what you said about the bots.sql, but I'm still coming up with the error. I can't find the tables that it should supposedly enter.

Getting close enough to taste sucess. Thanks so much for your help so far.
Reply With Quote
  #15  
Old 01-10-2010, 10:18 PM
prickle
Hill Giant
 
Join Date: Sep 2009
Posts: 147
Default

to get private login working properly you'll need to nab a couple of extra libraries.

There's a script called "getlibs" on the Ubuntu forums that will help. Google "ubuntu getlibs" the first search result will be a link to a forum post with a direct link to download it. To make grab the libraries for privatelogin you'll do the following:
.save the getlibs script to your privatelogin server directory (mine is in <eq server dir>/private )
.make the script executable with:
Code:
chmod +x getlibs
.run the script with:
Code:
sudo getlibs privatelogin
Since Mint is a Debian derivative, I assume the default installation does not allow you to log in as the root user, and you need to sudo or su to perform root functions. The script needs to be run as root because it will download and install the appropriate library packages to make privatelogin work for you.

When you run the start script, it sets the world and zone servers to run in background, and then sends their output to log files in the <server dir>/logs/ directory. To see your server output when you use the start script you can do:
Code:
tail -f logs/eqemu_debug_world.log
That's the log file I watch when I start my server.

The rules errors that I'm seeing in your world output indicates to me that you've compiled with -DBOTS. Is this correct?

If so, you still need to source in the bots.sql file to make those particular errors go away.

The last error in the output is telling you that it cannot connect to the login server. Once you've gotten the login server that last error will go away.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:20 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3