MangosZero Install - Debian: Difference between revisions
No edit summary |
No edit summary |
||
| Line 105: | Line 105: | ||
mkdir mangos-source | mkdir mangos-source | ||
cd mangos-source | cd mangos-source | ||
git clone https://github.com/mangoszero/server | git clone --recursive https://github.com/mangoszero/server | ||
git clone https://github.com/mangoszero/database | git clone --recursive https://github.com/mangoszero/database | ||
</pre> | </pre> | ||
Revision as of 20:32, 18 November 2014
This howto will be on how to get MangosZero running on Debian in VirtualBox as Windows 7 64 Bit as the host
Installing VirtualBox
This part should be self-explanatory, I may recap on certain settings like BIOS and other default settings
Starting up Virtual box and Installing the base operating system
Create a new virtual machine, I'm going with a 64-bit install with Debian 7.2.0 ISOs. 512MB ram, create a 20GB dynamic partition. After the new virtual machine has been set up, give the server 12MB of video ram which is more than enough to run a server.
Start the server, and select your settings as you wish.
When installing packages, only install what you need because we want this server to be as trim as possible. No Desktop, XWindow or gui, just a straight server.
On the Software Selection screen, Unselect Everything but the standard system utilities.
Install the Grub boot loader
Setting up Build Environment for Mangos
Login as root, we need to install a few things first. After looking at top, I only have 58 processes total running and about 56k of RAM used. not bad at all. We want the OS to be as trim as possible, that is one of the goals for this article.
As root, type in:
apt-get install sudo
After install of sudo, edit the /etc/sudoers file and add your username
edit /etc/sudoers Add under 'User Privilege Section' underneath root username ALL=(ALL:ALL) ALL Exit and save
Now type in exit and go back to your username. You should have sudo rights now.
Type in these commands to establish a build environment
sudo apt-get install -y autoconf automake clang cmake gcc g++ libtool make patch sudo apt-get install -y cmake-curses-gui git-core
I had an issue with these commands not being found so I had to add the default repos in /etc/apt/sources.list
deb http://http.debian.net/debian wheezy main deb-src http://http.debian.net/debian wheezy main deb http://http.debian.net/debian wheezy-updates main deb-src http://http.debian.net/debian wheezy-updates main deb http://security.debian.org/ wheezy/updates main deb-src http://security.debian.org/ wheezy/updates main
Installing the Development headers
sudo apt-get install -y libace-dev libbz2-dev libmysqlclient-dev libncurses5-dev libreadline-dev libssl-dev zlib1g-dev
Installing the Database Server (MySQL)
sudo apt-get install -y libace-dev libbz2-dev libmysqlclient-dev libncurses5-dev libreadline-dev libssl-dev zlib1g-dev
Set the root password for the MySQL server
Creating and Setting Permissions for MySQL User
mysql -u root -p CREATE USER 'mangos'@'localhost' IDENTIFIED BY 'password';
for Password, use whatever you want and for user mangos, use whatever you want.
GRANT ALL PRIVILEGES ON `mangos\_%` . * TO 'mangos'@'localhost'; GRANT USAGE ON * . * TO 'mangos'@'localhost' IDENTIFIED BY 'password' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
again for username and password, use whatever you want, just ensure they match
Creating the Mangos Databases
mysql -u root -p CREATE DATABASE `mangoZ_characters` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE `mangoZ_realm` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE `mangoZ_scripts` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE `mangoZ_world` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; FLUSH PRIVILEGES ;
Downloading the Mangos-Zero Source from github and compiling
While you are in user mode and not root, create the mangos source directory
cd ~ mkdir mangos-source cd mangos-source git clone --recursive https://github.com/mangoszero/server git clone --recursive https://github.com/mangoszero/database
Compiling Mangos
create the directories needed for build
sudo mkdir -p /opt/mangos-zero/ sudo mkdir -p /opt/mangos-zero/logs/mangos-zero/ sudo mkdir -p /opt/mangos-zero/share/mangos-zero/
cd server mkdir _build cd _build cmake -DCMAKE_INSTALL_PREFIX=/opt/mangos-zero -DCMAKE_BUILD_TYPE=Debug -DWITH_MOD_LUA=1 -DWITH_MOD_SCRIPTDEV2=1 ..
Now in the ~/mangos-source/server/_build directory
sudo make