[Show Table of Contents]


§Install Guide for Virtualbox/Debian 7 (Linux), EQEmu with ProjectEQ Database

§Legend

  • Notes prefixed with $ imply a generic user account bash command, and should be typed in a console.
  • Notes prefixed with # imply a root user account bash command, meaning they are done with super privileges
  • Notes prefixed with > imply a windows command
  • All passwords in my example are "root", it is recommended you do unique passwords
  • The username I create is called xackery, any reference to the word xackery should be changed to a user name you pick
  • The database schema I created is called eq, as well as the MySQL username I created was called eq
  • The 10.0.0.110 reference is the LAN IP of my configuration, yours will likely be 192.168.0.X, during step 6 you learn yours, remember this!
 

§1 - Install Virtual Box

So, you want to install an Everquest private server, eh?  These steps will give you direction on how to configure and install a linux based EQEMU server. The process will likely take you 2 to 4 hours.

Virtual Box is a Virtual Machine software freely distributed by Oracle. There are alternatives to it, such as VMWare, and most of my steps can easily be adapted to these different softwares with a little bit of hunting.

  • Go to https://www.virtualbox.org/
  • Go to downloads section
  • Download Virtualbox for your operating system.
  • Run the setup file, following prompts.
  • Continue until you open the Oracle VM VirtualBox Manager

§2 - Obtain an Operating System Disk ISO

We'll be using Debian as our Operating System for this setup. The Linux world has many distributions of the kernel and you can split them into two main types: DEB based or RPM based. Most of my instructions should work for any DEB based distribution, such as Ubuntu. LTS stands for Long Term Support, and is normally recommended because it is designed to be more stable, and be supported for a longer term.

  • Go to http://debian.org
  • Click Getting Debian
  • Click Download Installation Image
  • You want an LTS edition. Select i386 or 64bit, if greater than 4gig RAM, use 64bit, if less, 32bit (i386).
  • Download the iso.

§3 - Create a VM Instance

Now that we have a Virtual Machine manager (VirtualBox) and an Operating System (Debian), we need to prepare the Virtualbox for an OS.

  • Create a new instance on top left.
  • Name: Call anything you like. e.g. Debian EQ. Next
  • I recommend a minimum of 2 gigs of memory. Next
  • Create a virtual hard drive. Next
  • VDI. Next.
  • Dynamically allocated. Next
  • 8 gigs minimum, more realistically 15gigs+. If you want to change where the virtual image hard drive is stored, this is the step. Create

§4 - Starting the Instance for the First Time

We need to install the OS to Virtualbox. Most prompts are very straight forward, and default to the answer I would recommend. The only step to watch out for is when it prompts a list of various debian components. You can't really screw this up, as it can be undone later, but it is not recommend installing the prepackaged web server system since it installs POSTGRES, a competitor to MySQL for databases and cause potential headaches on future steps.

  • Click Start
  • If no operating system is found, it will prompt you to choose a drive letter. Click the browse button to find the iso.
  • Select start once you select the CD.
  • Do "Install" option.
  • For majority of prompts, you can go the default option up until the SSH server part.
  • hostname: eq
  • domain: eq.com
  • root password: root
  • Root password should be very secure, I normally randomly hash it and store it somewhere SAFE.
  • new user name: eq
  • password: root
  • turn off all options on install step, except SSH server and standard system utilities
  • yes to grub install

§5 - Install Sudo

I really recommend leveraging sudo, as a design principle root should never be logged in to, except in extreme situations. sudo allows you to temporarily elevate your privileges from a normal user to root access, making it less likely you'll do an accidental root command in a bad situation, and increases security.

  • Log in with the user account.
  • username: eq
  • password: root
  • $ su root
  • (enter password)
  • # apt-get install sudo
  • # nano /etc/sudoers
  • scroll down and find this line
    root ALL=(ALL:ALL) ALL

     

  • Below it, append the line, (change eq to your username)
    eq ALL=(ALL:ALL) ALL

     

  • ctrl+o to write changes
  • ctrl+x to exit nano
  • $ exit
  • Now you can do sudo commands as your username

§6 - Set Up Bridged Adapter instead of NAT

