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 03-16-2003, 02:45 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default Linux Readme

Heres the linux readme I created a long time ago. It never seemed to make it into the source builds, so I'm going to just sticky it here.

Here ya go! Feel free to repost it with additional instructions/clarifications.
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #2  
Old 05-19-2003, 05:04 PM
Elrach
Sarnak
 
Join Date: Apr 2003
Posts: 66
Default

One thing I like to do everytime I get the CVS source is remove all the annoying ^M left behind by them Windows folks.

I'm sure there are other ways of doing it, but this is quickest I could think of.

>zip tmpfile NightDumps

>unzip -a tmpfile

The -a strips them ^M.
__________________
Elrach
Raven City Server
Reply With Quote
  #3  
Old 05-19-2003, 08:09 PM
jbb
Hill Giant
 
Join Date: Mar 2003
Location: UK
Posts: 242
Default

Why are the ^Ms even in there? I though cvs handled that kind of thing. Unless they have been committed as binary files?
Reply With Quote
  #4  
Old 05-30-2003, 03:47 AM
luvmyhonda
Sarnak
 
Join Date: May 2003
Location: Philadelphia, PA; Boston, MA
Posts: 30
Default

Why do people use Windows anyway? I am forced to use it everyday here at work, and I'm reminded everyday why I *only* use it when the government makes me. What gets me is...the DoD signed a contract with MS that it would use only MS software, and I can't even download open source tools for free and use them on this "government property" machine. Sucks to be me.
Reply With Quote
  #5  
Old 05-30-2003, 04:15 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

That happens in alot of companies... They don't pay me to criticize how they decide to run the show, they pay me to get a job done, so I just keep my mouth shut and do what I can with what I have...

Dont need to zip/unzip to strip out the ^M's, 'dos2unix *' will do it
Very handy utility...
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #6  
Old 05-30-2003, 04:48 AM
luvmyhonda
Sarnak
 
Join Date: May 2003
Location: Philadelphia, PA; Boston, MA
Posts: 30
Default

yeah but you ever work for Uncle Sam Trumpcard? eh, I don't have much to complain about. The benefits of a government job are pretty good, even if I've been working for them my whole life and I could have been rich by now working elsewhere. I've always felt compelled to do some type of military service or something, but I guess helping the government keep its secrets is service enough to my country.
Reply With Quote
  #7  
Old 05-30-2003, 05:18 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

I almost went to work for the NSA for awhile, but I decided the better money in the private sector was worthwhile.

I didnt work directly for the government, but I did plenty of DoD sponsered projects. I can't say I cared for it much..

In the end, it doesnt really matter... A job is a job...
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #8  
Old 05-30-2003, 06:28 AM
Elrach
Sarnak
 
Join Date: Apr 2003
Posts: 66
Default

Quote:
yeah but you ever work for Uncle Sam Trumpcard?
This kinda sounds impossible...work and government in the same sentence...

:P
__________________
Elrach
Raven City Server
Reply With Quote
  #9  
Old 05-30-2003, 07:05 AM
a_Guest03
Demi-God
 
Join Date: Jun 2002
Posts: 1,693
Default

My coworker works for the government, then outsources himself because they won't give him any WORK to do. I doubt he gets paid well, but he sure does nothing well. He's a hard worker, and requests more work because he is underemployed, but his boss doesn't want to bother to give him more to do.
__________________
It's never too late to be something great.
Reply With Quote
  #10  
Old 06-11-2003, 05:38 AM
Bigpull
Discordant
 
Join Date: Feb 2003
Posts: 305
Default Linux scripts

Putting this here so they don't get lost in the shuffle again

emuStart
Code:
#!/bin/sh 
WORLD=Change world ip/host 
ZONE=Change to zone ip/host 
mkdir -p logs 2>&1 > /dev/null 
#mini#if [ ! -e .lock-login ] ; then 
#mini#    touch .lock-login 
#mini#    wine ./MiniLogin.exe > ../logs/login & ) 
#mini#    sleep 30 
#mini#fi 
export LD_LIBRARY_PATH=`pwd` 
if [ ! -e .lock-world ] ; then 
    touch .lock-world 
    ./world 2>&1 > logs/world & 
    # slow servers 
    #sleep 5 
