Jump to content
Sign in to follow this  
Guest TheLuda

[WIP] Installing mangos-zero on Debian / Ubuntu

Recommended Posts

So you want to run mangos-zero on a Debian or Ubuntu server? Then this

guide is for you. Here you will learn how to properly install all dependencies,

and build mangos-zero for Debian 7 and Ubuntu 12.04.3 LTS server.

Introduction

We do assume that you already have a basic minimal installation of Debian or

Ubuntu available, and can login via SSH to an account which may install packages

and make changes to the system configuration.

Note: throughout the guide I will use the sudo command

to execute commands with administrative rights. This is only needed if you do not

work as root user.

1. Install build environment

1.1 Install compilers and tools

sudo apt-get install -y autoconf automake clang cmake gcc g++ libtool make patch
sudo apt-get install -y cmake-curses-gui git-core

1.2 Install development headers and files

sudo apt-get install -y libace-dev libbz2-dev libmysqlclient-dev libncurses5-dev libreadline-dev libssl-dev zlib1g-dev

2. Install database server

sudo apt-get install -y mysql-client mysql-server

2.1 Create users for mangos-zero

Now login to you MySQL installation as root user to setup

MySQL user, privileges and databases for mangos-zero.

CREATE USER 'mangos'@'localhost' IDENTIFIED BY 'password';

Of course, you can use a different username/password combination, too.

2.2 Grant access to the mangos user

Here we grant wildcard access to any database named mangos_... for our user.

GRANT ALL PRIVILEGES ON `mangos\_%` . * TO 'mangos'@'localhost';
GRANT USAGE ON * . * TO 'mangos'@'localhost' IDENTIFIED BY 'password' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;

Again, if you use a different username/password combination, replace the user

'mangos'@'localhost' with your user.

2.3 Creating databases

For mangos-zero, we do require four databases, one for authentication, world

server, script library, and finally one for character data.

CREATE DATABASE `mangos_characters` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE DATABASE `mangos_realm` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE DATABASE `mangos_scripts` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE DATABASE `mangos_world` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

2.4 Making our user work

As MySQL keeps users and privileges cached, we need to tell it to refresh the

data.

FLUSH PRIVILEGES ;

3. Building mangos-zero

First, we will create a directory to hold all mangos-zero sources.

mkdir ~/mangos-zero/
cd ~/mangos-zero/

3.1 Checking out from github

Now let us fetch both the server (which includes scripting) and the database.

git clone [url]https://github.com/mangoszero/server.git[/url]
git clone [url]https://github.com/mangoszero/database.git[/url]

3.2 Building

Building mangos-zero is simple, thanks to CMake.

cd ~/mangos-zero/server/
mkdir _build
cd _build
cmake -DCMAKE_INSTALL_PREFIX=/opt/mangos-zero -DCMAKE_BUILD_TYPE=Debug -DWITH_MOD_LUA=0 -DWITH_MOD_SCRIPTDEV2=1 ..

Please note that you have to create the target directory specified via CMAKE_INSTALL_PREFIX yourself.

sudo mkdir -p /opt/mangos-zero/
sudo mkdir -p /opt/mangos-zero/logs/mangos-zero/
sudo mkdir -p /opt/mangos-zero/share/mangos-zero/

We do create directories for logs, and data files here too. The /opt/mangos-zero/share/mangos-zero/

will later hold data extracted from the World of Warcraft game client (version 1.12.1).

Now that we have all directories created, we build mangos-zero by running

cd ~/mangos-zero/server/_build/
make

3.3 Installation

Installing mangos-zero is easy

cd ~/mangos-zero/server/_build/
sudo make install

4. Configuration

Configuration templates will be available in /opt/mangos-zero/etc/ by now. Copy each .conf.dist

file to a .conf file.

sudo cp /opt/mangos-zero/etc/ahbot.conf.dist /opt/mangos-zero/etc/ahbot.conf
sudo cp /opt/mangos-zero/etc/mangosd.conf.dist /opt/mangos-zero/etc/mangosd.conf
sudo cp /opt/mangos-zero/etc/realmd.conf.dist /opt/mangos-zero/etc/realmd.conf
sudo cp /opt/mangos-zero/etc/scriptdev2.conf.dist /opt/mangos-zero/etc/scriptdev2.conf

You will have to edit paths and database settings.

5. Databases

5.1 Creating the database structures

5.2 Importing game content

6. Extracting client data

Share this post


Link to post
Share on other sites

This guide looks like an excellent start.

Trying to set up a server now and it helped in a few areas already. Please finish up the rest! <3

Share this post


Link to post
Share on other sites

Not before the weekend, December is too work intense, so that under I hardly have spare time :(

Share this post


Link to post
Share on other sites
Sign in to follow this  

Contact Us

To contact us click here
You can also email us at [email protected]

Privacy Policy | Terms & Conditions

Repositories

The Link to the master list
of MaNGOS repositories:
Copyright © getMaNGOS. All rights Reserved.

This website is in no way associated with or endorsed by Blizzard Entertainment®
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use