By default, Virtual Machines create a closed network LAN between all virtual machines being managed. It closes it from the outside network. We want to make it so any machines in your computer's network can access your server, so we want to bridge the virtual adapter to the main network.

  • $ sudo shutdown -h now
  • (enter password)
  • Right click your virtualbox instance
  • Go to settings
  • Click the network option on left
  • Change the Attach to: NAT option to bridged adapter
  • Make sure the network card after you change this option is your proper NIC that gets internet access. (By default, it should be fine)
  • start your virtual machine again
  • username: eq
  • password: root
  • $ sudo ifconfig
  • Compare the IP address with your local IP address, e.g. mine is 10.0.0.111, yours may be 192.168.0.X. REMEMBER THIS FOR FUTURE STEPS, replace my 10.0.0.111 to your LAN IP.
  • In windows, go to command line
  • > ipconfig
  • scroll up the output and compare the IP address, ensure it has the same network allocation e.g. mine was 10.0.0.105, that's on same subnet as 10.0.0.111

§6.5 - Install LAMP (Apache, MySQL, PHP)

This step is recommended primarily for tools, but you do need mysql-server and mysql-client no matter what setup you have. This is basically a webserver step, and is used for phpeditor.

  • $ sudo apt-get install apache2 php5 php5-mysql mysql-server mysql-client
  • Y enter to accept the install files (review them)
  • Create a MySQL root password, in my case it's "root", this should be something random/secure.

§7 - Verify LAMP Configuration

This setup most likely will be fine after you follow the previous step, but this is a great way to check if you're following all the steps so far successfully.

  • On your browser, try to access the IP address you saw earlier, e.g. in the video it was http://10.0.0.111
  • It should say "It works!". If it doesn't, you likely messed up 6 or 6.5 some how, review those steps again.
  • $ sudo nano /var/www/info.php
  • Add the line: 


			

 

  • ctrl+o to write out changes
  • ctrl+x to exit
  • go back to browser, type in http://10.0.0.111/info.php
  • verify that apache2 is being used, php5, mysql drivers should be noted.
  • $ sudo rm /var/www/info.php

§8 - Install EQEMU source files

