MangosThree Install - Debian
This howto will be on how to get MangosThree running on Debian in VirtualBox as Windows 7 64 Bit as the host
Installing VirtualBox[edit | edit source]
This part should be self-explanatory, I may recap on certain settings like BIOS and other default settings
Starting up Virtual box and Installing the base operating system[edit | edit source]
Create a new virtual machine, I'm going with a 64-bit install with Debian 7.2.0 ISOs. 512MB ram, create a 20GB dynamic partition. After the new virtual machine has been set up, give the server 12MB of video ram which is more than enough to run a server.
Start the server, and select your settings as you wish.
When installing packages, only install what you need because we want this server to be as trim as possible. No Desktop, XWindow or gui, just a straight server.
On the Software Selection screen, Unselect Everything but the standard system utilities.
Install the Grub boot loader
Setting up Build Environment for Mangos[edit | edit source]
Login as root, we need to install a few things first. After looking at top, I only have 58 processes total running and about 56k of RAM used. not bad at all. We want the OS to be as trim as possible, that is one of the goals for this article.
As root, type in:
apt-get install sudo ssh
After install of sudo, Add the user mangos and edit the /etc/sudoers file and add the mangos username
adduser mangos edit /etc/sudoers Add under 'User Privilege Section' underneath root mangos ALL=(ALL:ALL) ALL Exit and save
Now type in exit and login as mangos username. You should have sudo rights now.
Type in these commands to establish a build environment
sudo apt-get install -y autoconf automake clang cmake gcc g++ libtool make patch sudo apt-get install -y cmake-curses-gui git-core
I had an issue with these commands not being found so I had to add the default repos in /etc/apt/sources.list
deb http://http.debian.net/debian wheezy main deb-src http://http.debian.net/debian wheezy main deb http://http.debian.net/debian wheezy-updates main deb-src http://http.debian.net/debian wheezy-updates main
run sudo apt-get update
to update the repos
Installing the Development headers[edit | edit source]
sudo apt-get install -y libace-dev libbz2-dev libmysqlclient-dev libncurses5-dev libreadline-dev libssl-dev zlib1g-dev
Installing the Database Server (MySQL)[edit | edit source]
sudo apt-get install -y mysql-server mysql-common mysql-client
Set the root password for the MySQL server
Creating and Setting Permissions for MySQL User[edit | edit source]
mysql -u root -p CREATE USER 'mangos'@'localhost' IDENTIFIED BY 'password';
for Password, use whatever you want and for user mangos, use whatever you want.
GRANT ALL PRIVILEGES ON `mangos\_%` . * TO 'mangos'@'localhost'; GRANT USAGE ON * . * TO 'mangos'@'localhost' IDENTIFIED BY 'password' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
again for username and password, use whatever you want, just ensure they match
Creating the Mangos Databases[edit | edit source]
mysql -u root -p CREATE DATABASE `mThree_characters` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE `mThree_realm` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE `mThree_scripts` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE `mThree_world` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; FLUSH PRIVILEGES ;
Downloading the Mangos-Zero Source from github and compiling[edit | edit source]
While you are in user mode and not root, create the mangos source directory
cd ~ mkdir mangos-source cd mangos-source git clone --recursive -b Rel19 http://github.com/mangosthree/server.git git clone --recursive http://github.com/scriptdev2/scriptdev2-cata.git src\bindings git clone --recursive http://github.com/mangosthree/tools.git git clone --recursive http://github.com/mangosthree/database.git
Be sure to use the --recursive so git will pull in everything, without this your compile will fail
Compiling Mangos[edit | edit source]
create the directories needed for build
sudo mkdir -p /opt/mZero/ sudo mkdir -p /opt/mZero/logs/mangos-zero/ sudo mkdir -p /opt/mZero/share/mangos-zero/ sudo chown -R mangos:mangos mZero
cd server mkdir _build cd _build cmake -DCMAKE_INSTALL_PREFIX=/opt/mZero2 -DDEBUG=1 -DBUILD_TOOLS=1 -DACE_USE_EXTERNAL=1 ..
DACE_USE_EXTERNAL=1 is important for the Tools to compile
Now in the ~/mangos-source/server/_build directory
make
After a successful compile run this.
make install
Configuration of Mangos[edit | edit source]
cd /opt/mZero/etc cp ahbot.conf.dist ahbot.conf cp mangosd.conf.dist mangosd.conf cp realmd.conf.dist realmd.conf
nano realmd.conf
The LoginDatabaseInfo Variable looks like this
LoginDatabaseInfo = "127.0.0.1;3306;mangos;mangos;realmd"
Change to
LoginDatabaseInfo = "127.0.0.1;3306;mangos;password;mZero_realm"
then for mangosd.conf
nano mangosd.conf
The lines that need to be changed are:
LoginDatabaseInfo = "127.0.0.1;3306;mangos;mangos;realmd" WorldDatabaseInfo = "127.0.0.1;3306;mangos;mangos;mangos" CharacterDatabaseInfo = "127.0.0.1;3306;mangos;mangos;characters" ScriptDev2DatabaseInfo = "127.0.0.1;3306;mangos;mangos;mangos"
These lines should be changed to:
LoginDatabaseInfo = "127.0.0.1;3306;mangos;password;mZero_realm" WorldDatabaseInfo = "127.0.0.1;3306;mangos;password;mZero_world" CharacterDatabaseInfo = "127.0.0.1;3306;mangos;password;mZero_characters" ScriptDev2DatabaseInfo = "127.0.0.1;3306;mangos;password;mZero_scripts"
Map Extraction[edit | edit source]
Go into /opt/mZero/bin and copy these files to your main World of Warcraft directory ( c:\program files\World of Warcraft in Windows. You should know where it is )
cp map-extractor [WoW DIR] cp vmap-extractor [WoW DIR] cp vmap-assembler [WoW DIR] cp mmap-generator [WoW DIR] cp ExtractResources.sh [WoW DIR] cp MoveMapGen.sh [WoW DIR] cp offmesh.txt[WoW DIR]
Change to your WoW DIR
chown +x ExtractResources.sh ./ExtractResources.sh
Answer the questions, should take a while. If you ever edit the offmesh.txt file, you have to re-run the ExtractResources.sh again.
After it's done, Create a 'data' directory in /opt/mZero and copy the dbc,vmaps and mmaps directories to /opt/mZero/data
Inserting Database Information[edit | edit source]
cd ~/mangos-source/database/Realm/Setup mysql -u root -p mZero_realm < realmdLoadDB.sql cd ~/mangos-source/database/Character/Setup mysql -u root -p mZero_characters < characterLoadDB.sql cd ~/mangos-source/database/World/Setup mysql -u root -p mZero_world < mangosdLoadDB.sql
Inserting Table Information and Full DB[edit | edit source]
cd ~/mangos-source/database/ nano make_full_WorldDB.sh Change the last line to look like this: for i in /home/mangos/mangos-source/database/World/Setup/FullDB/*.sql; do tail -n +18 $i >> full_db.sql; done Save the file bash make_full_WorldDB.sh mysql -u root -p mZero_world < full_db.sql
Running the Server[edit | edit source]
Realmd (Realm Server)[edit | edit source]
go to /opt/mZero/bin and run the realmd server
cd /opt/mZero/bin ./realmd
If after running realmd and you get an error
cd ~/mangos-source/database/Realm/Updates/Rel20 mysql -u root -p mZero_realm < update_the_SQL_file_it_was_screaming_for.sql
You should get realmd listening for connections at this time.
Mangos (World Server)[edit | edit source]
go to /opt/mZero/bin and run the mangosd server
cd /opt/mZero/bin ./mangosd
If after running mangosd and you get an error
cd ~/mangos-source/database/World/Updates/Rel20 mysql -u root -p mZero_world < update_the_SQL_file_it_was_screaming_for.sql
You should get mangosd listening for connections at this time.
Finalizing running the server[edit | edit source]
I use Screen so you'll have to install this
sudo apt-get install screen
Then, in the /opt/mZero/bin directory, create a file called runserver.sh
#!/bin/sh cd /opt/mZero/bin screen -A -m -d -S mangosworld ./mangosd #!/bin/sh cd /opt/mZero/bin screen -A -m -d -S mangosrealm ./realmd
Save it and then chmod +x runserver.sh
Credits[edit | edit source]
If you have any issues with this, please feel free to email me at me@chrisfaulkner.org