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 05-28-2011, 02:43 AM
Sikkun
Sarnak
 
Join Date: Apr 2011
Posts: 30
Default Debian Linux Install Guide 5/28/2011

Here is my updated Debian Linux Install Guide, it is setup using VMware on a Windows 7 machine, but you could just as well follow it to set up on a stand alone install of Debian Linux.

Part One - Installing the OS
1. http://www.debian.org/releases/stable/debian-installer/
2. netinst CD image -> i386
3. Open VMware
4. Create a New Virtual Machine
5. Installer Disc Image File (iso)
6. Select the ISO you just downloaded
7. Linux Debian 5 (I know we are installing 6, just go with it)
8. Set Disk Size
9. Store virtual disk as a single file
10. Vmware will ask you to install VMware tools, Hit Remind me Later
11. Graphical Install
12. Set Host name (I kept mine debian), Continue
13. Set the root password cell00lol
14. Set username (this guide assume eqemu)
15. Set user password
16. Select your time zone.
17. Guided - use entire disk
18. All files in one partition
19. Yes
20. United States
21. ftp.us.debian.org
22. No
23. Select:
Graphical desktop environment
Web server
File server
SQL Database
Standard systems utilities
24. Name of your workgroup (I kept the default)
25. Yes
26. Debian 6 is now installed


Part Two - Installing VMware Tools
1. Virtual Machine (Alt-Enter releases your mouse)
2. Install VMware Tools
3. Download and Install
4. Drag VMwreTools-8.4.6-385536.tar.gz to the desktop
5. Extrace VMware Tools
5. Open root terminal
6. apt-get install install gcc-4.3
7. Open the Synaptic Package Manager
8. Search linux-headers
9. Check linux-headers-2.6.32-5-686
10. Apply
11. In root terminal:
cd Desktop/vmware-tools-distrib/
12. ./vmware-install.pl
13. Hit enter for everything until you see: root@...
14. Restart Your VMware Machine
15. Congratulations VMware Tools in now installed




Part Three - Updating Debian
1. Open root terminal
2. apt-cache search linux-image
3. Really your choice but im going with bigmem, because it allows me to have more than 3gb of ram.
3. apt-get install linux-image-2.6-686-bigmem
4. Reboot your virtual machine.
5. Congratulations you are no longer capped at 3gb of ram

Part Four - Installing EQEmulator Software
1. Open root terminal
2. apt-get install gcc g++ make libio-stringy-perl libperl-dev unzip
3. Install MySQL #You will be asked to set your root password
apt-get install mysql-server
4. apt-get install libmysqlclient15-dev
5. sudo apt-get install rabbitvcs-core rabbitvcs-nautilus rabbitvcs-gedit rabbitvcs-cli
6. restart debian

Part Five - Download EQEmulator Source Code
1. Open terminal (Not Root)
2. mkdir sourcesvn
3. Open up your eqemu folder
4. Right click on the source folder
5. Click Checkout
6. URL: http://projecteqemu.googlecode.com/svn/
7. Ok
8. When finished it will say Revision XXXX Finished

Part Six - Compile the Source Code
1. Open terminal (Not Root)
2. mkdir source
3. Go to the sourcesvn foulder
4. Trunk
5. You will se a folder called EQEmuServer
6. Place that in the new source folder
**7. Go to /eqemu/source/EQEmuServer/zone
**8. Open questmgr.cpp and add #include <limits.h>
under #include <list> **(This may be fixed later, but right now
if this isn't done you get compiler errors).
9. Open terminal (Not Root)
cd /home/eqemu/source/EQEmuServer
make
10. Congratulations you have compiled the source code.

