Credits: Iro_number1
Here is a quick guide on how to compile MaNGOS on a Mandriva Linux.
This guide might also work for other RPM based distributions such as Fedora Linux or CentOS.
All you have to do is change the commands for Package Managers or just use rpm command.
I'm assuming that you have installed a Mandriva Linux with no graphical environment, therefore everything is done via the Command Line.
I'm also assuming that you are on the root account.
A quick note, anywhere you see <something> that means you have to change that and drop the <>.
Here is the list of packages required to compile and run the server:
(Not all packages are listed because many of them get pulled as dependencies. For example, git pulls openssl as a dependency and we don't have to install it anymore.)
Code:
git
autoconf
automake
libtool
gcc
gcc-c++
zlib-devel
openssl-devel
make
nano
mysql-devel
You can install them in few ways, on Mandriva Linux the easiest is using urpmi:
Code:
urpmi git autoconf automake libtool gcc gcc-c++ zlib-devel openssl-devel make nano mysql-devel
On Fedora it would be:
Code:
yum install <packagenames>
Each distribution has it different so just find out which package manager it uses and use that manager instead of urpmi.
If you are asked for any dependencies just hit Y and enter.
Alternatively you can use RPM command, this will work on any RPM based distribution but requires the rpms to be downloaded before hand:
Code:
rpm -ivh <packagename>.rpm
Now navigate to your home directory:
Code:
cd /home/<yourusername>/
You might want to make a directory here to keep all the build in one spot if you ever need to go back to them:
Code:
mkdir <directoryname>
Descend into that directory.
If you already have the mangos directory named mangos, you must delete it using :
or rename it:
Code:
mv mangos <newname>
If you are doing this for the first time just skip this part because there is no directory named mangos.
Now its time to get the MaNGOS source
Code:
git clone git://github.com/mangos/mangos.git
When it finishes "cloning" descend into mangos directory.
Now its time to get all the scripts developed by SD2 team.
First make a directory in the MaNGOS bindings directory:
Code:
mkdir src/bindings/ScriptDev2
Then download the newest revision using Subversion:
Code:
svn co https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2/ src/bindings/ScriptDev2
Now you must apply the ScriptDev2 patch for MaNGOS:
Code:
git apply src/bindings/ScriptDev2/patches/MaNGOS<version of the patch>.patch
You can check which version is there by typing MaNGOS and then hitting TAB the name will be auto completed for you.
If you want to apply any custom patches now is the moment.
Now its time to configure and compile the server.
I'm not going to explain all this because it will take ages so just perform these commands:
Code:
autoreconf --install --force
aclocal
autoheader
autoconf
automake --add-missing
automake src/bindings/ScriptDev2/Makefile
Now create any directory in order to keep the source tree clean:
Code:
mkdir <anyname>
cd <anyname>
Now its time to configure the source tree.
Here is lets say a standard configure flag setup:
Code:
../configure --prefix=/opt/mangos --sysconfdir=/opt/mangos/etc --enable-cli --enable-ra --datadir=/opt/mangos
If you wish to change this you can read the related doc provided by MaNGOS.
Finally compile the source:
This will take a long time depending on your machine.
After that completes all that's left is to install the compiled files into the system.
The framework is installed. Time to hit the configuration files!
Get to the MaNGOS systemfiles directory, in our example /opt/mangos/etc .
Now you need to edit the files in the directory accordingly.
If you need help with that search the forums!
In our example you can uses nano as the cli text editor:
Code:
nano mangosd.conf.dist
Edit and hit CTRL+X to exit when asked press Y to save and change the name to mangosd.conf and press Y when asked again.
Do the same with the other configuration files.
You also need to place the maps and dbc directories in the main MaNGOS directory.
Now you need to create Data Bases and populate them using a Data Base Project such as UDB.
You can now run the server and enjoy
If you want some extra tools I recommend two great ones:
webmin - A system manager for Linux. Allows to control the whole system using a Website.
phpmyadmin - a great tool to manage/edit/create MySQL Data Bases.
Both these tools require apache to be installed beforehand.
Bookmarks