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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-07-2012, 11:14 PM
Hool
Fire Beetle
 
Join Date: May 2010
Location: Texas
Posts: 16
Post Installation Guide: Running EQEmulator on cEntOS 6.2

Installation Guide: Running EQEmulator on cEntOS 6.2
This guide well tell you, step by step, how to install cEntOS 6.2 and get up and running with the latest EQEmulator. A few references are made to previous guides where it makes sense.

I enjoyed writing and testing the guide, and hope it may help other cEntOS fans out there.

Although it is possible to get everything running on 64 bit, the returns are diminishing, and as of today, there is no compelling reason to go the 64 bit route. So, for all intents and purposes, this guide is for i386 (32 bit).

Requirements
A server, desktop, or laptop with the following specifications and features:
  • Intel Pentium 4 or better CPU (or AMD equivalent)
  • Between 512MB and 4GB RAM
  • VGA (nothing special)
  • Ethernet adapter connected to the internet
  • A keyboard and monitor (used only until webmin and SSH are running)
  • A drive to install the OS and Apps on with at least 10GB capacity (a USB drive works fine, albeit slower than a HDD)
  • A DVD Rom drive, or USB stick (other than target USB stick, if using) used only for installing the OS.
  • Another computer with a DVD burner, or a USB drive to put the install disk on.
Not required, but recommended, an uninterruptable power source (UPS) for your server, router, and cable modem (or whatever connects you to the internet)

Assumptions
This guide assumes you have a basic understanding of how to use google.com to find answers before asking here, basic understanding of vim (aka vi) editor (or the ability to google it and learn in 2 minutes), same with puTTy, and know how to forward ports on your router.

Step 1: Getting cEntOS 6.2
Download and burn cEntOS 6.2
http://mirror.centos.org/centos/6.2/isos/i386/CentOS-6.2-i386-bin-DVD1to2.torrent

You will only need to burn Disk 1

Step 2: Preparing the cEntOS 6.2 installation disk
Boot your server to the DVD or USB drive you burned the install disk to.
Choose "Basic Server" from the install list, and don't worry about trying to setup the firewall, etc at this time.

After the installation is complete, your server will reboot.

Step 3: Activate your Ethernet Adapter
Now you are ready to begin preparing your server. Login as root, and enable your eth0 adapter (your Ethernet adapter) by editing the ifcfg-eth0 file:

Code:
vi /etc/sysconfig/networking/devices/ifcfg-eth0
Find the line with "set ONBOOT=" and make sure it is set to

Code:
ONBOOT=yes
Now press CTRL+ALT+DEL and restart your server. When it comes back up, after you login, check that your eth0 is functioning with ifconfig:
Code:
ifconfig
If your results are similar to the ones below, you are ready for the next step. Otherwise, re-read step 3 and check for typos.

Code:
eth0      Link encap:Ethernet  HWaddr F8:0F:41:3B:EC:84
          inet addr:192.168.1.21  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::fa0f:41ff:fe3b:ec84/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:754653 errors:0 dropped:0 overruns:0 frame:0
          TX packets:469526 errors:2 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1045464965 (997.0 MiB)  TX bytes:41940512 (39.9 MiB)
          Interrupt:27 Base address:0xa000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:199 errors:0 dropped:0 overruns:0 frame:0
          TX packets:199 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:20240 (19.7 KiB)  TX bytes:20240 (19.7 KiB)
Step 4: Losing your Head!
With a network connection, now it's time to get your server ready to become headless (without a keyboard, mouse, and monitor).
Install and Start SSH, so you can puTTy instead of your current keyboard and monitor.
Q: Why? You may ask? A: So you can cut/paste for the rest of this guide and save space and power.

Install SSH
Code:
yum -y install openssh-server openssh-clients
Now Start the SSH Service and check that the default port 22 is open
Code:
chkconfig sshd on

service sshd start

netstat -tulpn | grep :22
Now, we need to add some rules to the firewall, so that SSH access is only possible from your home network. For this guide, we assume 192.168.1.0/24.