Part 7 - Linking the Files
1. Open terminal (Non Root)
2. mkdir server
3. cd /home/eqemu/server
4. ln -s ../source/EQEmuServer/utils/defaults/* .
5. ln -s ../source/EQEmuServer/utils/patch_* .
6. ln -s ../source/EQEmuServer/utils/cleanipc
7. ln -s ../source/EQEmuServer/world/world
8. ln -s ../source/EQEmuServer/zone/zone
9. ln -s ../source/EQEmuServer/eqlaunch/eqlaunch
10. cd /home/eqemu/source/EQEmuServer/EMuShareMem/
11. su root
12. cp libEMuShare.Mem.so /usr/lib
13. (Stay in root)
14. cd /etc
15. chmod 7 sysctl.conf
16 open the file /etc/sysctl.conf
17. Add the line kernel.shmmax = 134217728
18. save
19. Back in terminal (as root in etc folder)
20. chmod 4 sysctl.conf
21. /sbin/sysctl -p

Part 8 - More Linking Files
1. Open your server folder
2. Right click the Maps folder
3. Move to trash
4. Create a new folder named Maps
5. Right click on the new Maps folder
6. Checkout
7. URL: http://eqemu-maps.googlecode.com/svn/trunk/
8. Right click the quests folder
9. Move to trash
10. Create a new folder named quests
11. Right click on the new quests folder
12. Checkout
13. URL: http://projecteqquests.googlecode.com/svn/trunk/quests
14. Destination: /home/eqemu/server/quests/
15. Open the quest folder once finished
16. Drag the plugins folder to your server folder and hit replace

Part 9 - Setting up your database
1. Open terminal (Non Root)
2. mkdir eqemudb
3. Right click the new eqemudb folder
4. URl: http://projecteqdb.googlecode.com/svn/trunk/peqdatabase
5. Destination: /home/eqemu/eqemudb
6. Open the eqemudb folder
7. Current version is database_incremental.zip
8. Unzip that to get db_dump.sql
9. Open terminal (Non Root)
10. cd /home/eqemu/eqemudb
11. mysql -u root -p
12. CREATE DATABASE peq;
13. use peq
14. source db_dump.sql
15. source load_player.sql
16. This code update must be run:
Code:
ALTER TABLE `account` ADD `time_creation` INT UNSIGNED DEFAULT '0' NOT NULL AFTER `suspendeduntil`;
UPDATE `account` SET `time_creation` = UNIX_TIMESTAMP() WHERE `time_creation` = 0;
17. In the eqemu/source/EQEmuServer/utils/sql/svn folder you will see all of the SQL updates
18. I reccomended sourcing in every one from 1717+ (this may change over time).
The easiest way to do this is to install a program such as Navicat lite.
See the Windows server guide if you need instructions on sourcing them in
using Navicat lite
http://www.eqemulator.org/forums/showthread.php?t=32980


**Part 10 - Set up your ip
**This is what I had to do to enable my vmware server to work
You should make your ip static (portforward.com will help, make sure you turn off
vmware player if you are going to use their free software to do so easily).

1. In Vmware settings change your network connection to bridged
2. Restart your vmware session
3. Open Root Terminal
4. ifconfig
5. Write down inet addr:
6. Go to whatsmyip.org
7. Write down your ip
8. On your router make sure to open ports 7000-7100 and 9000 (UDP)
portforward.com will help you with this.

****NOTE**** if you are using VMWare forward the ports
to the ip you got from doing ifconfig on the linux box****

Part 11 - Getting Ready To Start Your Server
1. Go to your server folder
2. Delete eqemu_config.xml
3. Rename eqemu_config.xml.full -> eqemu_config.xml
4. Open the new eqemu_config.xml which will look like:

Code:
<?xml version="1.0">
<server>
	<world>
		<shortname>setme</shortname>
		<longname>I Forgot To Edit My Config</longname>

		<!-- Only specify these two if you really think you need to.  (read: You don't) -->
		<!-- <address>some.server.com</address> -->
		<!-- <localaddress>192.168.0.5</localaddress> -->

		<!-- Loginserver information.  Defaults shown -->
		<loginserver>
			<host>eqemulator.net</host>
			<port>5998</port>
			<account></account>
			<password></password>
		</loginserver>

		<!-- Server status.  Default is unlocked -->
		<!--<locked/>-->
		<!-- <unlocked/> -->

		<!-- Sets the ip/port for the tcp connections.  Both zones and console (if enabled).  Defaults are shown -->
		<tcp ip="localhost" port="9000" telnet="disable"/>

		<!-- Sets the shared key used by zone/launcher to connect to world -->
		<key>some long random string</key>
		
		<!-- Enable and set the port for the HTTP service.  Defaults are shown -->
		<http port="9080" enabled="false" mimefile="mime.types" />
	</world>

	<!-- Chatserver (channels) information.  Defaults shown -->
	<chatserver>
		<host>channels.eqemulator.net</host>
		<port>7778</port>
	</chatserver>

	<!-- Mailserver (in-game mail) information.  Defaults shown -->
	<mailserver>
		<host>channels.eqemulator.net</host>
		<port>7779</port>
	</mailserver>

	<zones>
		<defaultstatus>20</defaultstatus>

		<!-- Sets port range for world to use to auto configure zones -->
		<ports low="7000" high="7100"/>
	</zones>

	<!-- Database configuration, replaces db.ini.  Defaults shown -->
	<database>
		<host>localhost</host>
		<port>3306</port>
		<username>eq</username>
		<password>eq</password>
		<db>eq</db>
	</database>

	<!-- Launcher Configuration -->
	<launcher>
		<!-- <logprefix>logs/zone-</logprefix> -->
		<!-- <logsuffix>.log</logsuffix> -->
		<!-- <exe>zone.exe or ./zone</exe> -->
		<!-- <timers restart="10000" reterminate="10000"> -->
	</launcher>

	<!-- File locations.  Defaults shown -->
	<files>
		<!-- <spells>spells_us.txt</spells> -->
		<!-- <opcodes>opcodes.conf</opcodes> -->
		<!-- <logsettings>log.ini</logsettings> -->
		<!-- <eqtime>eqtime.cfg</eqtime> -->
	</files>
	<!-- Directory locations.  Defaults shown -->
	<directories>
		<!-- <maps>Maps</maps> -->
		<!-- <quests>quests</quests> -->
		<!-- <plugins>plugins</plugins> -->
	</directories>
</server>
You need to make these changes:


Code:
<world>
		<shortname>Shortname</shortname>
		<longname>Name of my server</longname>

		<!-- Only specify these two if you really think you need to.  (read: You don't) -->
		<address>ip from whatsmyip</address> 
		 <localaddress>linux ip from ifconfig</localaddress> 
<zones>
		<defaultstatus>0</defaultstatus>

		<!-- Sets port range for world to use to auto configure zones -->
		<ports low="7000" high="7100"/>
	</zones>
		

	<!-- Database configuration, replaces db.ini.  Defaults shown -->
	<database>
		<host>localhost</host>
		<port>3306</port>
		<username>root</username>
		<password>mysql root password</password>
		<db>peq</db>
	</database>



5. copy spells_en.txt and spells_us.txt from you EQ Directory
6. Create a new document -> empty file named start
7. Place in start:

Code:
cat > start << EOD6
#!/bin/bash
# Auto generated by EQEmu Installer v$EQEMU_INSTALLER_VER on $EQEMU_INSTALL_DATE

# Include our configuration.
#source eqemu.conf

#ulimit -c 99999999

# Start the login server.
if [ \$USE_LOGIN_SERVER ]; then
  ./EQEmuLoginServer 2>&1 > logs/loginserver &
fi

# Remove any shutdown files.
rm -f .zone_shutdown
rm -f .world_shutdown

# Print commands and their arguments as they are executed.
set -x

# Launcher name.
LNAME="zone"
if [ "\$1" = "test" ]; then
  LNAME="test"
fi

# Set our library path.
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
    # Keep the commands_zone log.
    if [ "\$f" = "logs/eqemu_commands_zone.log" ]; then
      continue;
    fi
    rm -f \$f
  done
fi

# Boot up world.
if [ ! -e .lock-world ] ; then
  # Create our lock file.
  touch .lock-world
  
  # Determine how to run the world server.
  if [ \$USE_PERSIST_WORLD ]; then
    ./persist_world 2>&1 > logs/world &
  else
    ./world 2>&1 > logs/world &
  fi
  
  # wait for shared memory to load
  sleep 15
fi

# Start up the official launcher.
if [ ! -e .lock-launcher ]; then
  # Create our lock file.
  touch .lock-launcher
  
  # Launch!
  ./eqlaunch \$LNAME 2>&1 > logs/launcher &
fi

# Determine if we should start the chat server.
if [ \$USE_CHAT_SERVER ]; then
  ./chatserver 2>&1 > logs/chatserver &
fi

# Determine if we should start the mail server.
if [ \$USE_MAIL_SERVER ]; then
  ./mailserver 2>&1 > logs/mailserver &
fi
EOD6
8. Create a new document -> empty file named persist_world
9. Place in persist_world:

Code:
cat > persist_world << EOD8
#!/bin/bash

#ulimit -c 99999999

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

  echo `date` " - World crashed." >> crashlog
  sleep 2
done
EOD8
10. Create a new document -> empty file named stop
11. Place in stop:

Code:
cat > stop << EOD7
#!/bin/bash
# Auto generated by EQEmu Installer v$EQEMU_INSTALLER_VER on $EQEMU_INSTALL_DATE

# Include our configuration.
#source eqemu.conf

# Create our shutdown files.
touch .zone_shutdown
touch .world_shutdown

targets="world eqlaunch zone"

# Login Server Check
if [ \$USE_LOGIN_SERVER ]; then
  targets="\$targets EQEmuLoginServer"
fi

# Chat Server Check
if [ \$USE_CHAT_SERVER ]; then
  targets="\$targets chatserver"
fi

# Mail Server Check
if [ \$USE_MAIL_SERVER ]; then
  targets="\$targets mailserver"
fi

killall \$targets

# Small pause here.
sleep 3

# If world/zone/eqlaunch is stuck we'll 'kill -9' them here.
if ps ax | grep -e 'w[o]rld' -e 'z[o]ne' -e 'eq[l]aunch' > /dev/null; then
  killall -9 world zone eqlaunch
  sleep 2
fi

# Run our IPC cleaning.
./cleanipc

# Remove any lock files.
rm -f .lock-zones .lock-world .lock-login .lock-launcher
EOD7
12. Right click start -> permissions and check Allow executing file as program
13. Right click persist_world -> permissions and check Allow executing file as program
14. Right click stop -> permissions and check Allow executing file as program

Part 12 - Running your server
1. Open a terminal
2. cd /server
3. ./start
4. You will see:
+ LNAME=zone
+ '[' '' = test ']'
+ P=/home/eqemu/server
+ export LD_LIBRARY_PATH=:/home/eqemu/server
+ LD_LIBRARY_PATH=:/home/eqemu/server
+ mkdir -p logs
+ '[' '!' -e .lock-zones -a '!' -e .lock-world ']'
+ for f in 'logs/eqemu_*.log'
+ '[' 'logs/eqemu_*.log' = logs/eqemu_commands_zone.log ']'
+ rm -f 'logs/eqemu_*.log'
+ '[' '!' -e .lock-world ']'
+ touch .lock-world
+ '[' ']'
+ sleep 15
+ ./world
+ '[' '!' -e .lock-launcher ']'
+ touch .lock-launcher
+ '[' ']'
+ '[' ']'

or something similar if it starts (sometimes i have to hit ./start more than once)

5. stopping your server ./stop
You will see:
./stop
Successfully removed 1224832959 (items)
Successfully removed 1308719039 (unused)
Successfully removed 1140946879 (unused)
Successfully removed 1392605119 (spells)
Successfully removed 1174501311 (factions)
Successfully removed 1275164607 (loot)
Successfully removed 1291941823 (unused)
Successfully removed 1325496255 (opcodes)
Successfully removed 1510045631 (unused)
Successfully removed 1258387391 (skillcaps)

6. Congratulations you can now run a server on linux.

Thanks to everyone who wrote all of the other windows/linux guides that I used to get my way through this.

Sikkun
Reply With Quote
  #2  
Old 05-28-2011, 03:18 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

Nice guide!

You many not need Part 9, Step 16 anymore. The table creation statement in the latest incremental dump includes the time_creation field. It won't hurt anything to run the old update code, it should just cause an error and not do anything.
Reply With Quote
  #3  
Old 05-28-2011, 04:16 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Yeah, that looks like a pretty nice guide. To make it easier to find and reference for future members, you might want to think about adding it to the Wiki. You can register a wiki account and add it yourself fairly quickly, and then just link it back to the page that has the other setup guides in the wiki.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 05-28-2011, 11:26 AM
Sikkun
Sarnak
 
Join Date: Apr 2011
Posts: 30
Default

Quote:
Originally Posted by trevius View Post
Yeah, that looks like a pretty nice guide. To make it easier to find and reference for future members, you might want to think about adding it to the Wiki. You can register a wiki account and add it yourself fairly quickly, and then just link it back to the page that has the other setup guides in the wiki.
http://www.eqemulator.net/wiki/wikka.php?wakka=SikKun

I added it to the server guide page also.

This thread can be deleted by the powers that be if they wish.
Sikkun
Reply With Quote
  #5  
Old 08-14-2011, 08:36 PM
Acara
Fire Beetle
 
Join Date: Aug 2011
Posts: 2
Default

Thank you for an excellent guide! This helped me out immensely.
Reply With Quote
  #6  
Old 08-22-2011, 10:12 AM
danny0085
Fire Beetle
 
Join Date: Aug 2011
Location: danny0085
Posts: 1
Default install ubuntu

Here is a video tutorial how to install ubuntu step by step without deleting Windows
Reply With Quote
  #7  
Old 11-22-2011, 02:29 AM
LordAdakos
Sarnak
 
Join Date: Dec 2007
Posts: 57
Default

there are a few problems with the tutorial, a couple typos, etc.

I followed it the best I could for example
questmgr.cpp and add #include <limits.h> under #include <list> - it's already there, do we need it twice?

and

cp libEMuShare.Mem.so /usr/lib
should be
cp libEMuShareMem.so /usr/lib


and

7.Current version is database_incremental.zip
8. Unzip that to get db_dump.sql
-- it's got a revision name, not db_dump.sql. its like peqdb_rev2027.sql (at the time of writing)



other than that, it looks pretty good, i think....
Also, (sort of off topic) how would I edit the zone_launcher table for static & dynamic zones with the debian ./start script?
Reply With Quote
  #8  
Old 12-15-2011, 10:25 AM
tiqdreng
Fire Beetle
 
Join Date: Dec 2011
Location: United States
Posts: 1
Default

I agree, this is a very nice tutorial!

@LordAdakos: I don't think you need it twice. I simply moved the line from where it was originally, at the top, to under <list>. I am unsure if it will ultimately cause any issues as I have not received any errors but I am having issues with my world and zone not loading.
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 07:23 AM.


 

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