fi 
if [ ! -e .lock-zones ] ; then 
# Static zones
    touch .lock-zones 
    ./zone qeynos $ZONE 7995 $WORLD 2>&1 > logs/qeynos.log & 
    ./zone cshome $ZONE 7996 $WORLD 2>&1 > logs/cshome.log & 
fi 
#dynamic zones using ports given on command line
    if [ foo"" != foo"$1" ] ; then 
    for i in "$@" ; do 
        ./zone . $ZONE $i $WORLD 2>&1 > logs/zones & 
    done 
    fi
emuStop
Code:
#!/bin/sh
killall Andune.world Andune.zone
sleep 5
killall -9 world zone
sleep 5
./cleanipc
rm -f .lock-zones .lock-world .lock-login
Reply With Quote
  #11  
Old 06-25-2003, 09:00 AM
cyclone
Fire Beetle
 
Join Date: Jun 2002
Posts: 1
Default

Thank you Bigpull for the code snips. May i use them in the Gentoo ebuild file that I am atempting to write?

Also Trumpcard, I know i read the linux readme, however i do not see it in this post, could you repost it please.
Reply With Quote
  #12  
Old 06-25-2003, 09:25 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

Here it is... havent updated it in awhile, but should still be valid


Compiling on linux. - Trumpcard 12/24/2002
---------------------------------------------

Dependencies: You need to have mysql server and the development headers and libraries installed. These can all be found at
www.mysql.com. If you receive errors related to database calls, you most likely do not have them, or your makefile does not
point to the correct directory for the includes. Ensure the mysql headers are where the makefile thinks they should be.

Once you have the linux source unpacked, you will have 3 directories to be concerned with, world,zone and EmuMemShare.

Edit your makefiles (they live in both the world and zone directories)
I have now included a highly optimized makefile and debug makefile with the release. I have tested with gcc3.2, your mileage may
vary with 2.9x. Compile it using makefile -f <makefilename>. makefile.opt and makefile.debug.


Optimize flags
----------------------------------------------
gcc can do various levels of auto optimization based on the -O flag. The levels go from -O to -O6. I generally use
-O3 and have never had any problems. Try -O3 first, and move up or down based on your experiences and/or comfort level.

