Obtained via distro commands:
Debian/Ubuntu: 'apt install git make automake mariadb libsdl2-dev libmariadb-dev libboost1.55-dev libreadline-dev cmake' (remove mariadb if you want to use MySQL) if you're on Ubuntu 19.04+ you need to get MySQL 5.7 manually.
Arch Linux: 'pacman -S git make automake mariadb sdl2 boost-libs boost readline cmake' (remove mariadb if you want to use MySQL) then you need to get MySQL 5.7 from the AUR, 'yay -S mysql57'
Fedora: 'dnf install git make automake mariadb mariadb-server SDL2 boost boost-devel readline-devel mariadb-devel cmake' (remove mariadb if you want to use MySQL) getting MySQL 5.7 on Fedora needs to be done manually.
Gentoo: ‘emerge --ask dev-vcs/git sys-devel/make sys-devel/automake dev-perl/Net-Daemon dev-perl/PlRPC dev-perl/DBI dev-perl/Devel-CheckLib dev-perl/TermReadKey acct-group/mysql acct-user/mysql dev-db/mysql-init-scripts virtual/perl-Term-ANSIColor dev-db/mariadb dev-perl/DBD-mysql dev-libs/boost app-crypt/rhash dev-libs/libuv dev-libs/jsoncpp dev-util/cmake’
Sabayon: 'equo install git make automake mariadb mariadb-server sdl2 boost boost-devel readline-devel mariadb-devel cmake`
Additional libraries/source that must be individually obtained and installed:
1. Obtain the source code / server base:
git clone https://git.eq2emu.com/devn00b/EQ2EMu.git
2. Change Directory to the RecastDemo, also make sure you download Premake5 and put it in this directory.
cd EQ2EMu/EQ2/source/depends/recastnavigation/RecastDemo
3. Run premake5 and make:
./premake5 gmake
cd Build/gmake
make
4. Clone fmtlib into the depends folder
cd ../../../..
git clone https://github.com/fmtlib/fmt.git
Note: Only pick ONE of the below methods, not both Makefiles and CMake. If you don't know what to choose, choose Makefiles.
1. Change directory to the LoginServer source
cd /path/to/EQ2EMu/EQ2/source/LoginServer/
2. Run make
make -j$(nproc)
3. Change Directory to the WorldServer source
cd ../WorldServer
4. Run make
make -j$(nproc)
5. Change directory to the main folder
cd ../../../
6. Make a new folder
mkdir Linux
cd Linux
7. Copy the world and login binary
cp ../EQ2/source/WorldServer/eq2world ./ && cp ../EQ2/source/LoginServer/login ./
8. Copy all the needed files for the server
cp -rT ../server .
Or you can use my script to automatically copy the files, skipping unnecessary ones #Keeping up-to-date
9. Update login_db.ini and world_db.ini to use the correct password for the DB.
10. Update LoginServer.ini to the correct server details.
11. To run the server you will need to execute login and eq2world (keep in mind you will need multiple shells or run these individually in screen/tmux)
./login
./eq2world
1. Change directory to the main folder (EQ2EMu)
cd /path/to/EQ2EMu
2. Make a new folder
mkdir Linux
cd Linux
3. Run CMake, then build the server
cmake ..
make -j$(nproc)
4. Copy all the needed files for the server
cp -rT ../server .
Or you can use my script to automatically copy the files, skipping unnecessary ones #Keeping up-to-date
5. Update login_db.ini and world_db.ini to use the correct password for the DB.
6. Update LoginServer.ini to the correct server details.
7. To run the server you will need to execute login and eq2world (keep in mind you will need multiple shells or run these individually in screen/tmux)
./login
./eq2world
The server won't start if you don't populate the database. The database contains practically everything you see in the game. To populate it is easy.
For example, to do it in the command line you'd do as follows:
CREATE DATABASE eq2emu;
CREATE DATABASE eq2ls;
USE eq2emu;
source LOCATIONOFSQL_UPDATES/eq2emu.sql
USE eq2ls;
source LOCATIONOFSQL_UPDATES/eq2emulssql.sql
Also make sure you create a user for the emu.
CREATE USER 'eq2emu'@localhost IDENTIFIED BY 'eq2emu';
GRANT ALL PRIVILEGES ON *.* TO 'eq2emu'@localhost IDENTIFIED BY 'eq2emu';
You have successfully compiled the server! There is a little more setup required to get the server running.
- [Database]
- host=localhost
- user=root #Update to your new DB user
- password=pass #Update to your new DB password
- database=eq2ls
2. Edit world_db.ini
- [Database]
- host=127.0.0.1
- user=root #Update to your new DB user
- password=pass #Update to your new DB password
- database=eq2emu
3. Edit LoginServer.ini
- [LoginServer]
- loginserver=ENTERIP #IP of login server, usually should be 127.0.0.1
- loginport=9100
- worldname=TestLabs #Name of in-game server (SERVERNAME)
- worldaddress=ENTERIP #IP of world server, usually should be 127.0.0.1, or if you're wanting others to connect, your external IP.
- internalworldaddress=ENTERIP #internal IP of world server, usually should be 127.0.0.1
- worldport=9001
- locked=false
- account=testlabs #Username (SERVERACCOUNT) for server
- password=testpass #Password (SERVERPASSWORD) for server
4. Add your server to the DB, in the MySQL command line, type
INSERT INTO `login_worldservers` VALUES (4,'SERVERNAME',0,'SERVERACCOUNT','','DESCRIPTION','0',sha2("SERVERPASSWORD",512),'SERVEROWNER',0,0,0,0,'0','NOTE','IP_ADDRESS',0,0,0,0,0,0,'SERVERWEBSITE','Development','SERVERADMIN',0,NULL,0,0,'0');
For example, I put
INSERT INTO `login_worldservers` VALUES (4,'EverQuest II',0,'eq2','','EverQuest II emu','0',sha2("eq2",512),'Techwizz',0,0,0,0,'0','','127.0.0.1',0,0,0,0,0,'','0','Development','Techwizz',0,NULL,0,0,'0')
If you want to keep your server at the newest version, simply run 'git pull' in the EQ2EMu directory, then cd into Login and World server and compile them. Then simply copy the binaries to the Linux folder or wherever else you might have put your executables for the server. Then you just grab the latest SQL files and execute those in your database.
I made a script to automate the process.
wget -cO - https://www.dropbox.com/s/32qqmmviblulhwl/updater.sh?dl=1 > updater.sh
2. give it executing permissions
chmod +x updater.sh
3. Run it
./updater.sh
4. Execute the 2 new SQL files in SQL_UPDATES to your database.
Check gcc -v you may be running GCC v7, GCC v8 required.
-I/usr/include/mysql in COPTS=$(WFLAGS)
Or you might be missing libmariadb-dev.
change:
-lmariadbclient
to:
-lmysqlclient
/usr/bin/ld: build/release/WorldServer/World.o: in function `World::init()':World.cpp:(.text+0xa9df): undefined reference to `WorldDatabase::LoadRuleSets()'collect2: error: ld returned 1 exit statusmake: *** [makefile:58: eq2world] Error 1
Simply try to run 'make clean' then 'make' once more.
EQ2EMu/EQ2/source/WorldServer/Zone/../../common/string_util.h:27:10: fatal error: fmt/format.h: No such file or directory
Find #include <fmt/format.h> in string_util.h and change it to #include <../depends/fmt/include/fmt/format.h>