<?xml version="1.0"?>
<rss version="2.0"><channel><title>Wiki: Wiki</title><link>https://www.getmangos.eu/wiki/documentation/installation-guides/guideslinux/?d=4</link><description>Wiki: Wiki</description><language>en</language><item><title>Help with manual - map extraction</title><link>https://www.getmangos.eu/wiki/documentation/installation-guides/guideslinux/help-with-manual-map-extraction-r40010/</link><description><![CDATA[<p>
	All,
</p>

<p>
	This is my first attempt and I feel like I have followed the installation guide step-by-step and everything works perfectly up until extracting the maps, mmpas, vmaps, etc. and I am stuck as I can't find a whole lot of detailed instructions.
</p>

<p>
	I am trying to install <abbr title="Massive Network Game Object Server">mangos</abbr> WOTLK 3.3.5 on Ubuntu 18.04.5 LTS, Release:  18.04, Codename: bionic on a VM but I keep getting the errors shown below. the auth server seems to be running fine and I can log in with the default credentials but running the world server keeps erroring out about missing map, mmap, etc. files
</p>

<p>
	I didn't change anything from the install guide and defaults except chaining the <abbr title="Massive Network Game Object Server">mangos</abbr> password. Does you see any issues with the output here that can help?<br />
	<br />
	 
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">mangos@DAL-VM-TFBS-1:/opt/wow/install/mangos/bin$ ./mangosd
2201075 [world-daemon]
</span><span class="tag">&lt;Ctrl-C&gt;</span><span class="pln"> to stop.
  __  __      _  _  ___  ___  ___        ____
 |  \/  |__ _| \| |/ __|/ _ \/ __|      /_  /___ _ _ ___
 | |\/| / _` | .` | (_ | (_) \__ \       / // -_) '_/ _ \
 |_|  |_\__,_|_|\_|\___|\___/|___/      /___\___|_| \___/
 Powered By MaNGOS Core
__________________________________________________________

Website/Forum/Wiki/Issue Tracker: https://www.getmangos.eu
__________________________________________________________


Using configuration file /opt/wow/install/mangos/conf/mangosd.conf.
OpenSSL 1.1.1  11 Sep 2018 (Library: OpenSSL 1.1.1  11 Sep 2018)
Using ACE: 6.5.9
World Database total connections: 2
Connected to MySQL database mangos@127.0.0.1:3306/mangos0
MySQL client library: 5.7.34
MySQL server ver: 5.7.34-0ubuntu0.18.04.1
AUTOCOMMIT SUCCESSFULLY SET TO 1
Connected to MySQL database mangos@127.0.0.1:3306/mangos0
MySQL client library: 5.7.34
MySQL server ver: 5.7.34-0ubuntu0.18.04.1
AUTOCOMMIT SUCCESSFULLY SET TO 1
The table `db_version` indicates that your [World] database hase the same version as the core requirements.

Character Database total connections: 2
Connected to MySQL database mangos@127.0.0.1:3306/character0
MySQL client library: 5.7.34
MySQL server ver: 5.7.34-0ubuntu0.18.04.1
AUTOCOMMIT SUCCESSFULLY SET TO 1
Connected to MySQL database mangos@127.0.0.1:3306/character0
MySQL client library: 5.7.34
MySQL server ver: 5.7.34-0ubuntu0.18.04.1
AUTOCOMMIT SUCCESSFULLY SET TO 1
The table `db_version` indicates that your [Character] database hase the same version as the core requirements.

Login Database total connections: 2
Connected to MySQL database mangos@127.0.0.1:3306/realmd
MySQL client library: 5.7.34
MySQL server ver: 5.7.34-0ubuntu0.18.04.1
AUTOCOMMIT SUCCESSFULLY SET TO 1
Connected to MySQL database mangos@127.0.0.1:3306/realmd
MySQL client library: 5.7.34
MySQL server ver: 5.7.34-0ubuntu0.18.04.1
AUTOCOMMIT SUCCESSFULLY SET TO 1
The table `db_version` indicates that your [Realmd] database hase the same version as the core requirements.


Realm running as realm ID 1

Using World DB: Version: 22, Structure: 1, Content: 17

Using DataDir /opt/wow/gamedata/1.12/mangos/
WORLD: VMap support included. LineOfSight:1, getHeight:1, indoorCheck:1
WORLD: VMap data directory is: /opt/wow/gamedata/1.12/mangos/vmaps
WORLD: MMap pathfinding enabled

Please check for the existence of map file '/opt/wow/gamedata/1.12/mangos/maps/0004331.map'
Correct *.map files not found in path '/opt/wow/gamedata/1.12/mangos/maps' or *.vmtree/*.vmtile files in '/opt/wow/gamedata/1.12/mangos/vmaps'. Please place *.map and vmap files in appropriate directories or correct the DataDir value in the mangosd.conf file.

Wait 10 secs for continue.
[**************************************************] 100%
Segmentation fault</span></pre>

<p>
	 
</p>
]]></description><guid isPermaLink="false">40010</guid><pubDate>Fri, 21 May 2021 22:16:35 +0000</pubDate></item><item><title>Installing ACE on CentOS 7</title><link>https://www.getmangos.eu/wiki/documentation/installation-guides/guideslinux/installing-ace-on-centos-7-r20094/</link><description><![CDATA[<p>
	Building <abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">MaNGOS</abbr></abbr> on Linux requires ACE libraries. I could not find information on installing those here, so I will make a short HOWTO (copied from ACE documentation)
</p>

<p>
	1. Make a folder for ACE in your preferred location ( I use /opt)
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">mkdir /opt/ace &amp;&amp; cd /opt/ace</span></pre>

<p>
	2. Download and unpack ACE
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">wget http://download.dre.vanderbilt.edu/previous_versions/ACE-6.4.7.tar.gz
tar -xvf ACE-6.4.7.tar.gz</span></pre>

<p>
	3. Add needed environment variables
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">cat &gt;&gt; /etc/profile &lt;&lt;EOF
export ACE_ROOT=/opt/ace/ACE_wrappers
EOF
source /etc/profile</span></pre>

<p>
	4. Add the desired headers
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">cat &gt; /opt/ace/ACE_wrappers/ace/config.h &lt;</span><span class="tag">&lt;EOF</span><span class="pln">
#</span><span class="atn">include</span><span class="pln"> </span><span class="atv">"ace/config-linux.h"</span><span class="pln">
</span><span class="atn">EOF</span><span class="pln">
</span><span class="atn">cat</span><span class="pln"> </span><span class="tag">&gt;</span><span class="pln"> /opt/ace/ACE_wrappers/include/makeinclude/platform_macros.GNU &lt;&lt;EOF
INSTALL_PREFIX = /usr/local
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
EOF</span></pre>

<p>
	5. Build ACE
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">cd /opt/ace/ACE_wrappers
make
make install</span></pre>

<p>
	6. Add the library to the public path
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">cat &gt; /etc/ld.so.conf.d/ace.conf &lt;&lt;EOF
/opt/ace/ACE_wrappers/lib
EOF
ldconfig -v</span></pre>

<p>
	 
</p>
]]></description><guid isPermaLink="false">20094</guid><pubDate>Tue, 20 Mar 2018 02:26:04 +0000</pubDate></item><item><title>Installing Mangos on CentOS 7</title><link>https://www.getmangos.eu/wiki/documentation/installation-guides/guideslinux/installing-mangos-on-centos-7-r20075/</link><description><![CDATA[<div data-controller="core.front.core.articlePages"><div data-role="contentPage"><p>
	Hello, in this tutorial, I will explain a step-by-step approach to configure, install and run <abbr title="Massive Network Game Object Server">Mangos</abbr> on a CentOS 7 Linux system. <strong>To fully execute the installation, you need an original copy of the game client version you want to run.</strong>
</p>

<p>
	This guide has been fully tested on an empty CentOS 7 system with minimal installation.
</p>

<p>
	Let's go..
</p>

<p>
	<u><span style="font-size:18px;">Setup the database:</span></u>
</p>

<p>
	CentOS is supporting MariaDB instead of MySQL by default. This part of the guide will help you to setup your instance of MariaDB.
</p>

<p>
	Launch a terminal, and if it's not already the case, you need to become the 'root' user:
</p>

<pre class="ipsCode">
sudo su - root</pre>

<p>
	Then, install MariaDB:
</p>

<pre class="ipsCode">
yum -y install mariadb-server</pre>

<p>
	<span> </span><span> </span><span> </span><span> </span> Once MariaDB is installed, start it:
</p>

<pre class="ipsCode">
systemctl start mariadb</pre>

<p>
	I do advise you to add mariadb service at startup to execute it automatically:
</p>

<pre class="ipsCode">
systemctl enable mariadb</pre>

<p>
	Let's secure your mariadb installation, execute the following command:
</p>

<pre class="ipsCode">
mysql_secure_installation</pre>

<p>
	I advise you to setup the following parameters:
</p>

<pre class="ipsCode">
Setup a Root password
Remove anonymous access
Disable remote access for the root user
Remove the test database
Reload the privileges</pre>

<p>
	Verify that you database configuration is working properly, you will need to provide the root password you have just defined:
</p>

<pre class="ipsCode">
mysqladmin -u root -p version</pre>

<p>
	If everything is ok, you should have an output like the follow one:
</p>

<pre class="ipsCode">
Server version		5.5.52-MariaDB
Protocol version	10
Connection 			Localhost via UNIX socket
UNIX socket			/var/lib/mysql/mysql.sock
Uptime				x sec</pre>

<p>
	 
</p>

<p>
	Now that the setup of the database is done, we need to add the prerequisites for the <abbr title="Massive Network Game Object Server">mangos</abbr> database configuration. We need to start by creating an user for <abbr title="Massive Network Game Object Server">mangos</abbr>, login to the database using:
</p>

<pre class="ipsCode">
mysql -u root -p</pre>

<p>
	Create the user you wish, the example given is creating an user '<abbr title="Massive Network Game Object Server">mangos</abbr>' who can connect from the 'localhost' and has the password 'password' (do not forget the ';') at the end:
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted">
<span class="pln">CREATE USER </span><span class="str">'<abbr title="Massive Network Game Object Server">mangos</abbr>'</span><span class="pun">@</span><span class="str">'localhost'</span><span class="pln"> IDENTIFIED BY </span><span class="str">'password'</span><span class="pun">;</span></pre>

<p>
	We then need to grant privileges to that user that we can use it later to setup the <abbr title="Massive Network Game Object Server">Mangos</abbr> schemas (again, do not forget the ';' symbol):
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted">
<span class="pln">GRANT ALL PRIVILEGES ON </span><span class="pun">*.*</span><span class="pln"> TO </span><span class="str">'<abbr title="Massive Network Game Object Server">mangos</abbr>'</span><span class="pun">@</span><span class="str">'localhost'</span><span class="pun">;</span></pre>

<p>
	Exit the terminal:
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted">
<span class="pln">quit</span></pre>

<p>
	Congratulations, you have setup the pre-requisites for the database on CentOS !
</p>

<p>
	 
</p>

<p>
	<span style="font-size:18px;"><u>Install <abbr title="Massive Network Game Object Server">Mangos</abbr>:</u></span>
</p>

<p>
	We are now at the interesting part, how do we install <abbr title="Massive Network Game Object Server">Mangos</abbr> on CentOS ? Well, assuming you are logged in as 'root', go to the home directory:
</p>

<pre class="ipsCode">
cd ~</pre>

<p>
	And let's install a required dependency first, wget is a small utility that will allow you to download the installer script:
</p>

<pre class="ipsCode">
yum -y install wget</pre>

<p>
	Now, we can download our installer:
</p>

<pre class="ipsCode">
wget https://raw.githubusercontent.com/mangoszero/server/master/linux/getmangos.sh</pre>

<p>
	Set the permissions to be allowed to execute it:
</p>

<pre class="ipsCode">
chmod 700 getmangos.sh</pre>

<p>
	And execute it:
</p>

<pre class="ipsCode">
./getmangos.sh</pre>

<p>
	Before we go further, some explanations on the available activities:
</p>

<ul>
	<li>
		Install Prerequisites will install all the necessary dependencies for you to build &amp; run <abbr title="Massive Network Game Object Server">mangos</abbr>. Toggled by default.
	</li>
	<li>
		Set Download And Install Paths will allow you to specify where the sources must be downloaded and where the binaries must be installed. Toggled by default.
	</li>
	<li>
		Clone Source repositories will help you cloning the <abbr title="Massive Network Game Object Server">Mangos</abbr> sources. Toggled by default.
	</li>
	<li>
		Build <abbr title="Massive Network Game Object Server">MaNGOS</abbr> will assist you in the building process of <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. Toggled by default.
	</li>
	<li>
		Install <abbr title="Massive Network Game Object Server">MaNGOS</abbr> will help you installing <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. Toggled by default.
	</li>
	<li>
		Install Databases will assist you in the database schemas creation. Toggled by default.
	</li>
	<li>
		Extract Resources will help you to extract the DBC, maps, mmaps and vmaps from the game client. Toggled by default.
	</li>
	<li>
		Create Code::Blocks Project File will create a project for the Code::Blocks editor. Do not toggle this option if you don't plan to edit the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> sources.
	</li>
</ul>

<p>
	Now that you know everything, let the default options selected and select 'Ok' thanks to the Tab key. The script is now installing the necessary dependencies on your CentOS. You will be prompted to provide your agreement to install the build dependencies. Select 'Yes' two times.
</p>

<p>
	<span style="font-size:16px;"><u>User selection:</u></span>
</p>

<p>
	<abbr title="Massive Network Game Object Server">Mangos</abbr> provides you the opportunity to run it under another user than the 'root' one. This is a good practice to isolate softwares and limit the security impact in case of an exploited vulnerability. The default proposed run user is '<abbr title="Massive Network Game Object Server">mangos</abbr>' but you can change if you wish. Select 'Ok' to continue.
</p>

<p>
	If you have already performed this step, the installer will ask you whether you want to keep that user. I advise you to reply 'Yes' except if you know what you are doing.
</p>

<p>
	<span style="font-size:16px;"><u>Choose WoW Release:</u></span>
</p>

<p>
	The next screen is requesting you to choose the WoW release you are willing to install. Select the one you that fits your wish and select 'Ok'.
</p>

<p>
	<span style="font-size:16px;"><u>Source-Code Path:</u></span>
</p>

<p>
	The next screen is asking you to provide the source path. By default, the proposed format is /home/&lt;run user&gt;/&lt;wow version&gt;/src. For instance, for a run user '<abbr title="Massive Network Game Object Server">mangos</abbr>' and a wow version 'Vanilla', the proposed path will be:
</p>

<pre class="ipsCode">
/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/src</pre>

<p>
	Reply 'Yes' to create the directory if it does not exist. If it does exist and contains sources, the installer will ask you whether you want to delete the content or not.
</p>

<p>
	<span style="font-size:16px;"><u>Installation Path:</u></span>
</p>

<p>
	The next screen is asking you to provide the installation path. This is the location from where you will execute the <abbr title="Massive Network Game Object Server">Mangos</abbr> processes. By default, the proposed format is /home/&lt;run user&gt;/&lt;wow version&gt;. For instance, for a run user '<abbr title="Massive Network Game Object Server">mangos</abbr>' and a wow version 'Vanilla', the proposed path will be:
</p>

<pre class="ipsCode">
/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero</pre>

<p>
	If it does exist and contains compiled sources, the installer will ask you whether you want to delete the content or not.
</p>

<p>
	<span style="font-size:16px;"><u>Clone or update <abbr title="Massive Network Game Object Server">MaNGOS</abbr>:</u></span>
</p>

<p>
	The next step of the script is asking you whether you want to clone, update or use an existing copy of the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> sources. For a fresh installation, select the option '0 Clone a fresh copy of <abbr title="Massive Network Game Object Server">MaNGOS</abbr>'. The installer will now connect to Github and check the available development branch, currently, the last stable release is the Rel21 and is hosted in the 'master' branch.
</p>

<p>
	The installer is now cloning the server and database repositories.
</p>

<p>
	<span style="font-size:16px;"><u>Build Options:</u></span>
</p>

<p>
	You are now at the build step. Some explanations over this screen:
</p>

<ul>
	<li>
		Enable Debug will setup debug flags and more tracing on <abbr title="Massive Network Game Object Server">Mangos</abbr>. <strong>Use this build option only if you're requested to to fix a bug. Building a software in debug mode significantly reduces its performances.</strong>
	</li>
	<li>
		Use Standard Malloc, toggle this option to use the standard memory allocation. <strong>Untoggle this option only if you know what you are doing.</strong>
	</li>
	<li>
		Use External ACE libraries. Allows you to use the ACE libraries coming from your system. There are very few cases when this option works, and also it will be removed in the future, so <strong>leave it untoggled</strong> (<abbr title="Massive Network Game Object Server">MaNGOS</abbr> has an "internal" ACE anyway).
	</li>
	<li>
		Use PostgreSQL insteald of MySQL/MariaDB. Allows you to use another database provider than the default one. This option has not been tested and, if you have followed the tutorial so far, you should have setup MariaDB <span class="ipsEmoji">😉</span>
	</li>
	<li>
		Build Client Tools will build the extractors necessary to get dbc, maps, mmaps and vmaps out of the game client. Unselect this option only if you already have these resources extracted.
	</li>
	<li>
		Use SD3 will allow you to build the ScriptDev3 Engine provided with <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. We advise you to keep this option toggled except if you don't like living world based on C++ scripts.
	</li>
	<li>
		Use Eluna will allow you to build the Eluna Engine provided with <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. We advise you to keep this option toggled except if you don't like living world based on LUA scripts.
	</li>
</ul>

<p>
	Select 'Ok' to proceed with the build process and confirm that would want to build <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. The installer is now building <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. Depending on the speed of your system, you have the time to drink a glass of water or a cup of coffee. <span class="ipsEmoji">🙂</span>
</p>

<p>
	<span style="font-size:16px;"><u>Installation:</u></span>
</p>

<p>
	You will now be prompted to install <abbr title="Massive Network Game Object Server">Mangos</abbr>. Select 'Yes' to install it.
</p>

<p>
	<span style="font-size:16px;"><u>Database Operations:</u></span>
</p>

<p>
	Wait.. another database setup ?! Yes, but this time, we are populating the database with the <abbr title="Massive Network Game Object Server">mangos</abbr> data. You have three options here:
</p>

<ul>
	<li>
		Install clean databases to setup a fresh database
	</li>
	<li>
		Update existing databases to update your old version of the database
	</li>
	<li>
		Skip database work... but it wouldn't make sense <span class="ipsEmoji">🙂</span>
	</li>
</ul>

<p>
	Select the first option if you are performing a fresh installation. You will be prompted to select your type of database. If you followed the guide so far, you should select "MariaDB". The installer will then request your database information, if you followed the guide, you need to provide the following input:
</p>

<pre class="ipsCode">
Hostname: localhost
Port: 3306
User: <abbr title="Massive Network Game Object Server">mangos</abbr>
Password: password
</pre>

<p>
	You can now choose into several options:
</p>

<ul>
	<li>
		ReInstall the realm database, containing all the realms information and the accounts
	</li>
	<li>
		ReInstall the world database, containing all the world configuration
	</li>
	<li>
		ReInstall the characters database, containing all the characters information
	</li>
	<li>
		Update the realmlist to setup an initial game server
	</li>
</ul>

<p>
	By default, all options must be toggled. The installer will now perform the database import.
</p>

<p>
	<span style="font-size:16px;"><u>Extract Game Data:</u></span>
</p>

<p>
	This step will copy the extractors to the wow game location, extract dbc, maps, mmaps and vmaps and copy these extracted data to your installation directory. The installer will automatically look for a suitable WoW client into your /home directory. If it doesn't find anything, you will have to provide your game location path. If the provided path doesn't contain any game data, the installer will exit.
</p>

<p>
	The extractor steps allows you to select the artifacts you want to extract:
</p>

<ul>
	<li>
		DBC and Maps, which are the minimum set of data you need to extract
	</li>
	<li>
		Mmaps which are the movement maps, based on vectoriel calculation, required for an efficient pathfinding
	</li>
	<li>
		Vmaps which are the virtual maps, used for collision detection and LoS detection
	</li>
</ul>

<p>
	The Mmaps extraction is taking several hours, you will have the time to sleep or drink several coffees. <span class="ipsEmoji">🙂</span>
</p>

<p>
	<span style="font-size:16px;"><u>Congratulations !</u></span>
</p>

<p>
	You almost did it ! Still few steps to perform before you can play on your preferred game. First of all, you need to switch to your run user. If you used <abbr title="Massive Network Game Object Server">mangos</abbr>, the command will look like:
</p>

<pre class="ipsCode">
su - <abbr title="Massive Network Game Object Server">mangos</abbr></pre>

<p>
	You need then to go to the configuration directory of your installation, if you installed Vanilla, it will look like the following command:
</p>

<pre class="ipsCode">
cd /home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/etc</pre>

<p>
	Copy the realmd.conf.dist and mangosd.conf.dist files to their expected name:
</p>

<pre class="ipsCode">
cp realmd.conf.dist realmd.conf
cp mangosd.conf.dist mangosd.conf</pre>

<p>
	Edit the realmd.conf and find the line LoginDatabaseInfo. Provide your database information, according to this guide and if you have installed Vanilla, it should look like:
</p>

<pre class="ipsCode">
LoginDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_realm"</pre>

<p>
	Save your file and edit the file mangosd.conf. You need to provide the database information for the three database we have configured with our installer:
</p>

<pre class="ipsCode">
LoginDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_realm"
WorldDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_world"
CharacterDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_characters"
</pre>

<p>
	Save your file and go back to the 'root' user:
</p>

<pre class="ipsCode">
exit</pre>

<p>
	<span style="font-size:16px;"><u>Make sure it keeps running !</u></span>
</p>

<p>
	What could be cooler than having the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> server starting automatically with your server ? Not much... so let's configure systemd to do so ! First of all, we need to tell it that we have two new services. Declare them by creating the corresponding files:
</p>

<pre class="ipsCode">
touch /etc/systemd/system/realmd.service
touch /etc/systemd/system/mangosd.service # Or give it a better name like zero.service if it's a vanilla gaming server for instance.</pre>

<p>
	Now, edit the /etc/systemd/system/realmd.service file and add the following content (Replace the installation path and the run user by the settings you have provided during the installation):
</p>

<pre class="ipsCode">
[Unit]
Description=Realmd service
After=network.target mariadb.service

[Service]
Type=simple
User=<abbr title="Massive Network Game Object Server">mangos</abbr>
ExecStart=/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/bin/realmd -c /home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/etc/realmd.conf
Restart=on-abort

[Install]
WantedBy=multi-user.target</pre>

<p>
	Save this file and edit the /etc/systemd/system/mangosd.service file (or the better name you gave to it) with the following content (same remark than above the installation path and the run user):
</p>

<pre class="ipsCode">
[Unit]
Description=WoW Vanilla service
After=network.target mariadb.service getty@tty3.service

[Service]
Type=simple
User=<abbr title="Massive Network Game Object Server">mangos</abbr>
ExecStart=/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/bin/mangosd -c /home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/etc/mangosd.conf
WorkingDirectory=/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/bin
StandardInput=tty
TTYPath=/dev/tty3
TTYReset=yes
TTYVHangup=yes
Restart=on-abort

[Install]
WantedBy=multi-user.target</pre>

<p>
	<strong><abbr title="Massive Network Game Object Server">Mangos</abbr>-Daemon as a Systemd service using screen (Added by <a contenteditable="false" data-ipshover="" data-ipshover-target="https://www.getmangos.eu/profile/4-madmax/?do=hovercard" data-mentionid="4" href="https://www.getmangos.eu/profile/4-madmax/" rel="">@madmax</a> May 2018) - If not using the above Mangosd.</strong>
</p>

<pre class="ipsCode">
[Unit]
Description=MaNGOS world server daemon
After=mariadb.service

[Service]
Type=oneshot
ExecStart=/usr/bin/screen -mdS mangosd /home/mangos/zero/bin/mangosd -c /home/mangos/zero/etc/mangosd.conf
PIDFile=/home/mangos/zero/var/cosmic.pid
RemainAfterExit=true

# Give a reasonable amount of time for the server to start up/shut down
#TimeoutSec=60

[Install]
WantedBy=multi-user.target
</pre>

<div data-role="contentPage">
	<p>
		 
	</p>

	</div>
<div data-role="contentPage">
<hr data-role="contentPageBreak">
</div>

<p>
	We are almost there ! You now need to tell systemd to reload its configuration:
</p>

<pre class="ipsCode">
systemctl daemon-reload</pre>

<p>
	And let's start our processes to verify that they work:
</p>

<pre class="ipsCode">
systemctl start realmd
systemctl start mangosd</pre>

<p>
	To verify that it worked, execute the following command:
</p>

<pre class="ipsCode">
systemctl status realmd
systemctl status mangosd</pre>

<p>
	If it's working properly, you should have an output indicating you the success status for both service. The last step is to tell systemd to execute them at startup, for this, execute the following commands:
</p>

<pre class="ipsCode">
systemctl enable realmd
systemctl enable mangosd</pre>

<p>
	Congratulations ! You are now done with the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> setup on CentOS 7 <span class="ipsEmoji">🙂</span> You can now reboot your computer to verify that everything is indeed started:
</p>

<pre class="ipsCode">
reboot</pre>

<p>
	 
</p>
</div></div>]]></description><guid isPermaLink="false">20075</guid><pubDate>Wed, 15 Mar 2017 19:18:02 +0000</pubDate></item><item><title>Installing Mangos on Debian 8.7</title><link>https://www.getmangos.eu/wiki/documentation/installation-guides/guideslinux/installing-mangos-on-debian-87-r20079/</link><description><![CDATA[<p>
	Hello, in this tutorial, I will explain a step-by-step approach to configure, install and run <abbr title="Massive Network Game Object Server">Mangos</abbr> on a Debian 8 system. <strong>To fully execute the installation, you need an original copy of the game client version you want to run.</strong>
</p>

<p>
	This guide has been fully tested on an empty Debian 8 system with minimal installation.
</p>

<p>
	Let's go..
</p>

<p>
	<u><span>Setup the database:</span></u>
</p>

<p>
	Debian is supporting MySQL by default. This part of the guide will help you to setup your instance of MySQL.
</p>

<p>
	Launch a terminal, and if it's not already the case, you need to become the 'root' user:
</p>

<pre class="ipsCode">
sudo su - root</pre>

<p>
	Then, install MySQL, enter your root password when you will be prompted for:
</p>

<pre class="ipsCode">
aptitude -y install mysql-server</pre>

<p>
	<span> </span><span> </span><span> </span><span> </span> Once MySQLis installed, start it:
</p>

<pre class="ipsCode">
systemctl start mysql</pre>

<p>
	I do advise you to add MySQL service at startup to execute it automatically:
</p>

<pre class="ipsCode">
systemctl enable mysql</pre>

<p>
	Let's secure your MySQL installation, execute the following command:
</p>

<pre class="ipsCode">
mysql_secure_installation</pre>

<p>
	I advise you to setup the following parameters:
</p>

<pre class="ipsCode">
Do not change the root password
Remove anonymous access
Disable remote access for the root user
Remove the test database
Reload the privileges</pre>

<p>
	Now that the setup of the database is done, we need to add the prerequisites for the <abbr title="Massive Network Game Object Server">mangos</abbr> database configuration. We need to start by creating an user for <abbr title="Massive Network Game Object Server">mangos</abbr>, login to the database using:
</p>

<pre class="ipsCode">
mysql -u root -p</pre>

<p>
	Create the user you wish, the example given is creating an user '<abbr title="Massive Network Game Object Server">mangos</abbr>' who can connect from the 'localhost' and has the password 'password' (do not forget the ';') at the end:
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted">
<span class="pln">CREATE USER </span><span class="str">'<abbr title="Massive Network Game Object Server">mangos</abbr>'</span><span class="pun">@</span><span class="str">'localhost'</span><span class="pln"> IDENTIFIED BY </span><span class="str">'password'</span><span class="pun">;</span></pre>

<p>
	We then need to grant privileges to that user that we can use it later to setup the <abbr title="Massive Network Game Object Server">Mangos</abbr> schemas (again, do not forget the ';' symbol):
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted">
<span class="pln">GRANT ALL PRIVILEGES ON </span><span class="pun">*.*</span><span class="pln"> TO </span><span class="str">'<abbr title="Massive Network Game Object Server">mangos</abbr>'</span><span class="pun">@</span><span class="str">'localhost'</span><span class="pun">;</span></pre>

<p>
	Exit the terminal:
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted">
<span class="pln">quit</span></pre>

<p>
	Congratulations, you have setup the pre-requisites for the database on Debian !
</p>

<p>
	 
</p>

<p>
	<span><u>Install <abbr title="Massive Network Game Object Server">Mangos</abbr>:</u></span>
</p>

<p>
	We are now at the interesting part, how do we install <abbr title="Massive Network Game Object Server">Mangos</abbr> on Debian ? Well, assuming you are logged in as 'root', go to the home directory:
</p>

<pre class="ipsCode">
cd ~</pre>

<p>
	Now, we can download our installer:
</p>

<pre class="ipsCode">
wget https://raw.githubusercontent.com/mangoszero/server/master/linux/getmangos.sh</pre>

<p>
	Set the permissions to be allowed to execute it:
</p>

<pre class="ipsCode">
chmod 700 getmangos.sh</pre>

<p>
	And execute it:
</p>

<pre class="ipsCode">
./getmangos.sh</pre>

<p>
	Before we go further, some explanations on the available activities:
</p>

<ul><li>
		Install Prerequisites will install all the necessary dependencies for you to build &amp; run <abbr title="Massive Network Game Object Server">mangos</abbr>. Toggled by default.
	</li>
	<li>
		Set Download And Install Paths will allow you to specify where the sources must be downloaded and where the binaries must be installed. Toggled by default.
	</li>
	<li>
		Clone Source repositories will help you cloning the <abbr title="Massive Network Game Object Server">Mangos</abbr> sources. Toggled by default.
	</li>
	<li>
		Build <abbr title="Massive Network Game Object Server">MaNGOS</abbr> will assist you in the building process of <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. Toggled by default.
	</li>
	<li>
		Install <abbr title="Massive Network Game Object Server">MaNGOS</abbr> will help you installing <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. Toggled by default.
	</li>
	<li>
		Install Databases will assist you in the database schemas creation. Toggled by default.
	</li>
	<li>
		Extract Resources will help you to extract the DBC, maps, mmaps and vmaps from the game client. Toggled by default.
	</li>
	<li>
		Create Code::Blocks Project File will create a project for the Code::Blocks editor. Do not toggle this option if you don't plan to edit the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> sources.
	</li>
</ul><p>
	Now that you know everything, let the default options selected and select 'Ok' thanks to the Tab key. The script is now installing the necessary dependencies on your Debian. You will be prompted to provide your agreement to install the build dependencies. Select 'Yes' two times.
</p>

<p>
	<span><u>User selection:</u></span>
</p>

<p>
	<abbr title="Massive Network Game Object Server">Mangos</abbr> provides you the opportunity to run it under another user than the 'root' one. This is a good practice to isolate softwares and limit the security impact in case of an exploited vulnerability. The default proposed run user is '<abbr title="Massive Network Game Object Server">mangos</abbr>' but you can change if you wish. Select 'Ok' to continue.
</p>

<p>
	If you have already performed this step, the installer will ask you whether you want to keep that user. I advise you to reply 'Yes' except if you know what you are doing.
</p>

<p>
	<span><u>Choose WoW Release:</u></span>
</p>

<p>
	The next screen is requesting you to choose the WoW release you are willing to install. Select the one you that fits your wish and select 'Ok'.
</p>

<p>
	<span><u>Source-Code Path:</u></span>
</p>

<p>
	The next screen is asking you to provide the source path. By default, the proposed format is /home/&lt;run user&gt;/&lt;wow version&gt;/src. For instance, for a run user '<abbr title="Massive Network Game Object Server">mangos</abbr>' and a wow version 'Vanilla', the proposed path will be:
</p>

<pre class="ipsCode">
/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/src</pre>

<p>
	Reply 'Yes' to create the directory if it does not exist. If it does exist and contains sources, the installer will ask you whether you want to delete the content or not.
</p>

<p>
	<span><u>Installation Path:</u></span>
</p>

<p>
	The next screen is asking you to provide the installation path. This is the location from where you will execute the <abbr title="Massive Network Game Object Server">Mangos</abbr> processes. By default, the proposed format is /home/&lt;run user&gt;/&lt;wow version&gt;. For instance, for a run user '<abbr title="Massive Network Game Object Server">mangos</abbr>' and a wow version 'Vanilla', the proposed path will be:
</p>

<pre class="ipsCode">
/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero</pre>

<p>
	If it does exist and contains compiled sources, the installer will ask you whether you want to delete the content or not.
</p>

<p>
	<span><u>Clone or update <abbr title="Massive Network Game Object Server">MaNGOS</abbr>:</u></span>
</p>

<p>
	The next step of the script is asking you whether you want to clone, update or use an existing copy of the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> sources. For a fresh installation, select the option '0 Clone a fresh copy of <abbr title="Massive Network Game Object Server">MaNGOS</abbr>'. The installer will now connect to Github and check the available development branch, currently, the last stable release is the Rel21 and is hosted in the 'master' branch.
</p>

<p>
	The installer is now cloning the server and database repositories.
</p>

<p>
	<span><u>Build Options:</u></span>
</p>

<p>
	You are now at the build step. Some explanations over this screen:
</p>

<ul><li>
		Enable Debug will setup debug flags and more tracing on <abbr title="Massive Network Game Object Server">Mangos</abbr>. <strong>Use this build option only if you're requested to to fix a bug. Building a software in debug mode significantly reduces its performances.</strong>
	</li>
	<li>
		Use Standard Malloc, toggle this option to use the standard memory allocation. <strong>Untoggle this option only if you know what you are doing.</strong>
	</li>
	<li>
		Use External ACE libraries. Allows you to use the ACE libraries coming from your system. <strong>Untoggle this option only if you know what you are doing.</strong>
	</li>
	<li>
		Use PostgreSQL insteald of MySQL/MariaDB. Allows you to use another database provider than the default one. This option has not been tested and, if you have followed the tutorial so far, you should have setup MySQL ;-)
	</li>
	<li>
		Build Client Tools will build the extractors necessary to get dbc, maps, mmaps and vmaps out of the game client. Unselect this option only if you already have these resources extracted.
	</li>
	<li>
		Use SD3 will allow you to build the ScriptDev3 Engine provided with <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. We advise you to keep this option toggled except if you don't like living world based on C++ scripts.
	</li>
	<li>
		Use Eluna will allow you to build the Eluna Engine provided with <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. We advise you to keep this option toggled except if you don't like living world based on LUA scripts.
	</li>
</ul><p>
	Select 'Ok' to proceed with the build process and confirm that would want to build <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. The installer is now building <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. Depending on the speed of your system, you have the time to drink a glass of water or a cup of coffee. :-)
</p>

<p>
	<span><u>Installation:</u></span>
</p>

<p>
	You will now be prompted to install <abbr title="Massive Network Game Object Server">Mangos</abbr>. Select 'Yes' to install it.
</p>

<p>
	<span><u>Database Operations:</u></span>
</p>

<p>
	Wait.. another database setup ?! Yes, but this time, we are populating the database with the <abbr title="Massive Network Game Object Server">mangos</abbr> data. You have three options here:
</p>

<ul><li>
		Install clean databases to setup a fresh database
	</li>
	<li>
		Update existing databases to update your old version of the database
	</li>
	<li>
		Skip database work... but it wouldn't make sense :-)
	</li>
</ul><p>
	Select the first option if you are performing a fresh installation. You will be prompted to select your type of database. If you followed the guide so far, you should select "MariaDB" because Debian is providing an old version of MySQL. The installer will then request your database information, if you followed the guide, you need to provide the following input:
</p>

<pre class="ipsCode">
Hostname: localhost
Port: 3306
User: <abbr title="Massive Network Game Object Server">mangos</abbr>
Password: password
</pre>

<p>
	You can now choose into several options:
</p>

<ul><li>
		ReInstall the realm database, containing all the realms information and the accounts
	</li>
	<li>
		ReInstall the world database, containing all the world configuration
	</li>
	<li>
		ReInstall the characters database, containing all the characters information
	</li>
	<li>
		Update the realmlist to setup an initial game server
	</li>
</ul><p>
	By default, all options must be toggled. The installer will now perform the database import.
</p>

<p>
	<span><u>Extract Game Data:</u></span>
</p>

<p>
	This step will copy the extractors to the wow game location, extract dbc, maps, mmaps and vmaps and copy these extracted data to your installation directory. The installer will automatically look for a suitable WoW client into your /home directory. If it doesn't find anything, you will have to provide your game location path. If the provided path doesn't contain any game data, the installer will exit.
</p>

<p>
	The extractor steps allows you to select the artifacts you want to extract:
</p>

<ul><li>
		DBC and Maps, which are the minimum set of data you need to extract
	</li>
	<li>
		Mmaps which are the movement maps, based on vectoriel calculation, required for an efficient pathfinding
	</li>
	<li>
		Vmaps which are the virtual maps, used for collision detection and LoS detection
	</li>
</ul><p>
	The Mmaps extraction is taking several hours, you will have the time to sleep or drink several coffees. :-)
</p>

<p>
	<span><u>Congratulations !</u></span>
</p>

<p>
	You almost did it ! Still few steps to perform before you can play on your preferred game. First of all, you need to switch to your run user. If you used <abbr title="Massive Network Game Object Server">mangos</abbr>, the command will look like:
</p>

<pre class="ipsCode">
su - <abbr title="Massive Network Game Object Server">mangos</abbr></pre>

<p>
	You need then to go to the configuration directory of your installation, if you installed Vanilla, it will look like the following command:
</p>

<pre class="ipsCode">
cd /home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/etc</pre>

<p>
	Copy the realmd.conf.dist and mangosd.conf.dist files to their expected name:
</p>

<pre class="ipsCode">
cp realmd.conf.dist realmd.conf
cp mangosd.conf.dist mangosd.conf</pre>

<p>
	Edit the realmd.conf and find the line LoginDatabaseInfo. Provide your database information, according to this guide and if you have installed Vanilla, it should look like:
</p>

<pre class="ipsCode">
LoginDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_realm"</pre>

<p>
	Save your file and edit the file mangosd.conf. You need to provide the database information for the three database we have configured with our installer:
</p>

<pre class="ipsCode">
LoginDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_realm"
WorldDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_world"
CharacterDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_characters"
</pre>

<p>
	Save your file and go back to the 'root' user:
</p>

<pre class="ipsCode">
exit</pre>

<p>
	<span><u>Make sure it keeps running !</u></span>
</p>

<p>
	What could be cooler than having the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> server starting automatically with your server ? Not much... so let's configure systemd to do so ! First of all, we need to tell it that we have two new services. Declare them by creating the corresponding files:
</p>

<pre class="ipsCode">
touch /etc/systemd/system/realmd.service
touch /etc/systemd/system/mangosd.service # Or give it a better name like zero.service if it's a vanilla gaming server for instance.</pre>

<p>
	Now, edit the /etc/systemd/system/realmd.service file and add the following content (Replace the installation path and the run user by the settings you have provided during the installation):
</p>

<pre class="ipsCode">
[Unit]
Description=Realmd service
After=network.target mysql.service

[Service]
Type=simple
User=<abbr title="Massive Network Game Object Server">mangos</abbr>
ExecStart=/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/bin/realmd -c /home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/etc/realmd.conf
Restart=on-abort

[Install]
WantedBy=multi-user.target</pre>

<p>
	Save this file and edit the /etc/systemd/system/mangosd.service file (or the better name you gave to it) with the following content (same remark than above the installation path and the run user):
</p>

<pre class="ipsCode">
[Unit]
Description=WoW Vanilla service
After=network.target mysql.service getty@tty3.service

[Service]
Type=simple
User=<abbr title="Massive Network Game Object Server">mangos</abbr>
ExecStart=/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/bin/mangosd -c /home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/etc/mangosd.conf
WorkingDirectory=/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/bin
StandardInput=tty
TTYPath=/dev/tty3
TTYReset=yes
TTYVHangup=yes
Restart=on-abort

[Install]
WantedBy=multi-user.target</pre>

<p>
	We are almost there ! You now need to tell systemd to reload its configuration:
</p>

<pre class="ipsCode">
systemctl daemon-reload</pre>

<p>
	And let's start our processes to verify that they work:
</p>

<pre class="ipsCode">
systemctl start realmd
systemctl start mangosd</pre>

<p>
	To verify that it worked, execute the following command:
</p>

<pre class="ipsCode">
systemctl status realmd
systemctl status mangosd</pre>

<p>
	If it's working properly, you should have an output indicating you the success status for both service. The last step is to tell systemd to execute them at startup, for this, execute the following commands:
</p>

<pre class="ipsCode">
systemctl enable realmd
systemctl enable mangosd</pre>

<p>
	Congratulations ! You are now done with the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> setup on Debian 8 :-) You can now reboot your computer to verify that everything is indeed started:
</p>

<pre class="ipsCode">
reboot</pre>
]]></description><guid isPermaLink="false">20079</guid><pubDate>Fri, 17 Mar 2017 14:26:23 +0000</pubDate></item><item><title>Installing Mangos on Debian 9 or a Debian based Distribtion</title><link>https://www.getmangos.eu/wiki/documentation/installation-guides/guideslinux/installing-mangos-on-debian-9-or-a-debian-based-distribtion-r20099/</link><description><![CDATA[<p>
	I tested this on Debian 9.6 however this guide should work on any recent Debian distribution such as Ubuntu.
</p>

<p>
	<u>Required Packages</u>
</p>

<p>
	First we need to install all of the required programs and library's.
</p>

<p>
	Open up a root terminal. If your not root, enter this to become root
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">sudo su</span></pre>

<p>
	Install the following packages
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">apt install git make cmake libssl-dev libbz2-dev build-essential default-libmysqlclient-dev</span></pre>

<p>
	We need to grab the mysql stuff from <a href="https://dev.mysql.com/downloads/repo/apt/" rel="external nofollow">here</a>. Follow the instructions there. Also, choose mysql 5.7. A script needed later requires this so don't install mysql 8. Install the server with
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">apt install mysql-server</span></pre>

<p>
	You also need to grab and compile libace. You can get it from <span><a href="http://download.dre.vanderbilt.edu" rel="external nofollow">here</a>. Extract it and read the instructions.They're pretty straight-forward. It should be named 'ACE-INSTALL.html' or something similar.</span>
</p>

<p>
	When thats done, enter this command. I highly recommend doing this even if your just keeping the server to yourself
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">mysql_secure_installation</span></pre>

<p>
	 I suggest these options:
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">Don't use the password plugin
Change the root password
Remove the anonymous user
Disable remote access for root
Remove the test database
Reload privileges</span></pre>

<p>
	Restart your system with
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">init 6</span></pre>

<p>
	<br>
	<abbr title="Massive Network Game Object Server"><u>Getting the Mangos source code</u></abbr>
</p>

<p>
	Now we need the source code for <abbr title="Massive Network Game Object Server">mangos</abbr>. Open up a terminal as root and go to the home directory:
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">cd ~</span></pre>

<p>
	Lets create a root directory for all of the <abbr title="Massive Network Game Object Server">mangos</abbr> files
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">mkdir mangos</span></pre>

<p>
	Now we clone the source code. <abbr title="Massive Network Game Object Server">Mangos</abbr> servers above two are unstable or incomplete. Don't be surprised if something doesn't work or is missing.
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">git clone https://github.com/mangoszero/server.git --recursive --depth 1</span></pre>

<p>
	For the database
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">git clone https://github.com/mangoszero/database.git --recursive --depth 1</span></pre>

<p>
	If you want a different server(say <abbr title="Massive Network Game Object Server">mangos</abbr> one), simply change the url. For example
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">git clone https://github.com/mangosone/server.git --recursive --depth 1</span></pre>

<p>
	For the <abbr title="Massive Network Game Object Server">mangos</abbr> one server. If you want <abbr title="Massive Network Game Object Server">mangos</abbr> two, simply do the same. Do the same with the database.
</p>

<p>
	Wait for the repos to be cloned (the server is about 200-250mb-ish)
</p>

<p>
	<u>Compilaton</u>
</p>

<p>
	The good part. Enter the <abbr title="Massive Network Game Object Server">mangos</abbr> source directory
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">cd server</span></pre>

<p>
	Make a new directory for the build files.
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">mkdir build</span></pre>

<p>
	Go into it
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">cd build</span></pre>

<p>
	Now run this to configure the makefiles
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/bin/mangos</span></pre>

<p>
	If cmake doesn't complain about anything, your good to go with compiling it.  To speed up compilation, you need to know how many cores your cpu has. Most cpus have 2 or 4 cores. Search it up if your not sure. Now to compile it, simply enter this
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">make -j2</span></pre>

<p>
	Change -j2 to how cores you have. If you have 4 cores, change it to
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">make -j4</span></pre>

<p>
	If you only have one core, don't bother with the -j flag, just type in 'make' and hit enter.
</p>

<p>
	This will take a while depending on how fast your cpu is. Just be paitent.
</p>

<p>
	After a bit, <abbr title="Massive Network Game Object Server">mangos</abbr> will be compiled(yay)and you will need to separate the needed files from the source code. To install it into your install prefix(default is /usr/local/bin/<abbr title="Massive Network Game Object Server">mangos</abbr>), do this
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">make install</span></pre>

<p>
	<u>Database Setup: The Sequel </u><br>
	Now for another database setup (i know, its crazy). This time, we will be loading some stuff into it. Enter the database folder you cloned earlier and execute InstallDatabases.sh
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">./InstallDatabases.sh</span></pre>

<p>
	If it says something similar to 'bash: ./InstallDatabases.sh: Permission denied', the script isn't marked as executable. Mark everything needed as executable by running this
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">chmod -R +x *.sh</span></pre>

<p>
	Now have a go at running the script again. When execute it, you'll be brought to a menu. The defaults are fine for a new server so just press 'n' and hit enter
</p>

<p>
	You will have to give it your mysql details. This needs to be your server hostname(ip address), username, password and server port. The only things you need to change are the username and password. Keep in mind all of this must be done as the ROOT user.
</p>

<p>
	<u>Game Data</u>
</p>

<p>
	Now this is the longest part if decide to get mmaps. To run the server, you MUST extract the .dbc and .map files. To do this, copy everything in the tools folder to where your wow client is. Keep in mind the version of the client as it must be a specific version for this(mangoszero is a bit more lenient then others). You need 1.12.x (x can be any number) for mangoszero, 2.3.4 for mangosone, 3.3.5 for mangostwo(favourite), 4.3.4 for mangosthree and 5.4.1 for mangosfour. To extract the dbc and map files, execute this when in your wow client folder
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">./mapextractor</span></pre>

<p>
	This can take around 5 minutes to complete. Once thats done, copy over the folders "dbc" and "maps" to where you installed <abbr title="Massive Network Game Object Server">mangos</abbr>. I recommend getting all of the data though so to get the vmaps, make sure the maps folder is still in your wow folder and exectute this
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">./vmaps4extractor</span></pre>

<p>
	Once thats done, type this in your terminal
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">./vmaps4assembler</span></pre>

<p>
	Just copy over the "vmaps" folder to where <abbr title="Massive Network Game Object Server">mangos</abbr> is. Now for movemaps. This can take anywhere from an hour to a whole day depending on your computer and what client data you're extracting. Make sure the vmaps and maps folders are still in your wow folder and type this out
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">./MoveMapGen.sh 2</span></pre>

<p>
	Now, you might want to know how many cores your computer has. Most computers have 2 so if you don't know, just leave the command as is. If you got 4 or 8 cores, replace the 2 with a 4 or a 8. More threads the better but your computer will be a lot slower if you use all of your cpu. Press enter and prepare to wait a while. Once its finished extracting, copy over the folder "mmaps" to where <abbr title="Massive Network Game Object Server">mangos</abbr> is. You can delete the maps, dbc, vmaps, buildings and mmaps from your client folder now if you want.
</p>

<p>
	Server Configuration
</p>

<p>
	Now to configure the server. Go to the <abbr title="Massive Network Game Object Server">mangos</abbr> configuration folder
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">cd /usr/local/bin/mangos/etc</span></pre>

<p>
	Copy the files to their proper name. DON'T delete them. They're a backup in case your .conf files get corrupted or you mess up some settings
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">cp mangosd.conf.dist mangosd.conf</span></pre>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">cp realmd.conf.dist realmd.conf</span></pre>

<p>
	Edit realmd.conf and find the line 'LoginDatabaseInfo', change the information to suit your database. For example if my database hostname is localhost or 127.0.0.1, the port is 3306, username is root, the password is <abbr title="Massive Network Game Object Server">mangos</abbr> and my realm database is realmd, it would look like this
</p>

<p>
	LoginDatabaseInfo = "127.0.0.1;3306;root;<abbr title="Massive Network Game Object Server">mangos</abbr>;realmd"
</p>

<p>
	Save the file and edit mangosd.conf. Look for lines, LoginDatabaseInfo, WorldDatabaseInfo and CharacterDatabaseInfo. Do the same to those lines as you did to the one in realmd.conf. You may wish to fully read mangosd.conf to fine-tune your server if you wish.
</p>

<p>
	Save the file.
</p>

<p>
	<u>Starting the Server</u>
</p>

<p>
	Now to see if your hard work has paid off. Go to where you installed the server and start realmd
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">./realmd</span></pre>

<p>
	Now start mangosd
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">./mangosd</span></pre>

<p>
	If theres a error mangosd or realmd can't fix, it'll tell you problem then exit. It will be up to fix it however. The most common problem is that the password or username is wrong or that the database isn't running. Try editing mangosd.conf or realmd.conf if thats the case and making sure the db is running
</p>

<p>
	If it started and gives you a prompt, the server is loaded and awaiting a connection from a client.
</p>

<p>
	Starting the server with systemd
</p>

<p>
	This allows you to startup your computer and have mangosd and realmd load with it. Very useful on a dedicated server. We need to make 2 .service files to do this.
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">touch /etc/systemd/system/mangosd.service</span></pre>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">touch /etc/systemd/system/realmd.service</span></pre>

<p>
	Edit mangosd.service with your preferred text editor. Don't type 'edit /etc/systemd/system/mangosd.service' unless you know how to quit vi.
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">[Unit]
Description=WoW server
After=network.target mysql.service

[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/mangos/bin/mangosd -c /usr/local/bin/mangos/etc/mangosd.conf
Restart=on-abort

[Install]
WantedBy=multi-user.target</span></pre>

<p>
	Do the same with realmd.service
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">[Unit]
Description=WoW server
After=network.target mysql.service

[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/mangos/bin/realmd -c /usr/local/bin/mangos/etc/realmd.conf
Restart=on-abort

[Install]
WantedBy=multi-user.target</span></pre>

<p>
	Let systemd reload.
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">systemctl daemon-reload</span></pre>

<p>
	Start realmd via systemd to see if the .service file is valid
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">systemctl start realmd</span></pre>

<p>
	Do the same with mangosd
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">systemctl start mangosd</span></pre>

<p>
	Check the status of both services with
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">systemctl status realmd</span></pre>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">systemctl status mangosd</span></pre>

<p>
	If it's working, you should see something like a green OK on both daemons (fun fact: daemons and services are the same thing) then you should be good to enable them at startup. Do this for realmd
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">systemctl enable realmd</span></pre>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">systemctl enable mangosd</span></pre>

<p>
	Restart your system
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">init 6</span></pre>

<p>
	Check that they started as root
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">systemctl status realmd</span></pre>

<p>
	Do the same with mangosd
</p>

<p>
	If its good then mangosd and realmd will always start with your system until you disable them.
</p>

<p>
	<u>Letting WoW clients connect to your server</u><br>
	This is the 2nd last thing you need to do. This will allow WoW clients to connect to your server. We need to edit a table in the database. If you know what your doing with mysql, follow along but do the equivalent on the terminal. If you prefer doing things with a gui(graphical user interface, your using one right now!), lets install a gui mysql client. We'll use 'mysql-workbench'
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">apt install mysql-workbench</span></pre>

<p>
	After its installed, check your start menu in 'Programming'. Start mysql workbench and click on your server. Enter your password and look on the lower left. Click on the little arrow next to realmd and scroll down to realmlist. Right click on it and click on 'Alter Table'. Go down to localAddress and double click on the '127.0.0.1'. Change this to your lan ip. You can find out your lan ip by opening a terminal and typing in
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">ifconfig</span></pre>

<p>
	You will see about 4-5 interfaces. If your connection is a wired one, you should look at a interface named 'enp' followed by letters and numbers. For example, 'enp14s0'. Then look at the 'inet' part. This is your lan ip. Do the same if your connection is wireless or wi-fi. Wireless connections will be named like 'wlp' with some letters and numbers. 'wlp20s0' is a example.
</p>

<p>
	Once you have changed localAddress to your lan ip, you need to change address to your external ip. Go <a href="http://whatsmyip.org" rel="external nofollow">here</a> to find out your ip. Now we need to let realmd know that the database has changed. Stop it with
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">systemctl stop realmd</span></pre>

<p>
	Now start it again with
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">systemctl start realmd</span></pre>

<p>
	<u>Connecting a WoW client to your server</u>
</p>

<p>
	Nearly there! Go to where your wow client is and look for a file named realmlist.wtf. Delete everything in this file and put the following stuff in it
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">set realmlist 10.1.1.1
set patchlist 10.1.1.1</span></pre>

<p>
	Change 10.1.1.1 to your server ip. It can be the lan ip if its on the same network as the server. Now for the moment of truth. Open up WoW.exe(not the launcher)and wait for it to load. Skip the cinematic if want by pressing escape(esc). Now login into the server by using administrator as the email and no password.  Choose the only realm and create your character. You now have a functioning WoW server for you and your friends to play on! Also, since you logged in using the admin account, you can use game master commands. Type in the chat '.gm help' for a list of commands currently in <abbr title="Massive Network Game Object Server">mangos</abbr>. Have fun with it!
</p>
]]></description><guid isPermaLink="false">20099</guid><pubDate>Thu, 10 Jan 2019 05:22:42 +0000</pubDate></item><item><title>Installing Mangos on Fedora 25</title><link>https://www.getmangos.eu/wiki/documentation/installation-guides/guideslinux/installing-mangos-on-fedora-25-r20076/</link><description><![CDATA[<p>
	Hello, in this tutorial, I will explain a step-by-step approach to configure, install and run <abbr title="Massive Network Game Object Server">Mangos</abbr> on a Fedora 25 Linux system. <strong>To fully execute the installation, you need an original copy of the game client version you want to run.</strong>
</p>

<p>
	This guide has been fully tested on an empty Fedora 25 system with minimal installation.
</p>

<p>
	Let's go..
</p>

<p>
	<u><span>Setup the database:</span></u>
</p>

<p>
	Fedora is supporting MariaDB instead of MySQL by default. This part of the guide will help you to setup your instance of MariaDB.
</p>

<p>
	Launch a terminal, and if it's not already the case, you need to become the 'root' user:
</p>

<pre class="ipsCode">
sudo su - root</pre>

<p>
	Then, install MariaDB:
</p>

<pre class="ipsCode">
yum -y install mariadb-server</pre>

<p>
	<span> </span><span> </span><span> </span><span> </span> Once MariaDB is installed, start it:
</p>

<pre class="ipsCode">
systemctl start mariadb</pre>

<p>
	I do advise you to add mariadb service at startup to execute it automatically:
</p>

<pre class="ipsCode">
systemctl enable mariadb</pre>

<p>
	Let's secure your mariadb installation, execute the following command:
</p>

<pre class="ipsCode">
mysql_secure_installation</pre>

<p>
	I advise you to setup the following parameters:
</p>

<pre class="ipsCode">
Setup a Root password
Remove anonymous access
Disable remote access for the root user
Remove the test database
Reload the privileges</pre>

<p>
	Verify that you database configuration is working properly.
</p>

<pre class="ipsCode">
systemctl status mariadb</pre>

<p>
	Now that the setup of the database is done, we need to add the prerequisites for the <abbr title="Massive Network Game Object Server">mangos</abbr> database configuration. We need to start by creating an user for <abbr title="Massive Network Game Object Server">mangos</abbr>, login to the database using:
</p>

<pre class="ipsCode">
mysql -u root -p</pre>

<p>
	Create the user you wish, the example given is creating an user '<abbr title="Massive Network Game Object Server">mangos</abbr>' who can connect from the 'localhost' and has the password 'password' (do not forget the ';') at the end:
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted">
<span class="pln">CREATE USER </span><span class="str">'<abbr title="Massive Network Game Object Server">mangos</abbr>'</span><span class="pun">@</span><span class="str">'localhost'</span><span class="pln"> IDENTIFIED BY </span><span class="str">'password'</span><span class="pun">;</span></pre>

<p>
	We then need to grant privileges to that user that we can use it later to setup the <abbr title="Massive Network Game Object Server">Mangos</abbr> schemas (again, do not forget the ';' symbol):
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted">
<span class="pln">GRANT ALL PRIVILEGES ON </span><span class="pun">*.*</span><span class="pln"> TO </span><span class="str">'<abbr title="Massive Network Game Object Server">mangos</abbr>'</span><span class="pun">@</span><span class="str">'localhost'</span><span class="pun">;</span></pre>

<p>
	Exit the terminal:
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted">
<span class="pln">quit</span></pre>

<p>
	Congratulations, you have setup the pre-requisites for the database on Fedora !
</p>

<p>
	 
</p>

<p>
	<span><u>Install <abbr title="Massive Network Game Object Server">Mangos</abbr>:</u></span>
</p>

<p>
	We are now at the interesting part, how do we install <abbr title="Massive Network Game Object Server">Mangos</abbr> on Fedora ? Well, assuming you are logged in as 'root', go to the home directory:
</p>

<pre class="ipsCode">
cd ~</pre>

<p>
	Now, we can download our installer:
</p>

<pre class="ipsCode">
wget https://raw.githubusercontent.com/mangoszero/server/master/linux/getmangos.sh</pre>

<p>
	Set the permissions to be allowed to execute it:
</p>

<pre class="ipsCode">
chmod 700 getmangos.sh</pre>

<p>
	And execute it:
</p>

<pre class="ipsCode">
./getmangos.sh</pre>

<p>
	Before we go further, some explanations on the available activities:
</p>

<ul><li>
		Install Prerequisites will install all the necessary dependencies for you to build &amp; run <abbr title="Massive Network Game Object Server">mangos</abbr>. Toggled by default.
	</li>
	<li>
		Set Download And Install Paths will allow you to specify where the sources must be downloaded and where the binaries must be installed. Toggled by default.
	</li>
	<li>
		Clone Source repositories will help you cloning the <abbr title="Massive Network Game Object Server">Mangos</abbr> sources. Toggled by default.
	</li>
	<li>
		Build <abbr title="Massive Network Game Object Server">MaNGOS</abbr> will assist you in the building process of <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. Toggled by default.
	</li>
	<li>
		Install <abbr title="Massive Network Game Object Server">MaNGOS</abbr> will help you installing <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. Toggled by default.
	</li>
	<li>
		Install Databases will assist you in the database schemas creation. Toggled by default.
	</li>
	<li>
		Extract Resources will help you to extract the DBC, maps, mmaps and vmaps from the game client. Toggled by default.
	</li>
	<li>
		Create Code::Blocks Project File will create a project for the Code::Blocks editor. Do not toggle this option if you don't plan to edit the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> sources.
	</li>
</ul><p>
	Now that you know everything, let the default options selected and select 'Ok' thanks to the Tab key. The script is now installing the necessary dependencies on your Fedora. You will be prompted to provide your agreement to install the build dependencies. Select 'Yes' two times. On Fedora, ACE will also be downloaded and built, at this moment, it is the version 6.4.2 which is built by the installer.
</p>

<p>
	<span><u>User selection:</u></span>
</p>

<p>
	<abbr title="Massive Network Game Object Server">Mangos</abbr> provides you the opportunity to run it under another user than the 'root' one. This is a good practice to isolate softwares and limit the security impact in case of an exploited vulnerability. The default proposed run user is '<abbr title="Massive Network Game Object Server">mangos</abbr>' but you can change if you wish. Select 'Ok' to continue.
</p>

<p>
	If you have already performed this step, the installer will ask you whether you want to keep that user. I advise you to reply 'Yes' except if you know what you are doing.
</p>

<p>
	<span><u>Choose WoW Release:</u></span>
</p>

<p>
	The next screen is requesting you to choose the WoW release you are willing to install. Select the one you that fits your wish and select 'Ok'.
</p>

<p>
	<span><u>Source-Code Path:</u></span>
</p>

<p>
	The next screen is asking you to provide the source path. By default, the proposed format is /home/&lt;run user&gt;/&lt;wow version&gt;/src. For instance, for a run user '<abbr title="Massive Network Game Object Server">mangos</abbr>' and a wow version 'Vanilla', the proposed path will be:
</p>

<pre class="ipsCode">
/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/src</pre>

<p>
	Reply 'Yes' to create the directory if it does not exist. If it does exist and contains sources, the installer will ask you whether you want to delete the content or not.
</p>

<p>
	<span><u>Installation Path:</u></span>
</p>

<p>
	The next screen is asking you to provide the installation path. This is the location from where you will execute the <abbr title="Massive Network Game Object Server">Mangos</abbr> processes. By default, the proposed format is /home/&lt;run user&gt;/&lt;wow version&gt;. For instance, for a run user '<abbr title="Massive Network Game Object Server">mangos</abbr>' and a wow version 'Vanilla', the proposed path will be:
</p>

<pre class="ipsCode">
/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero</pre>

<p>
	If it does exist and contains compiled sources, the installer will ask you whether you want to delete the content or not.
</p>

<p>
	<span><u>Clone or update <abbr title="Massive Network Game Object Server">MaNGOS</abbr>:</u></span>
</p>

<p>
	The next step of the script is asking you whether you want to clone, update or use an existing copy of the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> sources. For a fresh installation, select the option '0 Clone a fresh copy of <abbr title="Massive Network Game Object Server">MaNGOS</abbr>'. The installer will now connect to Github and check the available development branch, currently, the last stable release is the Rel21 and is hosted in the 'master' branch.
</p>

<p>
	The installer is now cloning the server and database repositories.
</p>

<p>
	<span><u>Build Options:</u></span>
</p>

<p>
	You are now at the build step. Some explanations over this screen:
</p>

<ul><li>
		Enable Debug will setup debug flags and more tracing on <abbr title="Massive Network Game Object Server">Mangos</abbr>. <strong>Use this build option only if you're requested to to fix a bug. Building a software in debug mode significantly reduces its performances.</strong>
	</li>
	<li>
		Use Standard Malloc, toggle this option to use the standard memory allocation. <strong>Untoggle this option only if you know what you are doing.</strong>
	</li>
	<li>
		Use External ACE libraries. Allows you to use the ACE libraries coming from your system. <strong>Untoggle this option only if you know what you are doing.</strong>
	</li>
	<li>
		Use PostgreSQL insteald of MySQL/MariaDB. Allows you to use another database provider than the default one. This option has not been tested and, if you have followed the tutorial so far, you should have setup MariaDB ;-)
	</li>
	<li>
		Build Client Tools will build the extractors necessary to get dbc, maps, mmaps and vmaps out of the game client. Unselect this option only if you already have these resources extracted.
	</li>
	<li>
		Use SD3 will allow you to build the ScriptDev3 Engine provided with <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. We advise you to keep this option toggled except if you don't like living world based on C++ scripts.
	</li>
	<li>
		Use Eluna will allow you to build the Eluna Engine provided with <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. We advise you to keep this option toggled except if you don't like living world based on LUA scripts.
	</li>
</ul><p>
	Select 'Ok' to proceed with the build process and confirm that would want to build <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. The installer is now building <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. Depending on the speed of your system, you have the time to drink a glass of water or a cup of coffee. :-)
</p>

<p>
	<span><u>Installation:</u></span>
</p>

<p>
	You will now be prompted to install <abbr title="Massive Network Game Object Server">Mangos</abbr>. Select 'Yes' to install it.
</p>

<p>
	<span><u>Database Operations:</u></span>
</p>

<p>
	Wait.. another database setup ?! Yes, but this time, we are populating the database with the <abbr title="Massive Network Game Object Server">mangos</abbr> data. You have three options here:
</p>

<ul><li>
		Install clean databases to setup a fresh database
	</li>
	<li>
		Update existing databases to update your old version of the database
	</li>
	<li>
		Skip database work... but it wouldn't make sense :-)
	</li>
</ul><p>
	Select the first option if you are performing a fresh installation. You will be prompted to select your type of database. If you followed the guide so far, you should select "MariaDB". The installer will then request your database information, if you followed the guide, you need to provide the following input:
</p>

<pre class="ipsCode">
Hostname: localhost
Port: 3306
User: <abbr title="Massive Network Game Object Server">mangos</abbr>
Password: password
</pre>

<p>
	You can now choose into several options:
</p>

<ul><li>
		ReInstall the realm database, containing all the realms information and the accounts
	</li>
	<li>
		ReInstall the world database, containing all the world configuration
	</li>
	<li>
		ReInstall the characters database, containing all the characters information
	</li>
	<li>
		Update the realmlist to setup an initial game server
	</li>
</ul><p>
	By default, all options must be toggled. The installer will now perform the database import.
</p>

<p>
	<span><u>Extract Game Data:</u></span>
</p>

<p>
	This step will copy the extractors to the wow game location, extract dbc, maps, mmaps and vmaps and copy these extracted data to your installation directory. The installer will automatically look for a suitable WoW client into your /home directory. If it doesn't find anything, you will have to provide your game location path. If the provided path doesn't contain any game data, the installer will exit.
</p>

<p>
	The extractor steps allows you to select the artifacts you want to extract:
</p>

<ul><li>
		DBC and Maps, which are the minimum set of data you need to extract
	</li>
	<li>
		Mmaps which are the movement maps, based on vectoriel calculation, required for an efficient pathfinding
	</li>
	<li>
		Vmaps which are the virtual maps, used for collision detection and LoS detection
	</li>
</ul><p>
	The Mmaps extraction is taking several hours, you will have the time to sleep or drink several coffees. :-)
</p>

<p>
	<span><u>Congratulations !</u></span>
</p>

<p>
	You almost did it ! Still few steps to perform before you can play on your preferred game. First of all, you need to switch to your run user. If you used <abbr title="Massive Network Game Object Server">mangos</abbr>, the command will look like:
</p>

<pre class="ipsCode">
su - <abbr title="Massive Network Game Object Server">mangos</abbr></pre>

<p>
	You need then to go to the configuration directory of your installation, if you installed Vanilla, it will look like the following command:
</p>

<pre class="ipsCode">
cd /home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/etc</pre>

<p>
	Copy the realmd.conf.dist and mangosd.conf.dist files to their expected name:
</p>

<pre class="ipsCode">
cp realmd.conf.dist realmd.conf
cp mangosd.conf.dist mangosd.conf</pre>

<p>
	Edit the realmd.conf and find the line LoginDatabaseInfo. Provide your database information, according to this guide and if you have installed Vanilla, it should look like:
</p>

<pre class="ipsCode">
LoginDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_realm"</pre>

<p>
	Save your file and edit the file mangosd.conf. You need to provide the database information for the three database we have configured with our installer:
</p>

<pre class="ipsCode">
LoginDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_realm"
WorldDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_world"
CharacterDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_characters"
</pre>

<p>
	Save your file and go back to the 'root' user:
</p>

<pre class="ipsCode">
exit</pre>

<p>
	<span><u>Make sure it keeps running !</u></span>
</p>

<p>
	What could be cooler than having the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> server starting automatically with your server ? Not much... so let's configure systemd to do so ! First of all, we need to tell it that we have two new services. Declare them by creating the corresponding files:
</p>

<pre class="ipsCode">
touch /etc/systemd/system/realmd.service
touch /etc/systemd/system/mangosd.service # Or give it a better name like zero.service if it's a vanilla gaming server for instance.</pre>

<p>
	Now, edit the /etc/systemd/system/realmd.service file and add the following content (Replace the installation path and the run user by the settings you have provided during the installation):
</p>

<pre class="ipsCode">
[Unit]
Description=Realmd service
After=network.target mariadb.service

[Service]
Type=simple
User=<abbr title="Massive Network Game Object Server">mangos</abbr>
Environment=LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
ExecStart=/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/bin/realmd -c /home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/etc/realmd.conf
Restart=on-abort


[Install]
WantedBy=multi-user.target</pre>

<p>
	Save this file and edit the /etc/systemd/system/mangosd.service file (or the better name you gave to it) with the following content (same remark than above the installation path and the run user):
</p>

<pre class="ipsCode">
[Unit]
Description=WoW Vanilla service
After=network.target mariadb.service getty@tty3.service

[Service]
Type=simple
User=<abbr title="Massive Network Game Object Server">mangos</abbr>
ExecStart=/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/bin/mangosd -c /home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/etc/mangosd.conf
WorkingDirectory=/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/bin
StandardInput=tty
TTYPath=/dev/tty3
TTYReset=yes
TTYVHangup=yes
Restart=on-abort

[Install]
WantedBy=multi-user.target</pre>

<p>
	We are almost there ! You now need to tell systemd to reload its configuration:
</p>

<pre class="ipsCode">
systemctl daemon-reload</pre>

<p>
	And let's start our processes to verify that they work:
</p>

<pre class="ipsCode">
systemctl start realmd
systemctl start mangosd</pre>

<p>
	To verify that it worked, execute the following command:
</p>

<pre class="ipsCode">
systemctl status realmd
systemctl status mangosd</pre>

<p>
	If it's working properly, you should have an output indicating you the success status for both service. The last step is to tell systemd to execute them at startup, for this, execute the following commands:
</p>

<pre class="ipsCode">
systemctl enable realmd
systemctl enable mangosd</pre>

<p>
	Congratulations ! You are now done with the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> setup on Fedora 25 :-)
</p>

<p>
	<span style="color:#c0392b;"><u><span style="font-size:22px;"><span style="background-color:#000000;">WARNING!</span></span></u></span>
</p>

<p>
	If you have installed <abbr title="Massive Network Game Object Server">mangos</abbr> into your home directory, the SELinux will block your execution. To disable this check, you can:
</p>

<ul><li>
		Install <abbr title="Massive Network Game Object Server">Mangos</abbr> elsewhere
	</li>
	<li>
		Update the SELinux parameters
	</li>
</ul><p>
	To update it, you need to edit the file /etc/selinux/config and change the following line:
</p>

<pre class="ipsCode">
SELINUX=PERMISSIVE</pre>

<p>
	You can now reboot your computer to verify that everything is indeed started:
</p>

<pre class="ipsCode">
reboot</pre>
]]></description><guid isPermaLink="false">20076</guid><pubDate>Wed, 15 Mar 2017 23:05:15 +0000</pubDate></item><item><title>Installing Mangos on Linux Mint 18 [OUTDATED]</title><link>https://www.getmangos.eu/wiki/documentation/installation-guides/guideslinux/installing-mangos-on-linux-mint-18-outdated-r20077/</link><description><![CDATA[<p>
	Hello, in this tutorial, I will explain a step-by-step approach to configure, install and run <abbr title="Massive Network Game Object Server">Mangos</abbr> on a Linux Mint 18 system. <strong>To fully execute the installation, you need an original copy of the game client version you want to run.</strong>
</p>

<p>
	This guide has been fully tested on an empty Linux Mint 18 system with minimal installation.
</p>

<p>
	Let's go..
</p>

<p>
	<u><span>Setup the database:</span></u>
</p>

<p>
	Linux Mint is supporting MySQL by default. This part of the guide will help you to setup your instance of MySQL.
</p>

<p>
	Launch a terminal, and if it's not already the case, you need to become the 'root' user:
</p>

<pre class="ipsCode">
sudo su - root</pre>

<p>
	Then, install MySQL, enter your root password when you will be prompted for:
</p>

<pre class="ipsCode">
aptitude -y install mysql-server</pre>

<p>
	<span> </span><span> </span><span> </span><span> </span> Once MySQLis installed, start it:
</p>

<pre class="ipsCode">
systemctl start mysql</pre>

<p>
	I do advise you to add MySQL service at startup to execute it automatically:
</p>

<pre class="ipsCode">
systemctl enable mysql</pre>

<p>
	Let's secure your MySQL installation, execute the following command:
</p>

<pre class="ipsCode">
mysql_secure_installation</pre>

<p>
	I advise you to setup the following parameters:
</p>

<pre class="ipsCode">
Do not enforce the use of the password plugin
Do not change the root password
Remove anonymous access
Disable remote access for the root user
Remove the test database
Reload the privileges</pre>

<p>
	Now that the setup of the database is done, we need to add the prerequisites for the <abbr title="Massive Network Game Object Server">mangos</abbr> database configuration. We need to start by creating an user for <abbr title="Massive Network Game Object Server">mangos</abbr>, login to the database using:
</p>

<pre class="ipsCode">
mysql -u root -p</pre>

<p>
	Create the user you wish, the example given is creating an user '<abbr title="Massive Network Game Object Server">mangos</abbr>' who can connect from the 'localhost' and has the password 'password' (do not forget the ';') at the end:
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted">
<span class="pln">CREATE USER </span><span class="str">'<abbr title="Massive Network Game Object Server">mangos</abbr>'</span><span class="pun">@</span><span class="str">'localhost'</span><span class="pln"> IDENTIFIED BY </span><span class="str">'password'</span><span class="pun">;</span></pre>

<p>
	We then need to grant privileges to that user that we can use it later to setup the <abbr title="Massive Network Game Object Server">Mangos</abbr> schemas (again, do not forget the ';' symbol):
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted">
<span class="pln">GRANT ALL PRIVILEGES ON </span><span class="pun">*.*</span><span class="pln"> TO </span><span class="str">'<abbr title="Massive Network Game Object Server">mangos</abbr>'</span><span class="pun">@</span><span class="str">'localhost'</span><span class="pun">;</span></pre>

<p>
	Exit the terminal:
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted">
<span class="pln">quit</span></pre>

<p>
	Congratulations, you have setup the pre-requisites for the database on Linux Mint !
</p>

<p>
	 
</p>

<p>
	<span><u>Install <abbr title="Massive Network Game Object Server">Mangos</abbr>:</u></span>
</p>

<p>
	We are now at the interesting part, how do we install <abbr title="Massive Network Game Object Server">Mangos</abbr> on Linux Mint ? Well, assuming you are logged in as 'root', go to the home directory:
</p>

<pre class="ipsCode">
cd ~</pre>

<p>
	Now, we can download our installer:
</p>

<pre class="ipsCode">
wget https://raw.githubusercontent.com/mangoszero/server/master/linux/getmangos.sh</pre>

<p>
	Set the permissions to be allowed to execute it:
</p>

<pre class="ipsCode">
chmod 700 getmangos.sh</pre>

<p>
	And execute it:
</p>

<pre class="ipsCode">
./getmangos.sh</pre>

<p>
	Before we go further, some explanations on the available activities:
</p>

<ul>
	<li>
		Install Prerequisites will install all the necessary dependencies for you to build &amp; run <abbr title="Massive Network Game Object Server">mangos</abbr>. Toggled by default.
	</li>
	<li>
		Set Download And Install Paths will allow you to specify where the sources must be downloaded and where the binaries must be installed. Toggled by default.
	</li>
	<li>
		Clone Source repositories will help you cloning the <abbr title="Massive Network Game Object Server">Mangos</abbr> sources. Toggled by default.
	</li>
	<li>
		Build <abbr title="Massive Network Game Object Server">MaNGOS</abbr> will assist you in the building process of <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. Toggled by default.
	</li>
	<li>
		Install <abbr title="Massive Network Game Object Server">MaNGOS</abbr> will help you installing <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. Toggled by default.
	</li>
	<li>
		Install Databases will assist you in the database schemas creation. Toggled by default.
	</li>
	<li>
		Extract Resources will help you to extract the DBC, maps, mmaps and vmaps from the game client. Toggled by default.
	</li>
	<li>
		Create Code::Blocks Project File will create a project for the Code::Blocks editor. Do not toggle this option if you don't plan to edit the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> sources.
	</li>
</ul>

<p>
	Now that you know everything, let the default options selected and select 'Ok' thanks to the Tab key. The script is now installing the necessary dependencies on your Linux Mint. You will be prompted to provide your agreement to install the build dependencies. Select 'Yes' two times.
</p>

<p>
	<span><u>User selection:</u></span>
</p>

<p>
	<abbr title="Massive Network Game Object Server">Mangos</abbr> provides you the opportunity to run it under another user than the 'root' one. This is a good practice to isolate softwares and limit the security impact in case of an exploited vulnerability. The default proposed run user is '<abbr title="Massive Network Game Object Server">mangos</abbr>' but you can change if you wish. Select 'Ok' to continue.
</p>

<p>
	If you have already performed this step, the installer will ask you whether you want to keep that user. I advise you to reply 'Yes' except if you know what you are doing.
</p>

<p>
	<span><u>Choose WoW Release:</u></span>
</p>

<p>
	The next screen is requesting you to choose the WoW release you are willing to install. Select the one you that fits your wish and select 'Ok'.
</p>

<p>
	<span><u>Source-Code Path:</u></span>
</p>

<p>
	The next screen is asking you to provide the source path. By default, the proposed format is /home/&lt;run user&gt;/&lt;wow version&gt;/src. For instance, for a run user '<abbr title="Massive Network Game Object Server">mangos</abbr>' and a wow version 'Vanilla', the proposed path will be:
</p>

<pre class="ipsCode">
/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/src</pre>

<p>
	Reply 'Yes' to create the directory if it does not exist. If it does exist and contains sources, the installer will ask you whether you want to delete the content or not.
</p>

<p>
	<span><u>Installation Path:</u></span>
</p>

<p>
	The next screen is asking you to provide the installation path. This is the location from where you will execute the <abbr title="Massive Network Game Object Server">Mangos</abbr> processes. By default, the proposed format is /home/&lt;run user&gt;/&lt;wow version&gt;. For instance, for a run user '<abbr title="Massive Network Game Object Server">mangos</abbr>' and a wow version 'Vanilla', the proposed path will be:
</p>

<pre class="ipsCode">
/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero</pre>

<p>
	If it does exist and contains compiled sources, the installer will ask you whether you want to delete the content or not.
</p>

<p>
	<span><u>Clone or update <abbr title="Massive Network Game Object Server">MaNGOS</abbr>:</u></span>
</p>

<p>
	The next step of the script is asking you whether you want to clone, update or use an existing copy of the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> sources. For a fresh installation, select the option '0 Clone a fresh copy of <abbr title="Massive Network Game Object Server">MaNGOS</abbr>'. The installer will now connect to Github and check the available development branch, currently, the last stable release is the Rel21 and is hosted in the 'master' branch.
</p>

<p>
	The installer is now cloning the server and database repositories.
</p>

<p>
	<span><u>Build Options:</u></span>
</p>

<p>
	You are now at the build step. Some explanations over this screen:
</p>

<ul>
	<li>
		Enable Debug will setup debug flags and more tracing on <abbr title="Massive Network Game Object Server">Mangos</abbr>. <strong>Use this build option only if you're requested to to fix a bug. Building a software in debug mode significantly reduces its performances.</strong>
	</li>
	<li>
		Use Standard Malloc, toggle this option to use the standard memory allocation. <strong>Untoggle this option only if you know what you are doing.</strong>
	</li>
	<li>
		Use External ACE libraries. Allows you to use the ACE libraries coming from your system. <strong>Untoggle this option only if you know what you are doing.</strong>
	</li>
	<li>
		Use PostgreSQL insteald of MySQL/MariaDB. Allows you to use another database provider than the default one. This option has not been tested and, if you have followed the tutorial so far, you should have setup MySQL <span class="ipsEmoji">😉</span>
	</li>
	<li>
		Build Client Tools will build the extractors necessary to get dbc, maps, mmaps and vmaps out of the game client. Unselect this option only if you already have these resources extracted.
	</li>
	<li>
		Use SD3 will allow you to build the ScriptDev3 Engine provided with <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. We advise you to keep this option toggled except if you don't like living world based on C++ scripts.
	</li>
	<li>
		Use Eluna will allow you to build the Eluna Engine provided with <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. We advise you to keep this option toggled except if you don't like living world based on LUA scripts.
	</li>
</ul>

<p>
	Select 'Ok' to proceed with the build process and confirm that would want to build <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. The installer is now building <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. Depending on the speed of your system, you have the time to drink a glass of water or a cup of coffee. <span class="ipsEmoji">🙂</span>
</p>

<p>
	<span><u>Installation:</u></span>
</p>

<p>
	You will now be prompted to install <abbr title="Massive Network Game Object Server">Mangos</abbr>. Select 'Yes' to install it.
</p>

<p>
	<span><u>Database Operations:</u></span>
</p>

<p>
	Wait.. another database setup ?! Yes, but this time, we are populating the database with the <abbr title="Massive Network Game Object Server">mangos</abbr> data. You have three options here:
</p>

<ul>
	<li>
		Install clean databases to setup a fresh database
	</li>
	<li>
		Update existing databases to update your old version of the database
	</li>
	<li>
		Skip database work... but it wouldn't make sense <span class="ipsEmoji">🙂</span>
	</li>
</ul>

<p>
	Select the first option if you are performing a fresh installation. You will be prompted to select your type of database. If you followed the guide so far, you should select "MySQL". The installer will then request your database information, if you followed the guide, you need to provide the following input:
</p>

<pre class="ipsCode">
Hostname: localhost
Port: 3306
User: <abbr title="Massive Network Game Object Server">mangos</abbr>
Password: password
</pre>

<p>
	You can now choose into several options:
</p>

<ul>
	<li>
		ReInstall the realm database, containing all the realms information and the accounts
	</li>
	<li>
		ReInstall the world database, containing all the world configuration
	</li>
	<li>
		ReInstall the characters database, containing all the characters information
	</li>
	<li>
		Update the realmlist to setup an initial game server
	</li>
</ul>

<p>
	By default, all options must be toggled. The installer will now perform the database import.
</p>

<p>
	<span><u>Extract Game Data:</u></span>
</p>

<p>
	This step will copy the extractors to the wow game location, extract dbc, maps, mmaps and vmaps and copy these extracted data to your installation directory. The installer will automatically look for a suitable WoW client into your /home directory. If it doesn't find anything, you will have to provide your game location path. If the provided path doesn't contain any game data, the installer will exit.
</p>

<p>
	The extractor steps allows you to select the artifacts you want to extract:
</p>

<ul>
	<li>
		DBC and Maps, which are the minimum set of data you need to extract
	</li>
	<li>
		Mmaps which are the movement maps, based on vectoriel calculation, required for an efficient pathfinding
	</li>
	<li>
		Vmaps which are the virtual maps, used for collision detection and LoS detection
	</li>
</ul>

<p>
	The Mmaps extraction is taking several hours, you will have the time to sleep or drink several coffees. <span class="ipsEmoji">🙂</span>
</p>

<p>
	<span><u>Congratulations !</u></span>
</p>

<p>
	You almost did it ! Still few steps to perform before you can play on your preferred game. First of all, you need to switch to your run user. If you used <abbr title="Massive Network Game Object Server">mangos</abbr>, the command will look like:
</p>

<pre class="ipsCode">
su - <abbr title="Massive Network Game Object Server">mangos</abbr></pre>

<p>
	You need then to go to the configuration directory of your installation, if you installed Vanilla, it will look like the following command:
</p>

<pre class="ipsCode">
cd /home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/etc</pre>

<p>
	Copy the realmd.conf.dist and mangosd.conf.dist files to their expected name:
</p>

<pre class="ipsCode">
cp realmd.conf.dist realmd.conf
cp mangosd.conf.dist mangosd.conf</pre>

<p>
	Edit the realmd.conf and find the line LoginDatabaseInfo. Provide your database information, according to this guide and if you have installed Vanilla, it should look like:
</p>

<pre class="ipsCode">
LoginDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_realm"</pre>

<p>
	Save your file and edit the file mangosd.conf. You need to provide the database information for the three database we have configured with our installer:
</p>

<pre class="ipsCode">
LoginDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_realm"
WorldDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_world"
CharacterDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_characters"
</pre>

<p>
	Save your file and go back to the 'root' user:
</p>

<pre class="ipsCode">
exit</pre>

<p>
	<span><u>Make sure it keeps running !</u></span>
</p>

<p>
	What could be cooler than having the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> server starting automatically with your server ? Not much... so let's configure systemd to do so ! First of all, we need to tell it that we have two new services. Declare them by creating the corresponding files:
</p>

<pre class="ipsCode">
touch /etc/systemd/system/realmd.service
touch /etc/systemd/system/mangosd.service # Or give it a better name like zero.service if it's a vanilla gaming server for instance.</pre>

<p>
	Now, edit the /etc/systemd/system/realmd.service file and add the following content (Replace the installation path and the run user by the settings you have provided during the installation):
</p>

<pre class="ipsCode">
[Unit]
Description=Realmd service
After=network.target mysql.service

[Service]
Type=simple
User=<abbr title="Massive Network Game Object Server">mangos</abbr>
ExecStart=/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/bin/realmd -c /home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/etc/realmd.conf
Restart=on-abort

[Install]
WantedBy=multi-user.target</pre>

<p>
	Save this file and edit the /etc/systemd/system/mangosd.service file (or the better name you gave to it) with the following content (same remark than above the installation path and the run user):
</p>

<pre class="ipsCode">
[Unit]
Description=WoW Vanilla service
After=network.target mysql.service getty@tty3.service

[Service]
Type=simple
User=<abbr title="Massive Network Game Object Server">mangos</abbr>
ExecStart=/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/bin/mangosd -c /home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/etc/mangosd.conf
WorkingDirectory=/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/bin
StandardInput=tty
TTYPath=/dev/tty3
TTYReset=yes
TTYVHangup=yes
Restart=on-abort

[Install]
WantedBy=multi-user.target</pre>

<p>
	We are almost there ! You now need to tell systemd to reload its configuration:
</p>

<pre class="ipsCode">
systemctl daemon-reload</pre>

<p>
	And let's start our processes to verify that they work:
</p>

<pre class="ipsCode">
systemctl start realmd
systemctl start mangosd</pre>

<p>
	To verify that it worked, execute the following command:
</p>

<pre class="ipsCode">
systemctl status realmd
systemctl status mangosd</pre>

<p>
	If it's working properly, you should have an output indicating you the success status for both service. The last step is to tell systemd to execute them at startup, for this, execute the following commands:
</p>

<pre class="ipsCode">
systemctl enable realmd
systemctl enable mangosd</pre>

<p>
	Congratulations ! You are now done with the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> setup on Linux Mint 18 :-) You can now reboot your computer to verify that everything is indeed started:
</p>

<pre class="ipsCode">
reboot</pre>
]]></description><guid isPermaLink="false">20077</guid><pubDate>Thu, 16 Mar 2017 21:25:27 +0000</pubDate></item><item><title>Installing Mangos on Ubuntu 16.04 LTS [OUTDATED]</title><link>https://www.getmangos.eu/wiki/documentation/installation-guides/guideslinux/installing-mangos-on-ubuntu-1604-lts-outdated-r20078/</link><description><![CDATA[<p style="text-align:center;">
	<em><strong><span style="color:#c0392b;">MUCH OF THE INFORMATION FOUND WITHIN IS NO LONGER VALID AND OUT OF DATE</span></strong></em>
</p>

<p>
	Hello, in this tutorial, I will explain a step-by-step approach to configure, install and run <abbr title="Massive Network Game Object Server">Mangos</abbr> on a Ubuntu 16.04 LTS system. <strong>To fully execute the installation, you need an original copy of the game client version you want to run.</strong>
</p>

<p>
	This guide has been fully tested on an empty Ubuntu 16.04 LTS system with minimal installation.
</p>

<p>
	Let's go..
</p>

<p>
	<u><span>Setup the database:</span></u>
</p>

<p>
	Ubuntu is supporting MySQL by default. This part of the guide will help you to setup your instance of MySQL.
</p>

<p>
	Launch a terminal, and if it's not already the case, you need to become the 'root' user:
</p>

<pre class="ipsCode">
sudo su - root</pre>

<p>
	Then, install MySQL, enter your root password when you will be prompted for:
</p>

<pre class="ipsCode">
apt-get -y install mysql-server</pre>

<p>
	<span> </span><span> </span><span> </span><span> </span> Once MySQLis installed, start it:
</p>

<pre class="ipsCode">
systemctl start mysql</pre>

<p>
	I do advise you to add Mysql service at startup to execute it automatically:
</p>

<pre class="ipsCode">
systemctl enable mysql</pre>

<p>
	Let's secure your mysql installation, execute the following command:
</p>

<pre class="ipsCode">
mysql_secure_installation</pre>

<p>
	I advise you to setup the following parameters:
</p>

<pre class="ipsCode">
Do not enforce the use of the password plugin
Do not change the root password
Remove anonymous access
Disable remote access for the root user
Remove the test database
Reload the privileges</pre>

<p>
	Now that the setup of the database is done, we need to add the prerequisites for the <abbr title="Massive Network Game Object Server">mangos</abbr> database configuration. We need to start by creating an user for <abbr title="Massive Network Game Object Server">mangos</abbr>, login to the database using:
</p>

<pre class="ipsCode">
mysql -u root -p</pre>

<p>
	Create the user you wish, the example given is creating an user '<abbr title="Massive Network Game Object Server">mangos</abbr>' who can connect from the 'localhost' and has the password 'password' (do not forget the ';') at the end:
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted">
<span class="pln">CREATE USER </span><span class="str">'<abbr title="Massive Network Game Object Server">mangos</abbr>'</span><span class="pun">@</span><span class="str">'localhost'</span><span class="pln"> IDENTIFIED BY </span><span class="str">'password'</span><span class="pun">;</span></pre>

<p>
	We then need to grant privileges to that user that we can use it later to setup the <abbr title="Massive Network Game Object Server">Mangos</abbr> schemas (again, do not forget the ';' symbol):
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted">
<span class="pln">GRANT ALL PRIVILEGES ON </span><span class="pun">*.*</span><span class="pln"> TO </span><span class="str">'<abbr title="Massive Network Game Object Server">mangos</abbr>'</span><span class="pun">@</span><span class="str">'localhost'</span><span class="pun">;</span></pre>

<p>
	Exit the terminal:
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted">
<span class="pln">quit</span></pre>

<p>
	Congratulations, you have setup the pre-requisites for the database on Ubuntu !
</p>

<p>
	 
</p>

<p>
	<span><u>Install <abbr title="Massive Network Game Object Server">Mangos</abbr>:</u></span>
</p>

<p>
	We are now at the interesting part, how do we install <abbr title="Massive Network Game Object Server">Mangos</abbr> on Ubuntu ? Well, assuming you are logged in as 'root', go to the home directory:
</p>

<pre class="ipsCode">
cd ~</pre>

<p>
	Now, we can download our installer:
</p>

<pre class="ipsCode">
wget https://raw.githubusercontent.com/mangoszero/server/master/linux/getmangos.sh</pre>

<p>
	Set the permissions to be allowed to execute it:
</p>

<pre class="ipsCode">
chmod 700 getmangos.sh</pre>

<p>
	And execute it:
</p>

<pre class="ipsCode">
./getmangos.sh</pre>

<p>
	Before we go further, some explanations on the available activities:
</p>

<ul>
	<li>
		Install Prerequisites will install all the necessary dependencies for you to build &amp; run <abbr title="Massive Network Game Object Server">mangos</abbr>. Toggled by default.
	</li>
	<li>
		Set Download And Install Paths will allow you to specify where the sources must be downloaded and where the binaries must be installed. Toggled by default.
	</li>
	<li>
		Clone Source repositories will help you cloning the <abbr title="Massive Network Game Object Server">Mangos</abbr> sources. Toggled by default.
	</li>
	<li>
		Build <abbr title="Massive Network Game Object Server">MaNGOS</abbr> will assist you in the building process of <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. Toggled by default.
	</li>
	<li>
		Install <abbr title="Massive Network Game Object Server">MaNGOS</abbr> will help you installing <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. Toggled by default.
	</li>
	<li>
		Install Databases will assist you in the database schemas creation. Toggled by default.
	</li>
	<li>
		Extract Resources will help you to extract the DBC, maps, mmaps and vmaps from the game client. Toggled by default.
	</li>
	<li>
		Create Code::Blocks Project File will create a project for the Code::Blocks editor. Do not toggle this option if you don't plan to edit the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> sources.
	</li>
</ul>

<p>
	Now that you know everything, let the default options selected and select 'Ok' thanks to the Tab key. The script is now installing the necessary dependencies on your Ubuntu. You will be prompted to provide your agreement to install the build dependencies. Select 'Yes' two times.
</p>

<p>
	<span><u>User selection:</u></span>
</p>

<p>
	<abbr title="Massive Network Game Object Server">Mangos</abbr> provides you the opportunity to run it under another user than the 'root' one. This is a good practice to isolate softwares and limit the security impact in case of an exploited vulnerability. The default proposed run user is '<abbr title="Massive Network Game Object Server">mangos</abbr>' but you can change if you wish. Select 'Ok' to continue.
</p>

<p>
	If you have already performed this step, the installer will ask you whether you want to keep that user. I advise you to reply 'Yes' except if you know what you are doing.
</p>

<p>
	<span><u>Choose WoW Release:</u></span>
</p>

<p>
	The next screen is requesting you to choose the WoW release you are willing to install. Select the one you that fits your wish and select 'Ok'.
</p>

<p>
	<span><u>Source-Code Path:</u></span>
</p>

<p>
	The next screen is asking you to provide the source path. By default, the proposed format is /home/&lt;run user&gt;/&lt;wow version&gt;/src. For instance, for a run user '<abbr title="Massive Network Game Object Server">mangos</abbr>' and a wow version 'Vanilla', the proposed path will be:
</p>

<pre class="ipsCode">
/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/src</pre>

<p>
	Reply 'Yes' to create the directory if it does not exist. If it does exist and contains sources, the installer will ask you whether you want to delete the content or not.
</p>

<p>
	<span><u>Installation Path:</u></span>
</p>

<p>
	The next screen is asking you to provide the installation path. This is the location from where you will execute the <abbr title="Massive Network Game Object Server">Mangos</abbr> processes. By default, the proposed format is /home/&lt;run user&gt;/&lt;wow version&gt;. For instance, for a run user '<abbr title="Massive Network Game Object Server">mangos</abbr>' and a wow version 'Vanilla', the proposed path will be:
</p>

<pre class="ipsCode">
/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero</pre>

<p>
	If it does exist and contains compiled sources, the installer will ask you whether you want to delete the content or not.
</p>

<p>
	<span><u>Clone or update <abbr title="Massive Network Game Object Server">MaNGOS</abbr>:</u></span>
</p>

<p>
	The next step of the script is asking you whether you want to clone, update or use an existing copy of the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> sources. For a fresh installation, select the option '0 Clone a fresh copy of <abbr title="Massive Network Game Object Server">MaNGOS</abbr>'. The installer will now connect to Github and check the available development branch, currently, the last stable release is the Rel21 and is hosted in the 'master' branch.
</p>

<p>
	The installer is now cloning the server and database repositories.
</p>

<p>
	<span><u>Build Options:</u></span>
</p>

<p>
	You are now at the build step. Some explanations over this screen:
</p>

<ul>
	<li>
		Enable Debug will setup debug flags and more tracing on <abbr title="Massive Network Game Object Server">Mangos</abbr>. <strong>Use this build option only if you're requested to to fix a bug. Building a software in debug mode significantly reduces its performances.</strong>
	</li>
	<li>
		Use Standard Malloc, toggle this option to use the standard memory allocation. <strong>Untoggle this option only if you know what you are doing.</strong>
	</li>
	<li>
		Use External ACE libraries. Allows you to use the ACE libraries coming from your system. <strong>Untoggle this option only if you know what you are doing.</strong>
	</li>
	<li>
		Use PostgreSQL insteald of MySQL/MariaDB. Allows you to use another database provider than the default one. This option has not been tested and, if you have followed the tutorial so far, you should have setup MySQL <span class="ipsEmoji">😉</span>
	</li>
	<li>
		Build Client Tools will build the extractors necessary to get dbc, maps, mmaps and vmaps out of the game client. Unselect this option only if you already have these resources extracted.
	</li>
	<li>
		Use SD3 will allow you to build the ScriptDev3 Engine provided with <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. We advise you to keep this option toggled except if you don't like living world based on C++ scripts.
	</li>
	<li>
		Use Eluna will allow you to build the Eluna Engine provided with <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. We advise you to keep this option toggled except if you don't like living world based on LUA scripts.
	</li>
</ul>

<p>
	Select 'Ok' to proceed with the build process and confirm that would want to build <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. The installer is now building <abbr title="Massive Network Game Object Server">MaNGOS</abbr>. Depending on the speed of your system, you have the time to drink a glass of water or a cup of coffee. <span class="ipsEmoji">🙂</span>
</p>

<p>
	<span><u>Installation:</u></span>
</p>

<p>
	You will now be prompted to install <abbr title="Massive Network Game Object Server">Mangos</abbr>. Select 'Yes' to install it.
</p>

<p>
	<span><u>Database Operations:</u></span>
</p>

<p>
	Wait.. another database setup ?! Yes, but this time, we are populating the database with the <abbr title="Massive Network Game Object Server">mangos</abbr> data. You have three options here:
</p>

<ul>
	<li>
		Install clean databases to setup a fresh database
	</li>
	<li>
		Update existing databases to update your old version of the database
	</li>
	<li>
		Skip database work... but it wouldn't make sense <span class="ipsEmoji">🙂</span>
	</li>
</ul>

<p>
	Select the first option if you are performing a fresh installation. You will be prompted to select your type of database. If you followed the guide so far, you should select "MySQL". The installer will then request your database information, if you followed the guide, you need to provide the following input:
</p>

<pre class="ipsCode">
Hostname: localhost
Port: 3306
User: <abbr title="Massive Network Game Object Server">mangos</abbr>
Password: password
</pre>

<p>
	You can now choose into several options:
</p>

<ul>
	<li>
		ReInstall the realm database, containing all the realms information and the accounts
	</li>
	<li>
		ReInstall the world database, containing all the world configuration
	</li>
	<li>
		ReInstall the characters database, containing all the characters information
	</li>
	<li>
		Update the realmlist to setup an initial game server
	</li>
</ul>

<p>
	By default, all options must be toggled. The installer will now perform the database import.
</p>

<p>
	<span><u>Extract Game Data:</u></span>
</p>

<p>
	This step will copy the extractors to the wow game location, extract dbc, maps, mmaps and vmaps and copy these extracted data to your installation directory. The installer will automatically look for a suitable WoW client into your /home directory. If it doesn't find anything, you will have to provide your game location path. If the provided path doesn't contain any game data, the installer will exit.
</p>

<p>
	The extractor steps allows you to select the artifacts you want to extract:
</p>

<ul>
	<li>
		DBC and Maps, which are the minimum set of data you need to extract
	</li>
	<li>
		Mmaps which are the movement maps, based on vectoriel calculation, required for an efficient pathfinding
	</li>
	<li>
		Vmaps which are the virtual maps, used for collision detection and LoS detection
	</li>
</ul>

<p>
	The Mmaps extraction is taking several hours, you will have the time to sleep or drink several coffees. <span class="ipsEmoji">🙂</span>
</p>

<p>
	<span><u>Congratulations !</u></span>
</p>

<p>
	You almost did it ! Still few steps to perform before you can play on your preferred game. First of all, you need to switch to your run user. If you used <abbr title="Massive Network Game Object Server">mangos</abbr>, the command will look like:
</p>

<pre class="ipsCode">
su - <abbr title="Massive Network Game Object Server">mangos</abbr></pre>

<p>
	You need then to go to the configuration directory of your installation, if you installed Vanilla, it will look like the following command:
</p>

<pre class="ipsCode">
cd /home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/etc</pre>

<p>
	Copy the realmd.conf.dist and mangosd.conf.dist files to their expected name:
</p>

<pre class="ipsCode">
cp realmd.conf.dist realmd.conf
cp mangosd.conf.dist mangosd.conf</pre>

<p>
	Edit the realmd.conf and find the line LoginDatabaseInfo. Provide your database information, according to this guide and if you have installed Vanilla, it should look like:
</p>

<pre class="ipsCode">
LoginDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_realm"</pre>

<p>
	Save your file and edit the file mangosd.conf. You need to provide the database information for the three database we have configured with our installer:
</p>

<pre class="ipsCode">
LoginDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_realm"
WorldDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_world"
CharacterDatabaseInfo = "127.0.0.1;3306;<abbr title="Massive Network Game Object Server">mangos</abbr>;password;zero_characters"
</pre>

<p>
	Save your file and go back to the 'root' user:
</p>

<pre class="ipsCode">
exit</pre>

<p>
	<span><u>Make sure it keeps running !</u></span>
</p>

<p>
	What could be cooler than having the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> server starting automatically with your server ? Not much... so let's configure systemd to do so ! First of all, we need to tell it that we have two new services. Declare them by creating the corresponding files:
</p>

<pre class="ipsCode">
touch /etc/systemd/system/realmd.service
touch /etc/systemd/system/mangosd.service # Or give it a better name like zero.service if it's a vanilla gaming server for instance.</pre>

<p>
	Now, edit the /etc/systemd/system/realmd.service file and add the following content (Replace the installation path and the run user by the settings you have provided during the installation):
</p>

<pre class="ipsCode">
[Unit]
Description=Realmd service
After=network.target mysql.service

[Service]
Type=simple
User=<abbr title="Massive Network Game Object Server">mangos</abbr>
ExecStart=/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/bin/realmd -c /home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/etc/realmd.conf
Restart=on-abort

[Install]
WantedBy=multi-user.target</pre>

<p>
	Save this file and edit the /etc/systemd/system/mangosd.service file (or the better name you gave to it) with the following content (same remark than above the installation path and the run user):
</p>

<pre class="ipsCode">
[Unit]
Description=WoW Vanilla service
After=network.target mysql.service getty@tty3.service

[Service]
Type=simple
User=<abbr title="Massive Network Game Object Server">mangos</abbr>
ExecStart=/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/bin/mangosd -c /home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/etc/mangosd.conf
WorkingDirectory=/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/bin
StandardInput=tty
TTYPath=/dev/tty3
TTYReset=yes
TTYVHangup=yes
Restart=on-abort

[Install]
WantedBy=multi-user.target</pre>

<p>
	We are almost there ! You now need to tell systemd to reload its configuration:
</p>

<pre class="ipsCode">
systemctl daemon-reload</pre>

<p>
	And let's start our processes to verify that they work:
</p>

<pre class="ipsCode">
systemctl start realmd
systemctl start mangosd</pre>

<p>
	To verify that it worked, execute the following command:
</p>

<pre class="ipsCode">
systemctl status realmd
systemctl status mangosd</pre>

<p>
	If it's working properly, you should have an output indicating you the success status for both service. The last step is to tell systemd to execute them at startup, for this, execute the following commands:
</p>

<pre class="ipsCode">
systemctl enable realmd
systemctl enable mangosd</pre>

<p>
	Congratulations ! You are now done with the <abbr title="Massive Network Game Object Server">MaNGOS</abbr> setup on Ubuntu 16.04 :-) You can now reboot your computer to verify that everything is indeed started:
</p>

<pre class="ipsCode">
reboot</pre>

<p>
	 
</p>
]]></description><guid isPermaLink="false">20078</guid><pubDate>Fri, 17 Mar 2017 14:21:04 +0000</pubDate></item><item><title>Installing MaNGOS on Ubuntu 18.04 LTS (LXD container)</title><link>https://www.getmangos.eu/wiki/documentation/installation-guides/guideslinux/installing-mangos-on-ubuntu-1804-lts-lxd-container-r40003/</link><description><![CDATA[<p>
	With LXD you can easy take snapshots and move your server to another physical machine.
</p>

<p>
	Guide is fully tested on <abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">MaNGOS</abbr></abbr> Zero with bots module enabled.
</p>

<p>
	Check the video with installation process:
</p>

<p>
	<a href="https://asciinema.org/a/299001" rel="external nofollow">https://asciinema.org/a/299001</a>
</p>

<p>
	If you do not want to use LXD, simple pass LXD instruction and go further.
</p>

<p>
	<strong>Let's start</strong>
</p>

<p>
	<span style="font-size:20px;"><strong>LXD installation &amp; configuration:</strong></span>
</p>

<pre class="ipsCode">
sudo apt install lxd &amp;&amp; reboot</pre>

<p>
	Reboot is needed for reloading groups that will be assigned to your account.
</p>

<pre class="ipsCode">
sudo lxd init</pre>

<p>
	with above command anserw defaults to all questions.
</p>

<p>
	<span style="font-size:16px;"><strong>Create container for our server:</strong></span>
</p>

<pre class="ipsCode">
lxc launch ubuntu:bionic mangos-zero</pre>

<p>
	check if your container is running:
</p>

<pre class="ipsCode">
lxc list
+-------------+---------+-----------------------+-----------------------------------------------+------------+-----------+
|   NAME      |  STATE  |         IPV4          |                     IPV6                      |    TYPE    | SNAPSHOTS |
+-------------+---------+-----------------------+-----------------------------------------------+------------+-----------+
| mangos-zero | RUNNING | *.*.*.* (eth1)        |                                               | PERSISTENT | 3         |
+-------------+---------+-----------------------+-----------------------------------------------+------------+-----------+</pre>

<p>
	now we will connect to our container:
</p>

<pre class="ipsCode">
lxc exec mangos-zero bash</pre>

<p>
	Please verify that you are on your contierner, you should have promt like this
</p>

<pre class="ipsCode">
root@mangos-zero:~#</pre>

<p>
	if not you must try again with previous command providing your container name.
</p>

<p>
	<br />
	<span style="font-size:20px;"><strong><abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">MaNGOS</abbr></abbr> server installation</strong></span>
</p>

<p>
	<strong><span style="font-size:16px;">Install necessary packages:</span></strong>
</p>

<pre class="ipsCode">
apt install git make cmake libssl-dev libbz2-dev build-essential default-libmysqlclient-dev libace-6.4.5 libace-dev mysql-server</pre>

<p>
	We need also install additional mysql package. I've attached file in this post so you don't need to search it.
</p>

<p>
	Download this file and send to your container. Open another terminal window and type:
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">lxc file push /DOWNLOADED_DIRECTORY/mysql-apt-config_0.8.14-1_all.deb mangos-zero/root/</span></pre>

<p>
	Go back to first terminal where you are logged to your container and type:
</p>

<pre class="ipsCode">
dpkg -i /root/mysql-apt-config_0.8.14-1_all.deb</pre>

<p>
	on installation window check mysql 5.7 is selected and hit Enter, when window will close type:
</p>

<pre class="ipsCode">
apt update &amp;&amp; apt full-upgrade -y</pre>

<p>
	When all packages are installed, secure your mysql installation.
</p>

<p>
	Please type and anserw to few questions to secure your mysql server.
</p>

<pre class="ipsCode">
mysql_secure_installation</pre>

<p>
	Create new username and password to access our mysql server:
</p>

<pre class="ipsCode">
mysql
GRANT ALL ON *.* to 'mangos'@'localhost' IDENTIFIED BY 'set_database_password';</pre>

<p>
	<strong><span style="font-size:16px;">Getting <abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">MaNGOS</abbr></abbr> source code, compile and configuration.</span></strong>
</p>

<p>
	We will create new folder for sources:
</p>

<pre class="ipsCode">
mkdir /opt/mangos &amp;&amp; cd /opt/mangos</pre>

<p>
	Now we will download server and database sources to created folder.
</p>

<p>
	<abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">MaNGOS</abbr></abbr> zero source (if you want different <abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr> version please change mangoszero to different repo name):
</p>

<pre class="ipsCode">
git clone https://github.com/mangoszero/server.git --recursive --depth 1</pre>

<p>
	Database files:
</p>

<pre class="ipsCode">
git clone https://github.com/mangoszero/database.git --recursive --depth 1</pre>

<p>
	<strong>Compiling <abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">MaNGOS</abbr></abbr></strong> (if your CPU have less than 4cores change -j4 to -j2 for two core CPU):
</p>

<pre class="ipsCode">
cd server &amp;&amp; mkdir build &amp;&amp; cd build &amp;&amp; cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/bin/mangos &amp;&amp; make -j4 &amp;&amp; make install</pre>

<p>
	above command will create build folder, compile and install compiled server.
</p>

<p>
	<strong>Database installation</strong>:
</p>

<pre class="ipsCode">
cd /opt/mangos/database &amp;&amp; chmod -R +x *.sh &amp;&amp; ./InstallDatabases.sh</pre>

<p>
	above command will fix script permissions and install your database.
</p>

<p>
	<strong>GameData files extraction</strong>:
</p>

<p>
	This can me done inside or outside the container, choice is yours how you do it. Remember that extraction take some time, so go take a cup of tea/coffe and cookie and wait. (ETA 1-2h)
</p>

<p>
	We need proper files for exctraction, go to your <abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr> installation and copy those files to yor game client:
</p>

<pre class="ipsCode">
cd /usr/local/bin/mangos/bin/ &amp;&amp; chmod -R +x *.sh &amp;&amp; cp -av tools/* ExtractResources.sh MoveMapGen.sh mmap_excluded.txt offmesh.txt /GAME_CLIENT_DESTINATION</pre>

<p>
	now go to your game client and run:
</p>

<pre class="ipsCode">
./ExtractResources.sh</pre>

<p>
	<strong>Server configuration</strong>:
</p>

<p>
	First we have to fix path to <abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">MaNGOS</abbr></abbr> configruation. We can do this in config files or simply creating a symlink. In this tutorial we will create symlink to keep defaults.
</p>

<pre class="ipsCode">
cd /usr/local/bin/mangos/ &amp;&amp; ln -s ../etc</pre>

<p>
	Now we have to copy config files:
</p>

<pre class="ipsCode">
cd etc/ &amp;&amp; cp -av mangosd.conf.dist mangosd.conf &amp;&amp; cp -av realmd.conf.dist realmd.conf</pre>

<p>
	In realmd.conf find "LoginDatabaseInfo" and change database username and password to credentials we created before.
</p>

<p>
	In mangosd.conf find "LoginDatabaseInfo", "WorldDatabaseInfo", "CharacterDatabaseInfo" and change database username and password to credentials we created before.
</p>

<p>
	<strong>Systemd configuration:</strong>
</p>

<p>
	Create systemd configuration to autostart your realmd and <abbr title="Massive Network Game Object Server">mangosd</abbr>. In LXD I recommend to run mangosd in screen, we prepare such a configuration in this tutorial.
</p>

<p>
	Realmd service:
</p>

<pre class="ipsCode">
cat &gt; /etc/systemd/system/realmd.service &lt;&lt;EOF
[Unit]
Description=MangosZ server
After=network.target mysql.service

[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/mangos/bin/realmd -c /usr/local/bin/mangos/etc/realmd.conf
WorkingDirectory=/usr/local/bin/mangos/bin/
Restart=on-abort

[Install]
WantedBy=multi-user.target
EOF</pre>

<p>
	Mangosd service:
</p>

<pre class="ipsCode">
cat &gt; /etc/systemd/system/mangosd.service &lt;&lt;EOF
[Unit]
Description=MangosZ server
After=network.target mysql.service

[Service]
Type=simple
User=root
#ExecStart=/usr/local/bin/mangos/bin/mangosd -c /usr/local/bin/mangos/etc/mangosd.conf
ExecStart=/usr/bin/screen -mdS mangosd /usr/local/bin/mangos/bin/mangosd -c /usr/local/bin/mangos/etc/mangosd.conf
WorkingDirectory=/usr/local/bin/mangos/bin/
PIDFile=/usr/local/bin/mangos/etc/mzero.pid
RemainAfterExit=true
Restart=on-abort

[Install]
WantedBy=multi-user.target
EOF</pre>

<p>
	Reload systemd with:
</p>

<pre class="ipsCode">
systemctl daemon-reload</pre>

<p>
	Enable services for autostart:
</p>

<pre class="ipsCode">
systemctl enable realmd
systemctl enable mangosd</pre>

<p>
	Start services:
</p>

<pre class="ipsCode">
systemctl start realmd
systemctl start mangosd</pre>

<p>
	Checking status of running services:
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">systemctl status realmd
systemctl status mangosd</span></pre>

<p>
	If you want to attach to mangosd console, simply type:
</p>

<pre class="ipsCode">
screen -r mangosd</pre>

<p>
	to detach mangosd screen press keyboard combination:
</p>

<pre class="ipsCode">
CTRL+A+D</pre>

<p>
	<strong>Update IP address in database, so you can connect to your server</strong>:
</p>

<pre class="ipsCode">
mysql realmd -h localhost -u mangos -p</pre>

<p>
	check your values in realmlist table
</p>

<pre class="ipsCode">
select address,localAddress from realmlist;
+---------------+---------------+
| address       | localAddress  |
+---------------+---------------+
| 192.168.1.180 | 192.168.1.180 |
+---------------+---------------+</pre>

<p>
	then update address and localAddress values with two query (replace IP_ADDRESS with yours)
</p>

<pre class="ipsCode">
update realmlist set address='IP_ADDRESS';
update realmlist set localAddress='IP_ADDRESS';</pre>

<p>
	Last thing is to restart both services and try to connect.
</p>

<p>
	At the end I wan't to share with you LXD container image, I made this tutorial based on it. Container do not include GameData so you have to extract it by yourself.
</p>

<p>
	<a href="https://dl.dropboxusercontent.com/s/gzsogu1gf2uav5w/mangoszero-serv.tar.gz" rel="external nofollow"><abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">MaNGOS</abbr></abbr>-Zero LXD container based on Ubuntu 18.04</a>
</p>

<p>
	How to use it? Download the file and type in terminal (you must have LXD)
</p>

<pre class="ipsCode">
lxc image import mangoszero-serv.tar.gz --alias mangosz-img
lxc launch mangosz-img mangos-zero</pre>

<p>
	<a class="ipsAttachLink" data-fileext="deb" data-fileid="840" href="https://www.getmangos.eu/applications/core/interface/file/attachment.php?id=840" rel="">mysql-apt-config_0.8.16-1_all.deb</a>
</p>
]]></description><guid isPermaLink="false">40003</guid><pubDate>Mon, 04 Nov 2019 14:56:35 +0000</pubDate></item><item><title>Installing MaNGOS on Ubuntu Server 18.04</title><link>https://www.getmangos.eu/wiki/documentation/installation-guides/guideslinux/installing-mangos-on-ubuntu-server-1804-r40005/</link><description><![CDATA[<p>
	<span style="color:#00aeff;"><strong>[Last procedure check : 2020-07-13 ]</strong></span>
</p>

<p>
	<span style="font-size:14px;">Hi everyone,</span>
</p>

<p>
	<span style="font-size:14px;">I re-write the procedure since there are many questions about linux install procedure.<br />
	Many of them are no more applicable today and the  <span style="font-family:'Courier New', Courier, monospace;"><span style="background-color:#444444;">getmangos.sh</span></span> script needs rework as I write this article.</span>
</p>

<hr />
<p>
	<span style="color:#ffffff;"><span style="font-size:26px;">PREREQUISITES</span></span>
</p>

<p>
	<span style="font-size:14px;">I am assuming you are running your server on a Linux Operating system with Ubuntu Server 18.04 flavor.</span>
</p>

<p>
	<span style="font-size:14px;">Your OS should be up to date. If not, log in as <span style="color:#ffffff;"><strong>root </strong></span>and run <span>:</span></span>
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">apt update &amp;&amp; apt upgrade</span></pre>

<hr />
<p>
	<span style="color:#ffffff;"><span style="font-size:26px;">PART 1 : Configuring the environment</span></span>
</p>

<p>
	This tuto will use the <abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">MaNGOS</abbr></abbr> zero repo URL but it is replicable with all of our cores repos. Just change the git repo URL and you will be fine.
</p>

<p>
	<span style="color:#ffffff;"><span style="font-size:24px;">&gt; Creating system user</span></span>
</p>

<p>
	Be sure you have created a Linux user for your server, since it is not a good idea to run it as <span style="color:#e74c3c;">root </span>for obvious security reasons.
</p>

<p>
	We will then assume you have created a <span style="color:#ffffff;"><abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr> </span>linux user using the command : 
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">adduser mangos</span></pre>

<p>
	To be more handy you can add this user to the <span style="color:#ffffff;">sudoers </span>in order to be able to run administrative commands.
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">usermod -aG sudo mangos</span></pre>

<p>
	After this point, be sure to be logged-in as <span style="color:#ffffff;"><abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr> </span>Linux user. We do not need <span style="color:#c0392b;">root </span>account anymore (or perhaps once or twice.. but..never mind ! do not use <span style="color:#e74c3c;">root </span>when not needed)
</p>

<p>
	<span style="color:#ffffff;"><span style="font-size:24px;">&gt; Installing useful programs</span></span>
</p>

<p>
	<span style="font-size:14px;"><abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">MaNGOS</abbr></abbr> requires some libraries to be built and to run properly. </span>
</p>

<p>
	<span style="font-size:14px;">We also need some programs to run further commands or simply to handle some scripts which are in the repo (e.g : python scripts O_o)</span>
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">apt install git make cmake libssl-dev libbz2-dev build-essential default-libmysqlclient-dev libace-6.4.5 libace-dev python</span></pre>

<p>
	<span style="color:#ffffff;"><span style="font-size:24px;">&gt; Preparing your system folders</span></span>
</p>

<p>
	A good practice is to separate locations for the needs <span>:</span>
</p>

<ul>
	<li>
		sources, db sql files and build folder under the <span style="color:#ffffff;"><abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr></span> system user : <span style="color:#f1c40f;"><span style="font-family:'Courier New', Courier, monospace;">/home/<abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr>/</span></span>
	</li>
	<li>
		binaries, confs, logs, gamedata in <span style="color:#f1c40f;"><span style="font-family:'Courier New', Courier, monospace;">/opt/</span></span>
	</li>
</ul>

<p>
	Thus you can create the folders when logged-in as <span style="color:#ffffff;"><abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr> </span>system user <span>:</span>
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">mkdir /home/mangos/sources
mkdir /home/mangos/build
mkdir /home/mangos/db</span></pre>

<p>
	Then the <span style="color:#f1c40f;"><span style="font-family:'Courier New', Courier, monospace;">/opt/ </span></span>folder is only accessible to <span style="color:#e74c3c;">root </span>so you need to use sudo and impersonate <span style="color:#e74c3c;">root </span>to make things there.<br />
	The aim to to create a fodler using the <span style="color:#e74c3c;">root </span>account then giving the good rights to be able to use it with the <span style="color:#ffffff;"><abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr> </span>system user.
</p>

<p>
	The opt folder will a have a <span style="font-family:'Courier New', Courier, monospace;"><span style="color:#f1c40f;">wow </span></span>subfolder in which the <abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr> folder will be. It would let you install other cores if you want to (Trinitycore, Cmangos etc..) all should be installed in <span style="color:#f1c40f;"><span style="font-family:'Courier New', Courier, monospace;">/opt</span></span>.
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">sudo su
cd /opt/
mkdir wow
chown -R mangos:root wow
chmod g+s wow
exit</span></pre>

<p>
	Now you will have a <span style="color:#f1c40f;">wow </span>folder in <span style="color:#f1c40f;"><span style="font-family:'Courier New', Courier, monospace;">/opt/</span></span> that will be writable by the <abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr> system user.
</p>

<p>
	Create all necessary useful folders to handle future files using <span style="color:#ffffff;"><abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr> </span>system user : 
</p>

<pre class="ipsCode">cd /opt
mkdir wow/install &amp;&amp; mkdir wow/install/mangos &amp;&amp; mkdir wow/install/mangos/bin &amp;&amp; mkdir wow/install/mangos/bin/logs &amp;&amp; mkdir wow/install/mangos/conf 
cd /opt/wow &amp;&amp; mkdir gamedata &amp;&amp; mkdir gamedata/1.12 &amp;&amp; mkdir gamedata/1.12/mangos</pre>

<p>
	<span style="color:#ffffff;"><span style="font-size:24px;">&gt; Getting Game data</span></span>
</p>

<p>
	<span style="font-size:14px;">Since <abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">MaNGOS</abbr></abbr> is an educationnal project we will not redistribute exctracted game data.</span>
</p>

<p>
	<span style="font-size:14px;">In order to be able to run your server, you will need to extract these data from your game folder using the extractor programs that are built when you build the project.</span>
</p>

<p>
	<span style="font-size:14px;">To run the server the best way, you will have to extract <span>:</span></span>
</p>

<ul>
	<li>
		<span style="font-size:14px;"><span>dbc</span></span>
	</li>
	<li>
		<span style="font-size:14px;"><span>maps</span></span>
	</li>
	<li>
		<span style="font-size:14px;"><span>vmaps (takes a long time)</span></span>
	</li>
	<li>
		<span style="font-size:14px;"><span>mmaps (takes a long time)</span></span>
	</li>
</ul>

<p>
	<span style="font-size:14px;"><span>Please remind to put all extracted data on the folders you pre-created on previous steps.</span></span>
</p>

<p>
	If you work with a VM you can use Linux extractors against a shared game folder betwwen your PC and the Linux VM, or if you have the Game folder on your server, you will have to use extractors in this folder.
</p>

<p>
	More information on this topic : 
</p>
<iframe allowfullscreen="" data-controller="core.front.core.autosizeiframe" data-embedauthorid="3" data-embedcontent="" data-embedid="embed6380992077" scrolling="no" src="https://www.getmangos.eu/wiki/documentation/installation-guides/guideswindows/extracting-game-data-r20067/?do=embed" style="height:214px;max-width:502px;"></iframe>

<hr />
<p>
	<span style="color:#ffffff;"><span style="font-size:26px;">PART 2 : Getting the sources &amp; Compiling the core</span></span>
</p>

<p>
	Note that we always use the <span style="color:#ffffff;"><abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr> </span>system user.
</p>

<p>
	Get into your source folder <span>:</span>
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">cd /home/mangos/sources</span></pre>

<p>
	Retrieve the sources (WARNING do not forget to get them recusrsively !!) <span>:</span>
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">git clone https://github.com/mangoszero/server.git . --recursive --depth=1</span></pre>

<p>
	Well, that good now we are going to build the solution.
</p>

<p>
	<span style="color:#f39c12;"><strong>/!\ WARNING ABOUT ACE DEPENDENCIES  /!\ </strong></span><br />
	<span style="color:#e67e22;">It is possible that the build fails due to he ACE linked sources in the "dep" folder. It is related to a bug between Linux build and Windows build.<br />
	<strong>The main "server" repository is set to refer to a speficif commit</strong> that allows by default a correct build on Windows. If you are on Linux you will probably have to manuall pull &amp; checkout the "dep" folder (wich is a git submodule) : </span>
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">cd /home/mangos/sources/dep
git pull
git checkout master</span></pre>

<p>
	Keep in mind that this example show a default build. You can tweak teh buidl option in cmake to build or not some parts of the software.
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">cd /home/mangos/build
cmake ../sources/ -DCMAKE_INSTALL_PREFIX=/opt/wow/install/mangos -DCONF_INSTALL_DIR=/opt/wow/install/mangos/conf</span></pre>

<p>
	When it's finished, depending on the number of your cores you will adapt the following make command <span>:</span>
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">make -j</span><span class="tag">&lt;NbCores&gt;</span><span class="pln">
(e.g : for an intel i7 octocore you can tupe  'make -j8')</span></pre>

<p>
	The build process should begin, and when it's finished, you will have to install the built binaries : 
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">make install</span></pre>

<p>
	After that, all binaries and default conf files woudl have been copied to their destination folders which you have set in the previous cmake command.
</p>

<hr />
<p>
	<span style="color:#ffffff;"><span style="font-size:26px;">PART 3 : Installing MySQL </span></span>
</p>

<p>
	First things first <span>:</span> you have to install MySQL server.
</p>

<p>
	With <strong>Ubuntu Server 18.04</strong> the reference MySQL version is 5.7.30 (this statement is valid at the date when this guide is written, it can evolve in the future).
</p>

<p>
	To install mysql-server <span><span>:</span></span>
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">sudo apt install mysql-server</span></pre>

<p>
	After installation, you may wonder : <span style="color:#ffffff;"><span style="font-family:Georgia, serif;"><em>"Why the program did not ask me for a root password ?"</em></span></span>.
</p>

<p>
	Well, on new MySQL versions, the default auth protocol is set to "<span style="color:#f1c40f;"><strong><span style="font-family:'Courier New', Courier, monospace;">auth_socket</span></strong></span>" but all our software will use a password to connect to the database.
</p>

<p>
	Don(t worry, we are going to create a user that would be able to authenticate with standard credentials <span>:</span>
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">sudo su
mysql</span></pre>

<p>
	Now you are logged-in to mysql command prompt with the root account. you will notice no password was asked to you because roto user uses <span style="color:#f1c40f;"><span style="font-family:'Courier New', Courier, monospace;">auth_socket </span></span>protocol to authenticate.
</p>

<p>
	Now you are going to create the MySQL <span style="color:#ffffff;"><abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr></span> user <span>:</span>
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">CREATE USER 'mangos'@'localhost' IDENTIFIED BY 'mangos';
GRANT ALL PRIVILEGES ON *.* TO 'mangos'@'localhost' WITH GRANT OPTION;</span></pre>

<p>
	The "WITH GRANT OPTION" is not mandatory but can be useful for future use if you want to administer other users with this <abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr> account.
</p>

<p>
	Then leave MySQL command prompt and root shell <span>:</span>
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">exit;
exit</span></pre>

<hr />
<p>
	<span style="color:#ffffff;"><span style="font-size:26px;"><span style="font-family:'Lucida Sans Unicode', 'Lucida Grande', sans-serif;">PART 4 : </span>Database Setup</span></span>
</p>

<p>
	<span style="color:#ffffff;"><span style="font-size:24px;">&gt; Main databases (auth, characters, world)</span></span>
</p>

<p>
	<font face="Lucida Sans Unicode, Lucida Grande, sans-serif">You first have to clone the database repo in the db folder <span>:</span></font>
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">cd /home/mangos/db/
git clone https://github.com/mangoszero/database.git . --recursive --depth=1
./InstallDatabases.sh</span></pre>

<p>
	You will be prooted a screen with several questions <span>:</span>
</p>

<p>
	<img alt="934443229_InstallDB.PNG.0bf9ff4c37fdea7bf578455240e2c620.PNG" class="ipsImage ipsImage_thumbnailed" data-fileid="831" data-ratio="81.35" width="579" src="https://www.getmangos.eu/uploads/monthly_2020_11/934443229_InstallDB.PNG.0bf9ff4c37fdea7bf578455240e2c620.PNG" />
</p>

<p>
	<img alt="installdb2.PNG.28d6d02d040fb38421835715d6ac0a90.PNG" class="ipsImage ipsImage_thumbnailed" data-fileid="832" data-ratio="58.33" width="468" src="https://www.getmangos.eu/uploads/monthly_2020_11/installdb2.PNG.28d6d02d040fb38421835715d6ac0a90.PNG" />
</p>

<p>
	 
</p>

<p>
	 
</p>

<p>
	You will also be prompted to determine your dabases names.
</p>

<p>
	A good practice is to set the realm db name to : <span style="font-family:'Courier New', Courier, monospace;"><span style="color:#ffffff;">mangos_auth</span></span>, and also to suffix all others db names with the core versions you are running  (e.g characters db for <abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr> zero : <span style="color:#ffffff;"><span style="font-family:'Courier New', Courier, monospace;">mangos_characters0 </span></span>, world db <span>:</span> <span style="color:#ffffff;"><span style="font-family:'Courier New', Courier, monospace;">mangos_world0 </span></span>)
</p>

<p>
	<span style="color:#f1c40f;"><strong>Note :</strong> you need only 1 realm database if you run several cores (<abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr> zero, <abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr> one etc..) on teh same server, BUt you will need 2 db (characters and world) for each core you run.</span>
</p>

<p>
	<span style="color:#ffffff;"><span style="font-size:24px;">&gt; Apply database updates</span></span>
</p>

<p>
	On a fresh install, World updates should also be applied.
</p>

<p>
	In order to see if it is Ok, check on the World db (the process is the same for other databases) : connect to mysql using <abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr> user <span>:</span>
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">mysql -u mangos -pmangos mangos_world0
SELECT * FROM db_version ORDER BY VERSION DESC, structure DESC, content DESC LIMIT 0,1;
exit;</span></pre>

<p>
	If the return show you the same version that the most recent file in the World/Updates/Rel21 folder. You are OK.
</p>

<p>
	The version number alwas increase so it will be easy to determien if your version/structure/content is ok or not.
</p>

<p>
	If not, then go to the World update folder (World/Updates/Rel21) and apply missing updates to the databases.
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">mysql -u mangos -pmangos mangos_world0 &lt; nameOfUpdateSQlFile.sql</span></pre>

<p>
	<span style="color:#ffffff;"><span style="font-size:24px;">&gt; Translations</span></span>
</p>

<p>
	<span style="font-size:14px;">In case you run a non english speaking server, you can apply translation fiels to the world database.</span>
</p>

<p>
	<span style="font-size:14px;">You will find the correct sql files to apply in the Translations folder <span>:</span></span>
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">cd /home/mangos/overload/db/Translations</span></pre>

<p>
	Since I cannot ensure the Linux scripts are working, here is how to do manually <span>:</span><span> Apply the 3 first .sql files in teh folder <span>:</span></span>
</p>

<pre class="ipsCode">mysql -u mangos -pmangos mangos_world0 &lt; 1_LocaleTablePrepare.sql
mysql -u mangos -pmangos mangos_world0 &lt; 2_Add_NewLocalisationFields.sql
mysql -u mangos -pmangos mangos_world0 &lt; 3_InitialSaveEnglish.sql</pre>

<p>
	Of course you will have to replace the db name "mangos_world0" with your db name etc... if you have changed default db names and user and password <img alt=":)" data-emoticon="" height="20" src="https://www.getmangos.eu/uploads/emoticons/smile.png" srcset="https://www.getmangos.eu/uploads/emoticons/58bb064450371_smile2x.png 2x" title=":)" width="20" />
</p>

<p>
	You will need to go to the translation folder of the desired language (e.g for French language ) <span>:</span>
</p>

<pre class="ipsCode">cd /home/mangos/db/Translations/Translations/French
</pre>

<p>
	 
</p>

<p>
	<img alt="db3.PNG.930b2498bbd2a14a514e5a26950ad039.PNG" class="ipsImage ipsImage_thumbnailed" data-fileid="834" data-ratio="45.67" width="635" src="https://www.getmangos.eu/uploads/monthly_2020_11/db3.PNG.930b2498bbd2a14a514e5a26950ad039.PNG" />
</p>

<p>
	The more easy solution would be to compile all files in one and import it
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">cat *.sql &gt; full.sql
mysql -u mangos -pmangos mangos_world0 &lt; full.sql
rm full.sql</span></pre>

<p>
	There, your translations should be applied.
</p>

<hr />
<p>
	<span style="color:#ffffff;"><span style="font-size:26px;">PART 5 : Configuring *.conf files for executables</span></span>
</p>

<p>
	Go to the conf folder an create a copy of each .dist file <span>:</span>
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">cd /opt/wow/install/mangos/conf/
cp realmd.conf.dist realmd.conf &amp;&amp; cp mangosd.conf.dist mangosd.conf</span></pre>

<p>
	Change database connection information in each file in order to allow your binaries to connect to the database.
</p>

<p>
	<span style="color:#f1c40f;">Update your game data path in mangosd.conf too.<br />
	Update the logs folder to "logs" value (relative to binary)</span>
</p>

<p>
	<img alt="dirs.PNG.fe4801cbaa0b1e391251e9bbf253851e.PNG" class="ipsImage ipsImage_thumbnailed" data-fileid="835" data-ratio="9.71" width="546" src="https://www.getmangos.eu/uploads/monthly_2020_11/dirs.PNG.fe4801cbaa0b1e391251e9bbf253851e.PNG" />
</p>

<p>
	 
</p>

<p>
	A lot of behaviours can be configured in these files. <span style="color:#2ecc71;">Please consider studying it carefully.</span>
</p>

<hr />
<p>
	<span style="font-size:26px;"><span style="color:#ffffff;">PART 6 : Auto-restarting</span></span>
</p>

<p>
	When operating a game server it is nice to use an auto-restarter.
</p>

<p>
	Otherwise, you will have to keep up 2 terminals for realmd and mangosd.
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">./opt/wow/install/mangos/bin/realmd

and

./opt/wow/install/mangos/bin/mangosd </span></pre>

<p>
	That can be really annoying because daemons would be killed after terminal exit.
</p>

<p>
	Read this article to know how to use a restarter on Linux operating systems : 
</p>
<iframe allowfullscreen="" data-controller="core.front.core.autosizeiframe" data-embedauthorid="16315" data-embedcontent="" data-embedid="embed2369991619" scrolling="no" src="https://www.getmangos.eu/wiki/documentation/installation-guides/guideslinux/realmd-mangosd-daemons-auto-restarter-r40001/?do=embed" style="max-width:502px;height:214px;"></iframe>

<hr />
<p>
	<span style="color:#ffffff;"><span style="font-size:26px;">PART 7 : Final comments <span><img alt=":D" data-emoticon="" height="20" src="https://www.getmangos.eu/uploads/emoticons/biggrin.png" srcset="https://www.getmangos.eu/uploads/emoticons/58bb0643eca35_biggrin2x.png 2x" title=":D" width="20" /></span></span></span>
</p>

<p>
	<span style="color:#ffffff;"><span style="font-size:24px;">&gt; Nice to have</span></span>
</p>

<p>
	When your system is running, you could perhaps check : 
</p>

<ul>
	<li>
		Do you have a DB backup system ? You can easily put one in place with a CRON job <img alt=":)" data-emoticon="" height="20" src="https://www.getmangos.eu/uploads/emoticons/smile.png" srcset="https://www.getmangos.eu/uploads/emoticons/58bb064450371_smile2x.png 2x" title=":)" width="20" /> 
	</li>
	<li>
		Do you have a backup system for your conf files ?
	</li>
	<li>
		Do you have a flushing system for the server log files if you keep them timestamped ?
	</li>
</ul>

<p>
	<span style="color:#ffffff;"><span style="font-size:24px;">&gt; About errors at core start-up</span></span>
</p>

<p>
	You can have some DB errors at startup like this one <span>:</span>
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="PNG" data-fileid="836" href="https://www.getmangos.eu/uploads/monthly_2020_11/dberr.PNG.d9ff256c558097f11fbaddb625d3d1c8.PNG" rel=""><img alt="dberr.thumb.PNG.8f2e06d46f132061c62da534acea9991.PNG" class="ipsImage ipsImage_thumbnailed" data-fileid="836" data-ratio="22.10" width="1000" src="https://www.getmangos.eu/uploads/monthly_2020_11/dberr.thumb.PNG.8f2e06d46f132061c62da534acea9991.PNG" /></a>
</p>

<p>
	 
</p>

<p>
	It means you have applied DB updates beyond core expectation but since it is only content related, it is not a big issue.
</p>

<p>
	The core would not start id the version or structure is different, but the core can start with a content mismatch.
</p>

<p>
	<span style="color:#ffffff;"><span style="font-size:24px;">&gt; How to first connect whith default accounts ?</span></span>
</p>
<iframe allowfullscreen="" data-controller="core.front.core.autosizeiframe" data-embedauthorid="16315" data-embedcontent="" data-embedid="embed5817198805" scrolling="no" src="https://www.getmangos.eu/wiki/referenceinfo/otherfiles/mangos-default-accounts-r40006/?do=embed" style="max-width:502px;height:394px;"></iframe>

<p>
	If you have any questions - please ak on the forum on on Discord when anybody is connected <img alt=":)" data-emoticon="" height="20" src="https://www.getmangos.eu/uploads/emoticons/smile.png" srcset="https://www.getmangos.eu/uploads/emoticons/58bb064450371_smile2x.png 2x" title=":)" width="20" /> 
</p>

<p>
	Cheers !
</p>
]]></description><guid isPermaLink="false">40005</guid><pubDate>Mon, 13 Jul 2020 13:44:19 +0000</pubDate></item><item><title>Installing MaNGOS on Ubuntu Server 22.04</title><link>https://www.getmangos.eu/wiki/documentation/installation-guides/guideslinux/installing-mangos-on-ubuntu-server-2204-r40014/</link><description><![CDATA[<p>
	Hi everyone,
</p>

<p>
	I recently installed <abbr title="Massive Network Game Object Server">MaNGOS</abbr>(Zero) on Ubuntu 22.04 and thought it would be nice to share my step-by-step guide with you. You can use this guide for all cores, just replace GIT repository URL accordingly.
</p>

<p>
	_______________________________________________________________________________________________________________________________
</p>

<p>
	<span style="font-size:22px;"><strong>PREREQUISITES</strong></span>
</p>

<p>
	You should have a running server with Ubuntu Server 22.04 operating system.
</p>

<p>
	Before starting with the guide you should update the OS:
</p>

<pre class="ipsCode">sudo apt update &amp;&amp; apt upgrade</pre>

<p>
	<span style="color:#c0392b;">Upgrading to higher release of Ubuntu Server is on own risk. You should backup your DB before!</span>
</p>

<p>
	Also you will need an installation of the game client with the addons installed for which you would like to create the server for.
</p>

<p>
	_______________________________________________________________________________________________________________________________
</p>

<p>
	<span style="font-size:22px;"><strong>PREPARATION</strong></span>
</p>

<p>
	1. Create system user to be used for installation, if not already available. We will use in the guide a specific user named "<abbr title="Massive Network Game Object Server">mangos</abbr>":
</p>

<pre class="ipsCode">adduser mangos</pre>

<p>
	1.1 You can add root rights to the user, otherwise you need to execute some parts of the guide with root:
</p>

<pre class="ipsCode">usermod -aG sudo mangos</pre>

<p>
	2. Install usefull tools for this guide
</p>

<p>
	<abbr title="Massive Network Game Object Server">MaNGOS</abbr> requires some libraries to be built and to run properly. We also need some programs to run further commands or simply to handle some scripts which are in the repo (e.g : python scripts).
</p>

<pre class="ipsCode">sudo apt install git make cmake libssl-dev libbz2-dev build-essential mariadb-server mariadb-client default-libmysqlclient-dev libace-dev python2 net-tools screen gdb</pre>

<p>
	3. Create folder structure
</p>

<p>
	You can structure your fodlers as you like, you just have to take care to change the folder names accordingly in the scripts below. I try to seperate the different components and wanted to have the option to install different cores in parallel.
</p>

<p>
	You can check your user name with the command:
</p>

<pre class="ipsCode">whoami</pre>

<p>
	If you are using user "<abbr title="Massive Network Game Object Server">mangos</abbr>", go to the home directory.
</p>

<pre class="ipsCode">cd ~</pre>

<p>
	Then create folders:
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">mkdir ~/mangos
mkdir ~/mangos/zero
mkdir ~/mangos/zero/db
mkdir ~/mangos/zero/bin
mkdir ~/mangos/zero/gamedata
mkdir ~/mangos/zero/logs
</span></pre>

<p>
	4. prepare database
</p>

<p>
	Login to the MariaDB with:
</p>

<pre class="ipsCode">sudo mysql</pre>

<p>
	4.1 create a new user for <abbr title="Massive Network Game Object Server">mangos</abbr>
</p>

<p>
	Execute the follwoing create statement in the DB, replace &lt;password&gt; with a secret password which you can remember. Also grant the user with all required DB rights (very powerful rights, so don't share this user with anybody):
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted"><span class="pln">CREATE USER </span><span class="str">'mangos'</span><span class="pun">@</span><span class="str">'localhost'</span><span class="pln"> IDENTIFIED BY </span><span class="str">'&lt;password&gt;'</span><span class="pun">;</span><span class="pln">
GRANT ALL PRIVILEGES ON </span><span class="pun">*.*</span><span class="pln"> TO </span><span class="str">'mangos'</span><span class="pun">@</span><span class="str">'localhost'</span><span class="pln"> WITH GRANT OPTION</span><span class="pun">;</span><span class="pln"> 
</span><span class="kwd">exit</span><span class="pun">;</span><span class="pln"> </span></pre>

<p>
	Afterwards you are able to login to MariaDB with new user:
</p>

<pre class="ipsCode">mysql -u mangos -p&lt;password&gt;</pre>

<p>
	_______________________________________________________________________________________________________________________________
</p>

<p>
	<span style="font-size:22px;"><strong>INSTALL DATABASE</strong></span>
</p>

<p>
	1. Go to the db folder and download the database from the GIT repository. If you want to install a different version, exchange the url accordingly:
</p>

<pre class="ipsCode">cd ~/mangos/zero/db
git clone https://github.com/mangoszero/database.git --recursive</pre>

<p>
	2. This will create a new sub-folder database and downloads all required tools and scripts to install the database for the <abbr title="Massive Network Game Object Server">Mangos</abbr> core selected. Go to new sub-folder and start installation script:
</p>

<pre class="ipsCode">cd ~/mangos/zero/db/database
bash ./InstallDatabase.sh</pre>

<p>
	You will see the following screen:
</p>

<p>
	<img class="ipsImage ipsImage_thumbnailed" data-fileid="1117" data-ratio="85.64" width="550" alt="image.png.cf96fd9a353bdc3f55c05d95b0499857.png" src="https://www.getmangos.eu/uploads/monthly_2022_09/image.png.cf96fd9a353bdc3f55c05d95b0499857.png" />
</p>

<p>
	3. Press "N" to start process. It should automatically identify your MariaDB installed on your server.
</p>

<p>
	3.1 In general you can accept the default values in brackets, but following information needs to be set correctly:
</p>

<ul>
	<li>
		The user name for MariaDB: <abbr title="Massive Network Game Object Server">mangos</abbr>
	</li>
	<li>
		The password for the user to allow scritp to create all required tables: &lt;password&gt;
	</li>
	<li>
		Set the names for DB schemas (it's recommended to use separate schemas for characters and world for each core, so adjsut the numbering if needed)
		<ul>
			<li>
				Character DB: mangos_character0 (0 - Classic; 1 - TBC; 2 - WOTLK; ...)
			</li>
			<li>
				World DB: mangos_world0
			</li>
			<li>
				Realm DB: mangos_auth (Note: you just need one Realm DB, even if you run multiple cores on your server!)
			</li>
		</ul>
	</li>
</ul>

<p>
	After providing all informaion, the script will install all databases and tables.
</p>

<p>
	3.2 To configure the database, get at first your IP address by executing the command:
</p>

<pre class="ipsCode">ifconfig</pre>

<p>
	Note down your IP and open MariaDB again:
</p>

<pre class="ipsCode">mysql -u mangos -p&lt;password&gt;</pre>

<p>
	You can check the realmlist with the following SQL, note down the proper ID of the server you want to configure:
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted"><span class="kwd">select</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> </span><span class="kwd">from</span><span class="pln"> realmlist</span><span class="pun">;</span></pre>

<p>
	Update the realmlist with proper name and IP address, use the right ID:
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted"><span class="pln">UPDATE realmlist SET name </span><span class="pun">=</span><span class="pln"> </span><span class="pun">“&lt;</span><span class="typ">Your</span><span class="pln"> </span><span class="typ">Server</span><span class="pun">-</span><span class="typ">Name</span><span class="pun">&gt;”</span><span class="pln"> WHERE id </span><span class="pun">=</span><span class="pln"> </span><span class="pun">&lt;</span><span class="pln">ID</span><span class="pun">&gt;;</span><span class="pln">
UPDATE realmlist SET address </span><span class="pun">=</span><span class="pln"> </span><span class="pun">“&lt;</span><span class="typ">Server</span><span class="pun">-</span><span class="pln">IP address</span><span class="pun">&gt;”</span><span class="pln"> WHERE id </span><span class="pun">=</span><span class="pln"> </span><span class="pun">&lt;</span><span class="pln">ID</span><span class="pun">&gt;;</span></pre>

<p>
	The database is now ready!
</p>

<p>
	_______________________________________________________________________________________________________________________________
</p>

<p>
	<span style="font-size:22px;"><strong>BUILD <abbr title="Massive Network Game Object Server">MANGOS</abbr></strong></span>
</p>

<p>
	Next we will install the server related to the <abbr title="Massive Network Game Object Server">Mangos</abbr> core DB you installed before.
</p>

<p>
	1. Go to the core version folder and download the server from GIT repository (don't forget to change the URL to appropriate core version, if needed). It creates a new sub-fodler "server" and stores all data in it:
</p>

<pre class="ipsCode">cd ~/mangos/zero/
git clone https://github.com/mangoszero/server.git --recursive</pre>

<p>
	2. Build the core
</p>

<p>
	After download, we have to build the core by executing e.g. the following command:
</p>

<pre class="ipsCode">cmake -S ~/mangos/zero/server/ -B ~/mangos/zero/build/ -DBUILD_MANGOSD=1 -DBUILD_REALMD=1 -DBUILD_TOOLS=1 -DUSE_STORMLIB=1 -DSCRIPT_LIB_ELUNA=1 -DSCRIPT_LIB_SD3=1 -DPLAYERBOTS=1 -DPCH=1</pre>

<p>
	3. The script creates all necessary build files and stores then in the sub-folder "build". If it's done we can switch to the folder and build/install <abbr title="Massive Network Game Object Server">mangos</abbr> (a server with minimum 2 cores/cpus is recommended):
</p>

<pre class="ipsCode">make -j&lt;# of CPUs assigned to your server&gt;
make -j&lt;# of CPUs assigned to your server&gt; install</pre>

<p>
	4. Copy server files to our "bin" folder after the install scripts finished successfully:
</p>

<pre class="ipsCode">cd ~/mangos/zero/build/install/bin
cp mangosd ~/mangos/zero/bin/ &amp;&amp; cp realmd ~/mangos/zero/bin/</pre>

<p>
	5. Copy game extractor files to our "gamedata" folder:
</p>

<pre class="ipsCode">cp ./tools/*-extractor ~/mangos/zero/gamedata/
cp ./tools/*.sh ~/mangos/zero/gamedata/
cp ./tools/offmesh.txt ~/mangos/zero/gamedata/</pre>

<p>
	_______________________________________________________________________________________________________________________________
</p>

<p>
	<span style="font-size:22px;"><strong>EXTRACT GAMEDATA</strong></span>
</p>

<p>
	You will require an iinstallation of the game client on your local machine and a sFTP connection to your server to copy whole game fodler to the server. Safe the client in folder: ~/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/gamedata/! If this is done you can continue.
</p>

<p>
	1. Go to "gamedata" folder and change executable rights to extractor script and make all files read-/writeable:
</p>

<pre class="ipsCode">cd ~/mangos/zero/gamedata
chmod -R a+w ~/mangos/zero/gamedata
chmod a+x ExtractResources.sh</pre>

<p>
	2. Execute the Extractor Script and follwo the onscreen instructions (minimum of 4 GB RAM is required, recommended are 8 GB):
</p>

<ul>
	<li>
		extract everything (dbc, maps, mmaps, vmaps)
	</li>
	<li>
		choose all CPUs available on your server to extract MMaps (1-4)
	</li>
	<li>
		extract MMaps without delay
	</li>
</ul>

<p>
	After starting the process it will take a lot of time to complete. If the message "Finished creating MoveMaps" appears it's done. Check that no errors occured!
</p>

<p>
	3. Clean up unnecessary files, you can delete all folders and files from "gamedata" folder except:
</p>

<ul>
	<li>
		dbc
	</li>
	<li>
		maps
	</li>
	<li>
		mmaps
	</li>
	<li>
		vmaps
	</li>
</ul>

<p>
	_______________________________________________________________________________________________________________________________
</p>

<p>
	<span style="font-size:22px;"><strong>CONFIGURE SERVER</strong></span>
</p>

<p>
	1. Go to main server folder and copy server config files:
</p>

<pre class="ipsCode">cd ~/mangos/zero
cp -R ~/mangos/zero/build/etc ./
cd etc</pre>

<p>
	2. In the folder "etc" you find now all config files, copy the default files for editing and use by the server:
</p>

<pre class="ipsCode">cp ahbot.conf.dist ahbot.conf
cp mangosd.conf.dist mangosd.conf
cp realmd.conf.dist realmd.conf
cp aiplayerbot.conf.dist aiplayerbot.conf</pre>

<p>
	3. You should edit all files according to your needs, especially the db connection information. For comfortable editing use "nano":
</p>

<pre class="ipsCode">nano &lt;filename&gt;</pre>

<p>
	4. Start script for services to run the server:
</p>

<pre class="ipsCode">cd ~/mangos/zero/bin
nano wowadmin.sh</pre>

<p>
	Insert into the file the following script and save (replace the "/path/to/your/realmd" and "mangosd" to proper path, if you changed them:
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p style="margin-bottom:0.0001pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">#!/bin/bash</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">THIS_FULLPATH=$(cd `dirname "${BASH_SOURCE[0]}"` &amp;&amp; pwd -P)/`basename "${BASH_SOURCE[0]}"`</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">THIS_FOLDERPATH=$(cd `dirname "${BASH_SOURCE[0]}"` &amp;&amp; pwd -P)</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"></span></p><p> </p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">APATH=/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/bin/realmd</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">WPATH=/home/<abbr title="Massive Network Game Object Server">mangos</abbr>/<abbr title="Massive Network Game Object Server">mangos</abbr>/zero/bin/mangosd</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">ASRV_BIN=realmd<span>         </span>#This usually doesnt change. TrinityCore: authserver<span>  </span><abbr title="Massive Network Game Object Server">MaNGOS</abbr>: realmd<span>  </span>ArcEmu: whocares?</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">WSRV_BIN_ORG=mangosd<span>    </span>#This usually doesnt change. TrinityCore: worldserver <abbr title="Massive Network Game Object Server">MaNGOS</abbr>: mangosd ArcEmu: whocares?</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span style="font-size:10pt;font-family:'Courier New';">WSRV_BIN=mangosd</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span style="font-size:10pt;font-family:'Courier New';">WSRV_SCR=mangosd</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span style="font-size:10pt;font-family:'Courier New';"></span></p><p> </p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">echo "run" &gt; gdbcommands</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">echo "shell echo -e \"\nCRASHLOG BEGIN\n\"" &gt;&gt; gdbcommands</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">echo "info program" &gt;&gt; gdbcommands</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">echo "shell echo -e \"\nBACKTRACE\n\"" &gt;&gt; gdbcommands</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">echo "bt" &gt;&gt; gdbcommands</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">echo "shell echo -e \"\nBACKTRACE FULL\n\"" &gt;&gt; gdbcommands</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">echo "bt full" &gt;&gt; gdbcommands</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">echo "shell echo -e \"\nTHREADS\n\"" &gt;&gt; gdbcommands</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">echo "info threads" &gt;&gt; gdbcommands</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">echo "shell echo -e \"\nTHREADS BACKTRACE\n\"" &gt;&gt; gdbcommands</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">echo "thread apply all bt full" &gt;&gt; gdbcommands</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"></span></p><p> </p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">DEBUG=false</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"></span></p><p> </p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">#WORLD FUNCTIONS</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">startWorld()</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">{</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>if [ "$(screen -ls | grep $WSRV_SCR)" ]</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>then</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>        </span>echo $WSRV_BIN is already running</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>else</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>        </span>cd $WPATH</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>        </span>screen -AmdS $WSRV_SCR $WPATH/$WSRV_BIN $DEBUG</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>        </span>echo $WSRV_BIN is alive</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>fi</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">}</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"></span></p><p> </p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">restartWorld()</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">{</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>screen -S $WSRV_SCR -X stuff "saveall$(printf \\r)"</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>echo saved all characters, and server restart initialized</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>screen -S $WSRV_SCR -X stuff "server restart 5$(printf \\r)"</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">}</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"></span></p><p> </p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">stopWorld()</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">{</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>screen -S $WSRV_SCR -X stuff "saveall</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>"</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>echo saveall sent, waiting 5 seconds to kill $WSRV_BIN</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>sleep 5</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>screen -S $WSRV_SCR -X kill &amp;&gt;/dev/null</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>echo $WSRV_BIN is dead</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">}</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"></span></p><p> </p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">monitorWorld()</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">{</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>echo press ctrl+a+d to detach from the server without shutting it down</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>sleep 5</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>screen -r $WSRV_SCR</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">}</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span style="font-size:10pt;font-family:'Courier New';">#AUTH FUNCTIONS</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span style="font-size:10pt;font-family:'Courier New';">startAuth()</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span style="font-size:10pt;font-family:'Courier New';">{</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>if [ "$(screen -ls | grep $ASRV_BIN)" ]</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>then</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>        </span>echo $ASRV_BIN is already running</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>else</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>        </span>cd $APATH</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>        </span>screen -AmdS $ASRV_BIN $APATH/$ASRV_BIN</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>        </span>echo $ASRV_BIN is alive</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>fi</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">}</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"></span></p><p> </p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">stopAuth()</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">{</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>screen -S $ASRV_BIN -X kill &amp;&gt;/dev/null</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>echo $ASRV_BIN is dead</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">}</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"></span></p><p> </p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">restartAuth()</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">{</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>stopAuth</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>startAuth</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>echo $ASRV_BIN restarted</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">}</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"></span></p><p> </p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">monitorAuth()</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">{</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>echo press ctrl+a+d to detach from the server without shutting it down</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>sleep 5</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>screen -r $ASRV_BIN</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">}</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"></span></p><p> </p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">#FUNCTION SELECTION</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us">case "$1" in</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>$WSRV_BIN )</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>if [ "$2" == "true" ]</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>then</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>        </span>while x=1;</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>        </span>do</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>            </span>gdb $WPATH/$WSRV_BIN --batch -x gdbcommands | tee current</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>            </span>NOW=$(date +"%s-%d-%m-%Y")</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>            </span>mkdir -p $THIS_FOLDERPATH/crashes</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>            </span>mv current $THIS_FOLDERPATH/crashes/$NOW.log &amp;&gt;/dev/null</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>            </span>killall -9 $WSRV_BIN</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>            </span>echo $NOW $WSRV_BIN stopped, restarting! | tee -a $THIS_FULLPATH.log</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>            </span>echo crashlog available at: $THIS_FOLDERPATH/crashes/$NOW.log</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>            </span>sleep 1</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>        </span>done</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>else</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>        </span>while x=1;</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>        </span>do</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>            </span>./$WSRV_BIN</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>            </span>NOW=$(date +"%s-%d-%m-%Y")</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>            </span>echo $NOW $WSRV_BIN stopped, restarting! | tee -a $THIS_FULLPATH.log</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>            </span>sleep 1</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>        </span>done</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>fi</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>;;</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>$ASRV_BIN )</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>        </span>while x=1;</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>        </span>do</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>            </span>./$ASRV_BIN</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>            </span>NOW=$(date +"%s-%d-%m-%Y")</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>            </span>echo $NOW $ASRV_BIN stopped, restarting! | tee -a $THIS_FULLPATH.log</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>            </span>sleep 1</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>        </span>done</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>;;</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>"wstart" )</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>startWorld</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>;;</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>"wdstart" )</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>DEBUG=true</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>startWorld</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>;;</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>"wrestart" )</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>restartWorld</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>;;</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>"wstop" )</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>stopWorld</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>;;</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>"wmonitor" )</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>monitorWorld</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>;;</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"></span></p><p> </p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>"astart" )</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>startAuth</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>;;</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>"arestart" )</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>restartAuth</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>;;</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>"astop" )</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>stopAuth</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>;;</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>"amonitor" )</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>monitorAuth</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>;;</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span></span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>"start" )</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>startWorld</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>startAuth</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>;;</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>"stop" )</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>stopWorld</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>stopAuth</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>;;</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>"restart" )</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>restartWorld</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>restartAuth</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>;;</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>* )</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>echo Your argument is invalid</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span>echo "usage: start | stop | restart | wstart | wdstart | wrestart | wstop | wmonitor | astart | arestart | astop | amonitor"</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span lang="en-us" style="font-size:10pt;font-family:'Courier New';" xml:lang="en-us"><span>    </span></span><span style="font-size:10pt;font-family:'Courier New';">exit 1</span></p><p></p>
		

		<p style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:18pt;line-height:normal;">
			<span style="font-size:10pt;font-family:'Courier New';"><span>    </span>;;</span></p><p></p>
		

		<p>
			<span style="font-size:10pt;line-height:115%;font-family:'Courier New';">esac</span>
		</p>
	</div>
</div>

<p>
	5. Start the server with command:
</p>

<pre class="ipsCode">bash wowadmin.sh start</pre>

<p>
	_______________________________________________________________________________________________________________________________
</p>

<p>
	<span style="font-size:22px;"><strong>PLAY GAME</strong></span>
</p>

<p>
	1. update your realmlist.wtf in your game client folder.
</p>

<ul>
	<li>
		you can find the file in your %WoWDir%\realmlist.wtf
	</li>
	<li>
		Set the realmlist to your new IP (you should save the old realmlist.wtf as backup):
	</li>
</ul>

<pre class="ipsCode">set realmlist &lt;IP of your server&gt;</pre>

<p>
	2. The standard users are accessible directly, if server is up and running:
</p>

<ul>
	<li>
		User: PLAYER - Password: PLAYER
	</li>
	<li>
		User: ADMINISTRATOR - Password: ADMINISTRATOR
	</li>
	<li>
		User: GAMEMASTER - Password: GAMEMASTER
	</li>
	<li>
		User: MODERATOR - Password: MODERATOR
	</li>
</ul>

<p>
	3. To create a new account, go to your server and execte command:
</p>

<pre class="ipsCode">cd ~/mangos/zero/bin
bash wowadmin.sh wmonitor</pre>

<p>
	In the world monitor console, enter the following commands:
</p>

<pre class="ipsCode">account create &lt;account name&gt; &lt;password&gt;
account set addon &lt;account name&gt; #</pre>

<p>
	replace &lt;account name&gt; with new name and set a proper password, also grant the addons to be used for the user by changing # to a proper number: 0 - Classic; 1 - TBC; 2 - WOTLK; ...)
</p>

<p>
	To exit the monito, press CTRL +a +d at the same time.
</p>
]]></description><guid isPermaLink="false">40014</guid><pubDate>Sat, 24 Sep 2022 00:30:18 +0000</pubDate></item><item><title>Linux firewalld setup</title><link>https://www.getmangos.eu/wiki/documentation/installation-guides/guideslinux/linux-firewalld-setup-r20095/</link><description><![CDATA[<p>
	In order to allow connections to your server under linux you need to add ports 3724/tcp and 8085/tcp to your firewall
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">firewall-cmd --zone=public --permanent --add-port=3724/tcp
firewall-cmd --zone=public --permanent --add-port=8085/tcp
firewall-cmd --reload</span></pre>

<p>
	Please, anyone with permissions to write to closed topics, add this to the linux setup topic if possible. Thank you.
</p>
]]></description><guid isPermaLink="false">20095</guid><pubDate>Tue, 20 Mar 2018 02:30:07 +0000</pubDate></item><item><title>M2 Setup on Ubuntu 21.04</title><link>https://www.getmangos.eu/wiki/documentation/installation-guides/guideslinux/m2-setup-on-ubuntu-2104-r40013/</link><description><![CDATA[<h1>
	Ubuntu 21.04 WoW WOTLK Simple Server Setup Guide
</h1>

<p>
	Client Side: You will need version 3.3.5a (Wrath of The Lich King) of the client for this server setup.
</p>

<h2>
	Hardware specs used for this guide:
</h2>

<p>
	Quad-core CPU<br />
	8 Gigs of RAM<br />
	120 Gb HDD
</p>

<h2>
	Step 1: Install the OS
</h2>

<p>
	Install base Ubuntu server with updates.<br />
	There are a ton of tutorials on how to do that: <a href="https://www.youtube.com/results?search_query=install+ubuntu+21.04" rel="external nofollow">YouTube Tutorials</a>
</p>

<h2>
	Step 2: Install required packages
</h2>

<pre class="ipsCode">apt-get install git make cmake libssl-dev libbz2-dev build-essential default-libmysqlclient-dev libace-dev python mysql-server</pre>

<h2>
	Step 3: Setup the database
</h2>

<pre class="ipsCode">mkdir ~/mangos/
mkdir ~/mangos/db
cd ~/mangos/db/
mysql
CREATE USER 'mangos'@'localhost' IDENTIFIED BY 'mangos';
GRANT ALL PRIVILEGES ON *.* TO 'mangos'@'localhost' WITH GRANT OPTION;
exit;
git clone https://github.com/mangostwo/database.git --recursive
cd database
./InstallDatabases.sh</pre>

<p>
	Select N - Next Step when prompted and fill out the host details.<br />
	<span>You will also be prompted to determine your databases names.</span><br />
	A good practice is to set the realm database name to:
</p>

<pre class="ipsCode">mangos_auth</pre>

<p>
	Also to suffix all others database names with the core versions you are running:<br />
	Examples - mangos_characters2 and mangos_world2
</p>

<p>
	Note: You only need one realm database if you run several cores (M0, M1, etc..) on the same server.<br />
	But you will need two databases (characters and world) for each additional core.
</p>

<pre class="ipsCode">mysql
USE mangos_auth;
UPDATE realmlist SET name = "ServerNameGoesHere" WHERE id = "1";
UPDATE realmlist SET address = "ServerWANIPAddressHere" WHERE id = "1";
exit;</pre>

<h2>
	Step 4: Download and compile <abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr>
</h2>

<pre class="ipsCode">cd ~/mangos
git clone https://github.com/mangostwo/server.git --recursive
cmake -S ~/mangos/server/ -B ~/mangos/build/
cd ~/mangos/build
make -j&lt;# of CPUs/Cores&gt;
make -j&lt;# of CPUs/Cores&gt; install</pre>

<h2>
	Step 5: Copy files
</h2>

<pre class="ipsCode">mkdir /srv/mangos
mkdir /srv/mangos/bin
mkdir /srv/mangos/gamedata/
cd install/bin
cp mangosd /srv/mangos/bin/
cp realmd /srv/mangos/bin/
cp tools/*-extractor /srv/mangos/gamedata/
cp tools/*.sh /srv/mangos/gamedata/
cp tools/offmesh.txt /srv/mangos/gamedata/
	&lt;Aquire gamedata files and copy them to /srv/mangos/gamedata&gt;</pre>

<p>
	<strong><i>&lt;Optional simple FTP setup&gt;</i></strong>
</p>

<pre class="ipsCode">apt-get install vsftpd

vi /etc/vsftpd.conf
	Change: listen=NO to YES
	Uncomment: write_enable=YES
	Add the line: local_root = &lt;path to gamedata folder&gt;

service vsftpd restart
chmod -R a+w /srv/mangos/gamedata</pre>

<p>
	<strong><i>&lt;End optional FTP setup&gt;</i></strong>
</p>

<pre class="ipsCode">cd /srv/mangos/gamedata
chmod a+x ExtractResources.sh
./ExtractResources.sh &lt;This bit takes forever.&gt;</pre>

<h2>
	Step 6: Setup and Configure *.conf files
</h2>

<pre class="ipsCode">cp -R ~/mangos/build/etc /srv/mangos/
cd /srv/mangos/etc
cp ahbot.conf.dist ahbot.conf
cp mangosd.conf.dist mangosd.conf
cp realmd.conf.dist realmd.conf  Update realmd.conf &lt;read file comments for details&gt;
Update mangos.conf &lt;read file comments for details&gt;</pre>

<p>
	<em><b>Suggested tweaks:</b></em>
</p>

<pre class="ipsCode">LogLevel = 1 (Default is 3)
GameType = #
Server realm style
	0 = NORMAL; 1 = PVP; 4 = PVE; 6 = RP; 8 = RPPVP
RealmZone = &lt;read file comments for details&gt;
Ra.Enable = 1 (Default is 0) &lt;This will allow you to remotely access the server console&gt;
	*Use putty in a raw mode to connect to port 3443 of the server.</pre>

<h2>
	Step 7: Start services
</h2>

<p>
	You can start these processes in other ways but I recommend this screen method for starting out. Using screen will allow you to run multiple processes in the background from the same terminal without the need to stay logged in.
</p>

<pre class="ipsCode">screen -S realm -d -m ./realmd
screen -S mangos -d -m ./mangosd</pre>

<h2>
	Step 8: Play the game
</h2>

<pre class="ipsCode">Update %WoWDir%\Data\enUS\realmlist.wtf
	set realmlist &lt;Server Hostname or IP Address&gt;

Open the desktop client and log in with one of the premade user accounts.

	<b>USERNAME		PASSWORD</b>
	ADMINISTRATOR		ADMINISTRATOR
	GAMEMASTER		GAMEMASTER
	MODERATOR		MODERATOR
	PLAYER			PLAYER</pre>

<h2>
	Optional Step 9: Add users
</h2>

<p>
	 From the running <abbr title="Massive Network Game Object Server"><abbr title="Massive Network Game Object Server">mangos</abbr></abbr> server instance: &lt;This is where a remote Putty session comes in handy.&gt;
</p>

<pre class="ipsCode">account create &lt;username&gt; &lt;password&gt;
account set addon &lt;username&gt; #
	(0 - Normal, 1 - The Burning Crusade, 2 - Lich King)</pre>

<p>
	 
</p>
]]></description><guid isPermaLink="false">40013</guid><pubDate>Sun, 05 Sep 2021 15:56:22 +0000</pubDate></item><item><title><![CDATA[Realmd & Mangosd daemons auto-restarter]]></title><link>https://www.getmangos.eu/wiki/documentation/installation-guides/guideslinux/realmd-mangosd-daemons-auto-restarter-r40001/</link><description><![CDATA[<p>
	Hello everyone !
</p>

<p>
	After setting-up your server on a Linux-based distro, you may wonder : 
</p>

<ul>
	<li>
		how to let the realmd &amp; mangosd deamons run on your server with all consoles closed ?
	</li>
	<li>
		how to automatically restart theses daemons if they crash ?
	</li>
	<li>
		how to restart theses dameons ?
	</li>
	<li>
		how to get access to the daemons consoles after having closed all your terminals ?
	</li>
</ul>

<p>
	Well, you are at the right place !
</p>

<hr />
<p>
	<span style="color:#ffffff;"><span style="font-size:26px;">PREREQUISITE</span></span>
</p>

<p>
	The "<span style="font-family:'Courier New', Courier, monospace;">screen</span>" app must be installed and also "gdb" in order to correctly dump chrash data :
</p>

<pre class="ipsCode">
sudo apt install screen gdb</pre>

<hr />
<p>
	<span style="color:#ffffff;"><span style="font-size:26px;">PART 1 : Localize your bin folder</span></span>
</p>

<p>
	Go to a folder where you would like to install the script.
</p>

<p>
	By default mangso should be installed in <span>:</span>
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">/opt/wow/install/mangos/bin</span></pre>

<p>
	<span style="color:#ffffff;"><span style="font-size:26px;">PART 2 : Creating the file</span></span>
</p>

<p>
	Create a file called <span style="font-family:'Courier New', Courier, monospace;">wowadmin.sh.</span>
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">touch wowadmin.sh</span></pre>

<p>
	Make it executable :
</p>

<pre class="ipsCode">
chmod +x wowadmin.sh</pre>

<p>
	Paste the code below in the file  and <u><span style="color:#ffffff;">change the variables</span></u> "<span style="color:#f1c40f;"><span style="font-family:'Courier New', Courier, monospace;">/path/to/your/realmd</span></span>" and "<span style="color:#f1c40f;"><span style="font-family:'Courier New', Courier, monospace;">/path/to/your/mangosd</span></span>" as your real paths to realmd and mangosd :
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<pre class="ipsCode prettyprint lang-html prettyprinted">


<span class="pln">#!/bin/bash

THIS_FULLPATH=$(cd `dirname "${BASH_SOURCE[0]}"` &amp;&amp; pwd -P)/`basename "${BASH_SOURCE[0]}"`
THIS_FOLDERPATH=$(cd `dirname "${BASH_SOURCE[0]}"` &amp;&amp; pwd -P)

APATH=/path/to/your/realmd
WPATH=/path/to/your/mangosd
ASRV_BIN=realmd         #This usually doesnt change. TrinityCore: authserver  MaNGOS: realmd  ArcEmu: whocares?
WSRV_BIN_ORG=mangosd    #This usually doesnt change. TrinityCore: worldserver MaNGOS: mangosd ArcEmu: whocares?
WSRV_BIN=mangosd
WSRV_SCR=mangosd

echo "run" &gt; gdbcommands
echo "shell echo -e \"\nCRASHLOG BEGIN\n\"" &gt;&gt; gdbcommands
echo "info program" &gt;&gt; gdbcommands
echo "shell echo -e \"\nBACKTRACE\n\"" &gt;&gt; gdbcommands
echo "bt" &gt;&gt; gdbcommands
echo "shell echo -e \"\nBACKTRACE FULL\n\"" &gt;&gt; gdbcommands
echo "bt full" &gt;&gt; gdbcommands
echo "shell echo -e \"\nTHREADS\n\"" &gt;&gt; gdbcommands
echo "info threads" &gt;&gt; gdbcommands
echo "shell echo -e \"\nTHREADS BACKTRACE\n\"" &gt;&gt; gdbcommands
echo "thread apply all bt full" &gt;&gt; gdbcommands

DEBUG=false

#WORLD FUNCTIONS
startWorld()
{
    if [ "$(screen -ls | grep $WSRV_SCR)" ]
    then
        echo $WSRV_BIN is already running
    else
        cd $WPATH
        screen -AmdS $WSRV_SCR $THIS_FULLPATH $WSRV_BIN $DEBUG
        echo $WSRV_BIN is alive
    fi
}

restartWorld()
{
    screen -S $WSRV_SCR -X stuff "saveall$(printf \\r)"
    echo saved all characters, and server restart initialized
    screen -S $WSRV_SCR -X stuff "server restart 5$(printf \\r)"
}

stopWorld()
{
    screen -S $WSRV_SCR -X stuff "saveall
    "
    echo saveall sent, waiting 5 seconds to kill $WSRV_BIN
    sleep 5
    screen -S $WSRV_SCR -X kill &amp;&gt;/dev/null
    echo $WSRV_BIN is dead
}

monitorWorld()
{
    echo press ctrl+a+d to detach from the server without shutting it down
    sleep 5
    screen -r $WSRV_SCR
}
#AUTH FUNCTIONS
startAuth()
{
    if [ "$(screen -ls | grep $ASRV_BIN)" ]
    then
        echo $ASRV_BIN is already running
    else
        cd $APATH
        screen -AmdS $ASRV_BIN $THIS_FULLPATH $ASRV_BIN
        echo $ASRV_BIN is alive
    fi
}

stopAuth()
{
    screen -S $ASRV_BIN -X kill &amp;&gt;/dev/null
    echo $ASRV_BIN is dead
}

restartAuth()
{
    stopAuth
    startAuth
    echo $ASRV_BIN restarted
}

monitorAuth()
{
    echo press ctrl+a+d to detach from the server without shutting it down
    sleep 5
    screen -r $ASRV_BIN
}

#FUNCTION SELECTION
case "$1" in
    $WSRV_BIN )
    if [ "$2" == "true" ]
    then
        while x=1;
        do
            gdb $WPATH/$WSRV_BIN --batch -x gdbcommands | tee current
            NOW=$(date +"%s-%d-%m-%Y")
            mkdir -p $THIS_FOLDERPATH/crashes
            mv current $THIS_FOLDERPATH/crashes/$NOW.log &amp;&gt;/dev/null
            killall -9 $WSRV_BIN
            echo $NOW $WSRV_BIN stopped, restarting! | tee -a $THIS_FULLPATH.log
            echo crashlog available at: $THIS_FOLDERPATH/crashes/$NOW.log
            sleep 1
        done
    else
        while x=1;
        do
            ./$WSRV_BIN
            NOW=$(date +"%s-%d-%m-%Y")
            echo $NOW $WSRV_BIN stopped, restarting! | tee -a $THIS_FULLPATH.log
            sleep 1
        done
    fi
    ;;
    $ASRV_BIN )
        while x=1;
        do
            ./$ASRV_BIN
            NOW=$(date +"%s-%d-%m-%Y")
            echo $NOW $ASRV_BIN stopped, restarting! | tee -a $THIS_FULLPATH.log
            sleep 1
        done
    ;;
    "wstart" )
    startWorld
    ;;
    "wdstart" )
    DEBUG=true
    startWorld
    ;;
    "wrestart" )
    restartWorld
    ;;
    "wstop" )
    stopWorld
    ;;
    "wmonitor" )
    monitorWorld
    ;;

    "astart" )
    startAuth
    ;;
    "arestart" )
    restartAuth
    ;;
    "astop" )
    stopAuth
    ;;
    "amonitor" )
    monitorAuth
    ;;
    
    "start" )
    startWorld
    startAuth
    ;;
    "stop" )
    stopWorld
    stopAuth
    ;;
    "restart" )
    restartWorld
    restartAuth
    ;;
    * )
    echo Your argument is invalid
    echo "usage: start | stop | restart | wstart | wdstart | wrestart | wstop | wmonitor | astart | arestart | astop | amonitor"
    exit 1
    ;;
esac</span></pre>

		<p>
			 
		</p>
	</div>
</div>

<hr />
<p>
	<span style="font-size:26px;"><span style="color:#ffffff;">PART 3 : How to use ?</span></span>
</p>

<p>
	You can use the script with its options like :
</p>

<pre class="ipsCode">
./wowadmin.sh start</pre>

<p>
	Available options are :
</p>

<ul>
	<li>
		<span style="font-family:'Courier New', Courier, monospace;"><strong>start </strong></span>: Starts realmd and mangosd - in a screened process.
	</li>
	<li>
		<span style="font-family:'Courier New', Courier, monospace;"><strong>stop</strong> </span>: Stops realmd and mangosd - in a screened process.
	</li>
	<li>
		<span style="font-family:'Courier New', Courier, monospace;"><strong>restart </strong></span>: Retarts realmd and mangosd - in a screened process.
	</li>
	<li>
		<span style="font-family:'Courier New', Courier, monospace;"><strong>wstart</strong> </span>: Starts only mangosd - in a screened process.
	</li>
	<li>
		<strong><span style="font-family:'Courier New', Courier, monospace;">wdstart</span> </strong>: Starts only mangosd in DEBUG mode - in a screened process.
	</li>
	<li>
		<strong><span style="font-family:'Courier New', Courier, monospace;">wrestart </span></strong>: Restarts only mangosd - in a screened process
	</li>
	<li>
		<strong><span style="font-family:'Courier New', Courier, monospace;">wstop </span></strong>: Stops mangosd - screened process.
	</li>
	<li>
		<span style="font-family:'Courier New', Courier, monospace;"><strong>wmonitor</strong></span> : Brings back the mangosd console from the screened process (press "Ctrl+A+D" to re-detach it).
	</li>
	<li>
		<strong><span style="font-family:'Courier New', Courier, monospace;">astart </span></strong>: Starts only realmd - in a screened process.
	</li>
	<li>
		<span style="font-family:'Courier New', Courier, monospace;"><strong>arestart </strong></span>: Restarts only realmd - in a screened process.
	</li>
	<li>
		<strong><span style="font-family:'Courier New', Courier, monospace;">astop </span></strong>: Stops only realmd - in a screened process.
	</li>
	<li>
		<span style="font-family:'Courier New', Courier, monospace;"><strong>amonitor </strong></span>: Brings back the realmd console (press "Ctrl+A+D" to re-detach it).
	</li>
</ul>

<p>
	Moreover, when there is a crash, the daemons will auto-restart dans there will be a crashlog dumped in "<span style="font-family:'Courier New', Courier, monospace;">crashes</span>" directory next to your deamons executable binaries.
</p>

<p>
	For your information, you can see the screened processes by typing :
</p>

<pre class="ipsCode">
screen -ls</pre>

<p>
	You can use multiple wowadmin.sh files if you manage multiple realms but the more simple would be to add specific options in the same script for your differents mangosd dameons as there could be only 1 realmd daemon running and many mangosd daemons running.
</p>

<p>
	<span style="font-size:9px;">Source : adapted from  <a href="https://gist.github.com/Lillecarl/5421446" rel="external nofollow">Lillecarl Gist</a></span>
</p>
]]></description><guid isPermaLink="false">40001</guid><pubDate>Sat, 05 Oct 2019 22:47:50 +0000</pubDate></item></channel></rss>