CPU flags
----------------------------------------------
The cpu flags are set for 'march=i686' which should be fine for any pentium and later machines (I am assuming no one is going to
try and run it with a 486. If you are using a pentium, AMD K6, or K6-2, change it to 586. Consult the gcc manual for
a full list of gcc optimization flags.

Additionally, if you have gcc 3.2 (gcc -v will tell you what version of gcc you are compiling with), you can
use some of the CPU specific optimization flags. I use 'march=athlon-xp' for instance when I compile as I have
an athlon-xp 2000. This generally results in better code specific for your machine, but anything compiled with the
march=cpu flag will be non portable. (You wont be able to run the binary on a different cpu architecture)

NOTE: Make sure to change the makefiles in both world and zone if you have issues compiling with the default makefile.


Onto world first.

cd world
Once there, I would examine the makefile to make sure it looks good to you. If you get errors building the source stemming from calls in database.cpp
, you are most likely using the wrong paths to the mysql includes and lib's, verify them before you go on.

To build world, just type 'make'

If all goes well, you will ended up with a compiled and linked 'world' exectubable. I generally copy this binary to a directory
called 'bin' where I colocate it with 'zone' , and all my ini files, spells_en.txt file, cfg files, quest files, etc. This saves you trouble as you can
make code changes and compile, and once you are ready copy it over to your running directory for testing. It also keeps your
directories a bit cleaner.

cd ../zone

type 'make'
Assuming everything is ok, you will get a 'zone' executable next. copy it to your bin directory (or leave it right there, your preference)


If you have set up your ini files correctly, then next you will be able to run the exectuables and hopefully log
onto your server.

Open a few term windows. In one, cd to your world binary, and run './world'. Assuming everything is setup
correctly, you will have a running world server. Next, go to whereever your zone server is.
Run './zone . <IP ADDRESS> <PORT TO LISTEN ON> <IP ADDRESS OF DATABASE>' to start the zone.
Assuming your ip is 200.100.100.100, and you opened port 7995 in your firewall for it, you will exectute
./zone . 200.100.100.100 7995 200.100.100.100

once the zone has successfully started, you will see it enter sleep mode.

MAKE SURE TO COPY YOUR SPELL_EN.TXT FROM YOUR EVERQUEST FOLDER TO THE DIRECTORIES WITH YOUR WORLD AND ZONE BINARIES IN THEM.

Also note that the source archives do not contain the database structure's you need to compile with. Download the win32.zip for a template LoginServer.ini, and db.sql for your database.

To create your database, log into mysql (typically just typing mysql will work if it's in your path).

once in mysql, do a
mysql> create database eq;

then,
mysql> source <PATH TO>/db.sql

That will give you the base database. Go onto the forums and look for 3rd party databases with items, spawns, and other goodies....

That's it! If theres any additional tips or tricks you uncover, feel free to post them to the Linux Support Forum
at

http://www.eqemu.net
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #13  
Old 11-12-2003, 12:10 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

Another step in this now is too create the emusharemem shared object.

cd into EMuShareMem, and do a 'make'

copy the resulting lib.so file into your LD_LIBRARY_PATH somewhere, or do like I do. Put it in the same directory as your zone and world , and create a startup script that appends your current directory onto your LD_LIBRARY_PATH.
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #14  
Old 11-29-2003, 01:55 PM
Eglin
Hill Giant
 
Join Date: Nov 2003
Posts: 168
Default Re: Linux scripts

Quote:
Originally Posted by Bigpull
Putting this here so they don't get lost in the shuffle again

emuStart
Code:
#!/bin/sh 
WORLD=Change world ip/host 
ZONE=Change to zone ip/host 
mkdir -p logs 2>&1 > /dev/null 
#mini#if [ ! -e .lock-login ] ; then 
#mini#    touch .lock-login 
#mini#    wine ./MiniLogin.exe > ../logs/login & ) 
#mini#    sleep 30 
#mini#fi 
export LD_LIBRARY_PATH=`pwd` 
if [ ! -e .lock-world ] ; then 
    touch .lock-world 
    ./world 2>&1 > logs/world & 
    # slow servers 
    #sleep 5 
fi 
if [ ! -e .lock-zones ] ; then 
# Static zones
    touch .lock-zones 
    ./zone qeynos $ZONE 7995 $WORLD 2>&1 > logs/qeynos.log & 
    ./zone cshome $ZONE 7996 $WORLD 2>&1 > logs/cshome.log & 
fi 
#dynamic zones using ports given on command line
    if [ foo"" != foo"$1" ] ; then 
    for i in "$@" ; do 
        ./zone . $ZONE $i $WORLD 2>&1 > logs/zones & 
    done 
    fi
emuStop
Code:
#!/bin/sh
killall Andune.world Andune.zone
sleep 5
killall -9 world zone
sleep 5
./cleanipc
rm -f .lock-zones .lock-world .lock-login
Suggestions:
1) augment the LD_LIBRARY_PATH instead of replacing it.
2) instead of merely backgrounding the important jobs, signal them nohup so that they continue running after you logout. Alternatively, use the nohup program to launch them, as it makes very nice logs, too.

Alternatively, you could setup intetd/xinetd/etc to run the servers. It is a _really_ classy way to do so, and very easy to setup. You would probably want to disable world's from attempting to restart zones, though, since inetd would handle it.
Reply With Quote
  #15  
Old 06-09-2004, 11:06 PM
bitblaster
Fire Beetle
 
Join Date: Jun 2004
Location: New Hampshire, USA
Posts: 9
Default

...any tutorials for Linux yet?

Something 'colorful' like the windows guide? : : : : : : : : : : :!: :!:
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 01:27 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