EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Linux Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=588)
-   -   Newbie Help: Modern Setup Guide? (https://www.eqemulator.org/forums/showthread.php?t=30280)

arggonuts 01-09-2010 10:31 PM

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.

prickle 01-09-2010 11:10 PM

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

arggonuts 01-09-2010 11:15 PM

Thanks for the reply. This looks like it will help. I will let you know!

arggonuts 01-10-2010 12:19 AM

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.

arggonuts 01-10-2010 03:10 AM

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.

prickle 01-10-2010 05:21 AM

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

arggonuts 01-10-2010 05:42 AM

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.

prickle 01-10-2010 03:40 PM

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).

arggonuts 01-10-2010 04:25 PM

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.

prickle 01-10-2010 05:01 PM

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>

arggonuts 01-10-2010 05:09 PM

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.

prickle 01-10-2010 05:16 PM

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.

arggonuts 01-10-2010 05:53 PM

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!

arggonuts 01-10-2010 08:36 PM

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.

prickle 01-10-2010 10:18 PM

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.

arggonuts 01-10-2010 11:17 PM

Still have the bots error stuff and my inability to figure out how to connect to myself. I haven't read much on this because I didn't expect to make it this far.

So yes, when running the start script, I see:
Code:

World has connected with account name: ken
This kind of confuses me. I was under the assumption that the account I created during all this would be the one I use to login from the launchpad. Anyways, if you feel like posting about this last bit, I'd greatly appreciate it, but until then I'll be diving into wikis and google to figure it out.

prickle 01-11-2010 12:58 AM

when you setup the privatelogin server, the game server needs to authenticate with it. So, when you get that particular message, it indicates that your EQEMu server has successfully connected to the login server.

Now all you need to do is create player accounts. :)

arggonuts 01-11-2010 01:07 AM

Alrighty. I'm there, but since I made everything ken/mypassword I'm not sure exactly which "ken" is that is connecting world to the login server. I am right on board with you though. Now I just have to find how/where to create user accounts and what privilege level to grant.

EDIT: I'm all logged in, hopping around (made a frog to test with). Everything looked good. I still have the bot error. When I initially sourced, it was peqdb_rev1052.sql, load_player.sql and load_bots.sql. Then after you told me, I loaded bots.sql and it says everything sourced correctly. I even tried to input the "missing" lines manually and it said duplicates, etc, but when I ./world, it's still giving me errors. I don't have any clue how to use bots anyways. That'll be my next task as soon as I can. Unfortunately I'll be stuck at work all day tomorrow (the reason for wanting a server since I'll be there 2 months straight come friday) and can't try anything you suggest. Regardless, thanks so much for your help.

prickle 01-11-2010 04:54 PM

I just had another look at your errors, and it seems you're missing several rows from the rule_values table. Something didn't click right when you initially setup the database. The PEQ database has a file called "rule_values.sql" that is sourced in when you create a new database. This is definitely the source of your bot errors in the ./world output.

arggonuts 01-12-2010 04:53 PM

Well, I tried that, which didn't help. I opened up mysql query browser and naviagated to the rules_values table. The "missing" rules are definitely there. They're all the way at the bottom of the table, high doubt that's the issue, but they do exist.

One thing I think could be that to test these, I've just been doing ./world instead of ./start. I also highly doubt that's the issue, but I'm ignorant about some of this, so I'll check the logs from running the script (if I can get the login server to go back up)

EDIT: Nope, still getting the errors even when running from the script. Didn't think that would do anything anyways. Not sure what's missing. Let me know if you need to see anything specifically.

arggonuts 01-12-2010 06:42 PM

Also now I'm realizing that every account I create has GM status and I have no idea why. Can't find anything to really help on that since the private login server thing doesn't comment anything on it.

EDIT: To be more clear, after messing around with it a bit. I have access to some level 10 commands but nothing above it. Apparently this issue is the reason I can't auto-attack. Basically the only things I can do are taunt and kick and die to cave rats.

pfyon 01-13-2010 01:42 PM

Quote:

Originally Posted by arggonuts (Post 182747)
Also now I'm realizing that every account I create has GM status and I have no idea why. Can't find anything to really help on that since the private login server thing doesn't comment anything on it.

EDIT: To be more clear, after messing around with it a bit. I have access to some level 10 commands but nothing above it. Apparently this issue is the reason I can't auto-attack. Basically the only things I can do are taunt and kick and die to cave rats.

Not sure why the GM commands aren't working, but the taunt/kick thing sounds like missing map files (or in the wrong folder).

arggonuts 01-14-2010 01:28 AM

I redownloaded the maps for server/maps/ which I believe is the right directory. I tried maps from sourceforge and from the SVN; both have issues. Anyone able to steer me in the right direction on this one?

arggonuts 01-14-2010 11:28 PM

I got the maps thing figured out. Things can be pretty touchy. My folder was "maps" where it needed to be "Maps". Derp on me. EDIT: Oh the other thing I figured out was I had nothing in the plugins folder. Somewhere along the lines, I didn't copy them from the quests directory. That probably fixed the GM things.

Anyways, I STILL have the bot issue, I'm not sure what's going on with that. I'm going to try to resource, but I doubt that will solve anything. Really don't know what's going on with it. Everything seems to be in order, but perhaps I should check my punctuation. Regardless, thanks for all your help. I'll be leaving tomorrow, so downloads will be out of the question, but I will still be able to access the forums.

prickle 01-15-2010 02:39 PM

yeah.... Linux is Case Sensitive about everything ... the only time it "isn't" is when an application has been developed to ignore casing of characters; almost no one does that though ;)


All times are GMT -4. The time now is 12:27 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.