How to install & run C(ontinued)-MaNGOS from source code
The following variables are used in this document:
db-new-password - You new MariaDB password for new user with root privilegesIf you are an absolute beginner to programming and compiling then you may want to go through the Beginner’s Guide first.
| CMaNGOS: site | forum | git repositories | discord |
| Classic-DB: forum | git repository |
sudo apt update
sudo apt install build-essential automake git cmake default-libmysqlclient-dev libtool libssl-dev zlibc libbz2-dev subversion libboost-all-dev
or full list without dependencies:
sudo apt install grep build-essential gcc g++ automake git autoconf make patch cmake default-libmysqlclient-dev libtool libssl-dev binutils zlibc libc6 libbz2-dev subversion libboost-all-dev
sudo apt install mariadb-server
sudo apt-get install software-properties-common dirmngr
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64] http://mariadb.mirror.serveriai.lt/repo/10.4/debian buster main'
sudo apt update
sudo apt upgrade
sudo apt install mariadb-server
Check all available versions and mirrors on the official MariaDB Foundation page
sudo mysql_secure_installation
The script will prompt you to determine which actions to perform
Enter current password for root (enter for none):
ENTER
Switch to unix_socket authentication [Y/n]
N
This request become available only if you installed the latest version from MariaDB repositories
You already have your root account protected with unix_socket authentication, so you can safely answer ‘n’
Set root password? [Y/n]
N
In Debian, the root account for MariaDB is tied closely to automated system maintenance, so we should not change the configured authentication methods for that account.
You already have your root account protected with unix_socket authentication, so you can safely answer ‘n’
Remove anonymous users? [Y/n]
Y
Disallow root login remotely? [Y/n]
Y
Remove test database and access to it? [Y/n]
Y
Reload privilege tables now? [Y/n]
Y
dbadmin with password db-new-password for password access (e.g. for remote full access to the database through SSH-tunnel)
sudo mysql
MariaDB [(none)]>
GRANT ALL ON *.* TO 'dbadmin'@'localhost' IDENTIFIED BY 'db-new-password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT
Don’t forget to change the db-new-password variable to a really complicated password! ![]()
sudo adduser mangos
su mangos
mkdir /home/mangos/source
cd /home/mangos/source
git clone git://github.com/cmangos/mangos-classic.git
git clone git://github.com/cmangos/classic-db.git
mkdir /home/mangos/source/build
cd /home/mangos/source/build
-DCMAKE_INSTALL_PREFIX=\ Path where the server should be installed to
-DPCH=1 Use precompiled headers (much faster after updates)
-DDEBUG=0 Remove debug mode from compiling
-DBUILD_EXTRACTORS=ON Build map/dbc/vmap/mmap extractor
-DBUILD_PLAYERBOT=ON Build with playerbots mod enabled
Example1: command to just compile mangos-classic and install in /home/mangos/wow-vanilla-run dir:
cmake ../mangos-classic -DCMAKE_INSTALL_PREFIX=\../../wow-vanilla-run -DPCH=1 -DDEBUG=0
Example2: command to compile same as in Example1 + build map extraction tools:
cmake ../mangos-classic -DCMAKE_INSTALL_PREFIX=\../../wow-vanilla-run -DBUILD_EXTRACTORS=ON -DPCH=1 -DDEBUG=0
Example3: command to compile same as in Example1 + build map extraction tools + playerbots mod
cmake ../mangos-classic -DCMAKE_INSTALL_PREFIX=\../../wow-vanilla-run -DBUILD_EXTRACTORS=ON -DPCH=1 -DDEBUG=0 -DBUILD_PLAYERBOT=ON
cmake ../mangos-classic -DCMAKE_INSTALL_PREFIX=\../../wow-vanilla-run -DBUILD_EXTRACTORS=ON -DPCH=1 -DDEBUG=0 -DBUILD_PLAYERBOT=ON
(installing in the /home/mangos/wow-vanilla-run dir, with map extraction tools and enabled playerbots mod)
make
make install