Now it's time to start getting the actual EQ related steps. We start by downloading EQEMU's source files, and I also have steps for SSH-ing into your instance. Note that if you are not in a windows environment, e.g. linux or OSX, ssh is built into your operating system, in OSX, you can click the spotlight search on top right corner, and type in terminal. Then type in ssh eq@10.0.0.111. For Linux, you can start a terminal as well and follow the same steps.

  • $ sudo apt-get install gcc g++ make cmake libio-stringy-perl libperl-dev subversion unzip git libmysqlclient-dev libboost-dev liblua5.1-dev
  • Y enter, after reviewing the instructions see if any issues.
  • $ cd ~
  • $ mkdir peq server
  • $ git clone git://github.com/EQEmu/Server.git eqemu
  • (NOTE: You'll get an option to download maps and quests when you first run world
  • You can optionally download putty by going to http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
  • After getting putty.exe, you can run it in a command line by using putty eq@10.0.111
  • Allow fingerprint prompt on first access

§9 - Compile Binaries for EQEmu

Now it's time to make the executables that will be ran from now on.

  • $ cd ~/eqemu/
  • $ cmake .
  • Verify no errors.
  • $ make

§10 - Download Filezilla for copying via SSH (scp)

This step is technically optional, and you may have a preferred route for copying files to and from your server. But, Filezilla is supported by all platforms and is relatively easy to configure for SFTP setup.

  • Go to https://filezilla-project.org/
  • Click download
  • Choose your operating system, install it.
  • Open filezilla
  • On top right, go to site manager
  • on bottom of prompt, go to Add Site
  • Name the site.
  • Set host to your IP, e.g. 10.0.0.111
  • Set port to 22
  • Change protocol from FTP to SFTP
  • Change login type from Anonymous to Normal
  • Set username to your login username, in my case eq
  • Enter your password
  • Hit Connect, you should see your home directory on the right side of Filezilla

§11 - Get the PEQ Files from Google Drive Download

The reason we needed Filezilla above is because the place the PEQ files are stored is inside google drive, which is not wget friendly. (wget is a linux command that lets you retrieve a simple file from a single web request). Once you download the files, you're simply copying and extracting them as the instructions note. 

  • Go to http://peqtgc.com/releases
  • Download the peqbeta, phpeditor. Don't worry about the peqquest file, this is now inside the first world run menu.
  • Go to filezilla, still connected to your server, and open the peq folder on the right side.
  • Drag-drop the downloaded files earlier into the window pane
  • Verify the files copied by going into command line and typing:
  • $ cd ~/peq/
  • $ ls
  • (You should see the 3 files in the directory.)
  • $ tar xzf peq[tab]
  • $ tar xzf php[tab]
  • $ sudo mv phpeditor /var/www/
  • $ rm *.tar.gz

§12 - Download MySQL Workbench

MySQL is the database that the server uses to store everything. It is possible to use command line to access MySQL, among heidi SQL, and other editors. This is a personal favorite.

  • Go to http://dev.mysql.com/downloads/workbench/
  • Download, you can skip registration
  • Install the downloaded file.
  • Once ran, you'll see on the top left the words "MySQL Connections" with a + and wrench symbol.
  • Click the + symbol
  • Connection Name: Call this something to label your connection, e.g. eq
  • Change connection method to standard TCP/IP over SSH
  • SSH hostname: 10.0.0.111:22 (change this to your lan ip)
  • SSH username: eq (change this to your username)
  • Click Store in Vault, SSH password: root (change this to your password)
  • MySQL username: root
  • Click Store in Vault, MySQL password: enter your root MySQL password
  • Click Test connection. It should say Parameters are correct.
  • Click OK
  • Select the instance you created on the list

§13 - Creating a MySQL User and Database Schema

This is an important step for ensuring the sql files you'll be sourcing later have a place to go to.

  • Now that you are connected to MySQL Workbench, click the Users and Privileges link on the left center area
  • Name: eq
  • Limit Connectivity To: change from % to 127.0.0.1
  • Password: root (change to whatever)
  • password confirm: root
  • Click apply on bottom right corner
  • Select the Add Schema link on the top left area, (it looks like a cylindrical database icon)
  • Name: eq
  • Click apply on bottom right
  • Click apply/finish to any confirmation prompts
  • Go back to Users and Privileges
  • Select the eq user
  • Click the Schema Privileges tab on top right
  • Click Add Entry on the bottom right
  • Click the selected schema option
  • Click the EQ schema from the list
  • click OK
  • Click the Select *ALL* option on bottom right
  • Click Apply

§14 - Prepare server directory

I prepare all files in a simple home directory structure. You can organize your folders however you deem fit, but my instructions will need to be adjusted for your setup.

  • $ cd ~/server/
  • $ mkdir logs shared
  • $ cp ~/eqemu/bin/* .
  • $ cp ~/eqemu/utils/defaults/log.ini
  • $ cp ~/eqemu/utils/patches/patch_* .
  • $ cp ~/eqemu/utils/patches/opcodes.conf .
  • $ ln -s ../maps/ Maps
  • $ cd ~/peq/
  • $ cd ~/server/

§15 - Inject PEQ Database

If you've set up the user and schema on the previous steps, this should not prompt anything during the typing of each command.

  • $ cd ~/peq
  • $ mysql -u eq -p -h 127.0.0.1 eq < peqbeta_*.sql
  • $ mysql -u eq -p -h 127.0.0.1 eq < player_*.sql
  • $ cp eqtime.cfg ~/server

§16 - Copy XML and Edit

The XML file is the main config file for EQEMU, so it is always a good idea to be familiar with the options it offers.

  • $ cd ~/server
  • $ cp ~/eqemu/utils/defaults/eqemu_config.xml.full ~/server
  • $ mv ~/server/eqemu_config.xml.full eqemu_config.xml
  • $ nano eqemu_config.xml
    • Shortname - your server's name,
    • Longname - your server's display name on server list, 
    • Key - generate something randomly
  • ​ctrl+o
  • ctrl+x

§17 - Install and Set Up Tmux

Tmux is a way to manage multiple sessions in Linux's command line interface. Gnu screen is another option, and really if you want to skip this, you can simply use multiple ssh connections, it just is a bit more tedious to work with.

  • NOTE: This step is optional
  • $ sudo apt-get install tmux
  • $ nano ~/.tmux.conf
  • Insert below:
# remap prefix to Control + a
set -g prefix C-a
# bind 'C-a C-a' to type 'C-a'
bind C-a send-prefix
unbind C-b
  • (For reference of commands, see here: https://gist.github.com/andreyvit/2921703)
  • $ tmux

§18 - Set up database connection / shared memory

Get shared_memory prepped, and ensure that the database information is also configured.

  • mkdir shared
  • $ ./shared_memory
  • Shared Memory is used to generate some flat files that is shared between all the zones, stuff like items, spells, etc. It should note these items being "loaded" during this step.
  • $ ./world
  • It should notify you that it cannot to the database.
  • $ nano ~/server/eqemu_config.xml
  • Database Password: change to root
  • $ ./world
  • Follow the perl menu running DB update, quests, maps. Note that pressing the menu # multiple times will do confirmation.

§19 - Copy spell file

The spell file also can be generated with the phpeditor covered in later steps, but this isn't usually leveraged unless you are making custom spells.

  • Go to your Everquest directory.
  • Copy spells_us.txt and spells_en.txt by drag-dropping files into the FileZilla session to the folder /home/eq/server/. If you only have spells_us.txt, that's fine.

§20 - Configure kernel option, router port forwarding

This is a patch to ensure there's enough shared memory set up for the kernel to allow zones and world the ability to access constant data that doesn't really change after bootup.

  • $ sudo nano /etc/sysctl.conf
  • Scroll to bottom of file and append
  • kernel.shmmax = 134217728
  • $ sudo chmod 444 /etc/sysctl.conf
  • $ sudo /sbin/sysctl -p
  • Edit your router's ports to allow forwarding of 7000 to 9080 TCP/UDP to your LAN IP address (Mine is 10.0.0.111).

§21 - First Login, Set Admin Access

When you first login to your server, you'll be making a character and discover you aren't a GM. You'll need to edit the database's account table to change the status field from 20 to 300 to give admin access. Note GM status doesn't take effect until a person reconnects to your server.

  • make sure tmux is running. (or multiple sessions)
  • $ cd ~/server
  • Log in to EQ client and verify you can access account.
  • In Workbench, find your eq schema and expand the Tables node.
  • Right click the account table, and click the SELECT all tables limit 1000 option
  • Click on the status field and change from 20 to 300
  • Click apply on the bottom right

§22 - Set up PHPEditor (optional)

PHPEditor is a way to edit NPC's, spells, items, and many other aspects of the EQ database. It is recommended to set up for future editing, even if you use other tools along with it.

  • First, we need to inject the schema file for phpeditor
  • $ sudo mysql -u eq -p -h 127.0.0.1 eq < /var/www/phpeditor/sql/schema.sql
  • Go to a web browser, access http://10.0.0.111/phpeditor/
  • It should note database is not configured.
  • $ sudo cp /var/www/phpeditor/config.php.dist /var/www/phpeditor/config.php
  • $ sudo nano /var/www/phpeditor/config.php
  • $ sudo mkdir /var/www/phpeditor/logs
  • $ sudo chmod 777  /var/www/phpeditor/logs
  • change the dbhost, 127.0.0.1
  • dbuser change to eq
  • password change to root
  • db change to eq
  • Refresh web page, should show prompt
  • Log in as admin/password
  • $ sudo chmod 777 /var/www/phpeditor/spells_us.txt

§23 - Verify All Works

Now it's time to see if all the steps up to here is working properly.

  • Log in to Everquest again, finding your server
  • Once logged in, /say #zone neriakc
  • If you get a permission issue, then redo step 21.
  • Now that you zone, verify mobs spawned in neriakc. Verify that the NPC in the back center of the library responds to hail (if not, quests are not in properly).
  • With that, you should preliminarily have everything in!

§24 - Configure Universal Chat Service (UCS) (Optional)

If you do not start or configure UCS, you'll be spammed with red text in game that the chat servers are not available.

  • $ cp ~/eqemu/utils/patches/mail_opcodes.conf ~/server
  • $ ./ucs
  • $ nano ~/server/eqemu_config.xml
  • Change the lines from channels.eqemulator.net to localhost
 

§25 - Remote Web Management (Optional)

This is an optional way to lock/unlock your server and do other maintainence operations from a remote location.

  • $ nano ~/server/eqemu_config.xml
  • Change the line from enabled="false" to enabled="true"
  • $ cd ~/server/
  • $ ./world
  • You should now be able to access http://10.0.0.111:9080
  • If not, make sure you forward the port on your router. (Previous steps only forward 7000 to 9000, so 9080 needs to be added to range).
 

§Other notes

  • None