PDA

View Full Version : Linux Readme


Trumpcard
03-16-2003, 02:45 AM
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.

Elrach
05-19-2003, 05:04 PM
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.

jbb
05-19-2003, 08:09 PM
Why are the ^Ms even in there? I though cvs handled that kind of thing. Unless they have been committed as binary files?

luvmyhonda
05-30-2003, 03:47 AM
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.

Trumpcard
05-30-2003, 04:15 AM
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...

luvmyhonda
05-30-2003, 04:48 AM
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.

Trumpcard
05-30-2003, 05:18 AM
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...

Elrach
05-30-2003, 06:28 AM
yeah but you ever work for Uncle Sam Trumpcard?

This kinda sounds impossible...work and government in the same sentence...

:P

a_Guest03
05-30-2003, 07:05 AM
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.

Bigpull
06-11-2003, 05:38 AM
Putting this here so they don't get lost in the shuffle again

emuStart

#!/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

#!/bin/sh
killall Andune.world Andune.zone
sleep 5
killall -9 world zone
sleep 5
./cleanipc
rm -f .lock-zones .lock-world .lock-login

cyclone
06-25-2003, 09:00 AM
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.

Trumpcard
06-25-2003, 09:25 AM
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

Trumpcard
11-12-2003, 12:10 AM
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.

Eglin
11-29-2003, 01:55 PM
Putting this here so they don't get lost in the shuffle again

emuStart

#!/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

#!/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.

bitblaster
06-09-2004, 11:06 PM
...any tutorials for Linux yet?

Something 'colorful' like the windows guide? :? :? :? :? :? :? :? :shock: :shock: :shock: :shock: :shock: :shock: :shock: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :!: :!:

Dimorge02
12-01-2004, 01:44 AM
I did go to the linux readme stick thread but do not see the actual file linked anywhere. Anyone have this file?

Dimorge02
12-01-2004, 01:47 AM
I did go to the linux readme stick thread but do not see the actual file linked anywhere. Anyone have this file?