Edit /etc/sysconfig/iptables (IPv4 firewall),
Code:
# vi /etc/sysconfig/iptables
Add the line
Code:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
If you want to restict access to 192.168.1.0/24, edit it as follows:
Code:
-A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 22 -j ACCEPT
If for some reason you also plan to use IPv6 on your server, also add this line:
Code:
-A RH-Firewall-1-INPUT -m tcp -p tcp --dport 22 -j ACCEPT
Save and close the file. Restart iptables:
Code:
# service iptables restart
Now, login as root to your server using puTTy (http://www.chiark.greenend.org.uk/~s...download.html), put away that keyboard and monitor you dont need anymore, and enjoy the copy pasta for the rest of this guide!

Step 5: Installing the necessary software
Now it's time to install the software needed to compile and maintain EQEmulator.

Code:
yum install -y openssl mysql-server gcc mysql-devel svn perl-IO-stringy make gcc-c++ perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker perl-ExtUtils-Embed cpan httpd mod_ssl

cpan ExtUtils::Install
#note: enter "yes" at the prompt when installing ExtUtils

Step 6: Installing Webmin

Code:
wget http://www.webmin.com/download/rpm/webmin-current.rpm

rpm –import http://www.webmin.com/jcameron-key.asc

rpm -U webmin-1.590-1.noarch.rpm
#note: At the time this guide was written the current release of webmin was webmin-1.590-1.noarch.rpm. If get a file not found, it is likely because a new version was released, so check the file name.

Step 7: Getting and Compiling EQEmulator

Now, we will add a user called eqemu, then checkout the latest EQEmulator source code

Code:
adduser eqemu

cd /home/eqemu

svn checkout http://projecteqemu.googlecode.com/svn/trunk/ source

cd /home/eqemu/source/EQEmuServer

make clean

make
Be patient, the compile time can take anywhere from 5 minutes to an hour depending on your server performance.

Step 8: Moving the compiled binaries to their new home

Code:
cd /home/eqemu

mkdir server

cd /home/eqemu/server

cp –a /home/eqemu/source/EQEmuServer/utils/defaults/* .

cp /home/eqemu/source/EQEmuServer/utils/patch_* .

cp /home/eqemu/source/EQEmuServer/utils/cleanipc .

cp /home/eqemu/source/EQEmuServer/world/world .

cp /home/eqemu/source/EQEmuServer/zone/zone .

cp /home/eqemu/source/EQEmuServer/EMuShareMem/libEMuShareMem.so .

cp /home/eqemu/source/EQEmuServer/eqlaunch/eqlaunch .

cd /home/eqemu/server/
Also get rid of remnant svn info the easy way...

Code:
rmdir -rf quests

rmdir -rf plugins

rmdir -rf Maps
Step 9: Getting the Maps, quests, plugins, and database files

The Maps file is HUGE and will take some time to download. It tooke me almost 30 minutes with Comcast cable.

Code:
wget http://downloads.sourceforge.net/project/eqemulator/EQEmulator%20Map%20Files/EQEmulator%20Map%20Pack%201.0/Maps.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Feqemulator%2Ffiles%2FEQEmulator%2520Map%2520Files%2FEQEmulator%2520Map%2520Pack%25201.0%2F&ts=1341628165&use_mirror=voxel

tar -xvf Maps.tar.gz

cd /home/eqemu/server/quests

svn checkout http://projecteqquests.googlecode.com/svn/trunk/quests .

cd /home/eqemu/server/plugins

svn checkout https://eqemupluginsrepo.googlecode.com/svn/trunk .

cd /home/eqemu/server

svn checkout http://projecteqdb.googlecode.com/svn/trunk .
Step 10: Creating and populating the database

Follow Database Setup and Patching instructions here:
http://www.eqemulator.net/wiki/wikka...nLinuxOnVMware

Step 11: Editing your configuration files
Follow EQEmu Setup instruction here
http://www.eqemulator.net/wiki/wikka...nLinuxOnVMware

Step 12: Creating Statup/Shutdown Scripts

Follow the "Create your Server start and stop files" from this guide:
http://www.eqemulator.net/wiki/wikka...nLinuxOnVMware

Now change the ownership of your /home/eqemu folder to eqemu:users
Code:
chown -R eqemu:users /home/eqemu
Step 13: Linux Firewall Settings

edit your iptables file
Code:
vi /etc/sysconfig/iptables
Now paste in the following...

Code:
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:FORWARD ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 22 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 80 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 443 --state NEW -j ACCEPT
-A INPUT -p udp -m state -m udp --dport 137 --state NEW -j ACCEPT
-A INPUT -p udp -m state -m udp --dport 138 --state NEW -j ACCEPT
-A INPUT -p udp -m state -m udp --dport 137 --state NEW -j ACCEPT
-A INPUT -p udp -m state -m udp --dport 138 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 139 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 445 --state NEW -j ACCEPT
-A INPUT -p tcp -m state -m tcp --dport 53 --state NEW -j ACCEPT
-A INPUT -p udp -m state -m udp --dport 53 --state NEW -j ACCEPT
-A INPUT -p udp -m state -m udp --dport 1194 --state NEW -j ACCEPT
-A INPUT -p tcp --dport 5998:5999 -j ACCEPT
-A OUTPUT -p tcp --dport 5998:5999 -j ACCEPT
-A FORWARD -p tcp --dport 5998:5999 -j ACCEPT
-A INPUT -p udp --dport 5998:5999 -j ACCEPT
-A OUTPUT -p udp --dport 5998:5999 -j ACCEPT
-A FORWARD -p udp --dport 5998:5999 -j ACCEPT
-A INPUT -p tcp --dport 7000:7100 -j ACCEPT
-A OUTPUT -p tcp --dport 7000:7100 -j ACCEPT
-A FORWARD -p tcp --dport 7000:7100 -j ACCEPT
-A INPUT -p udp --dport 7000:7100 -j ACCEPT
-A OUTPUT -p udp --dport 7000:7100 -j ACCEPT
-A FORWARD -p udp --dport 7000:7100 -j ACCEPT
-A INPUT -p tcp --dport 7778:7779 -j ACCEPT
-A OUTPUT -p tcp --dport 7778:7779 -j ACCEPT
-A FORWARD -p tcp --dport 7778:7779 -j ACCEPT
-A INPUT -p udp --dport 7778:7779 -j ACCEPT
-A OUTPUT -p udp --dport 7778:7779 -j ACCEPT
-A FORWARD -p udp --dport 7778:7779 -j ACCEPT
-A INPUT -p tcp --dport 9080 -j ACCEPT
-A OUTPUT -p tcp --dport 9080 -j ACCEPT
-A FORWARD -p tcp --dport 9080 -j ACCEPT
-A INPUT -p udp --dport 9080 -j ACCEPT
-A OUTPUT -p udp --dport 9080 -j ACCEPT
-A FORWARD -p udp --dport 9080 -j ACCEPT
-A INPUT -p tcp --dport 10000 -j ACCEPT
-A OUTPUT -p tcp --dport 10000 -j ACCEPT
-A FORWARD -p tcp --dport 10000 -j ACCEPT
-A INPUT -p udp --dport 10000 -j ACCEPT
-A OUTPUT -p udp --dport 10000 -j ACCEPT
-A FORWARD -p udp --dport 10000 -j ACCEPT
-A INPUT -p TCP -s localhost --dport 9000 -j ACCEPT
-A OUTPUT -p TCP -s localhost --dport 9000 -j ACCEPT
-A INPUT -p TCP -s localhost --dport 3306 -j ACCEPT
-A OUTPUT -p TCP -s localhost --dport 3306 -j ACCEPT
-I INPUT -p tcp --dport 8888 -j ACCEPT
-I OUTPUT -p tcp --dport 8888 -j ACCEPT
-I FORWARD -p tcp --dport 8888 -j ACCEPT
-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -p icmp -j ACCEPT
-A FORWARD -i lo -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
Now restart iptables
Code:
service iptables restart
Step 13: What now?
A few things that will make life easier for you as an admin:
Learn to use Webmin
  • Setup your VSFTP or Samba to make file transfer easy
  • Setup chron jobs for your backups (database and file)
  • Check, and check again your firewall and security settings
  • look for possible integration with fail2ban
  • If you don't have a UPS now, go get one, and plug in your server, router, and cable modem to it.
  • Google thought police, and get a VMWARE CentOS 6.2 i386 player images to use as your dev/test server.
Reply With Quote
 


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 06:04 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