A lot of guides I've read contain a whole lot of useless or overly technical information. This is not needed in any way shape or form. So here is a better guide. How to properly and easily download, compile and setup a MaNGOS server of any version using UDB, ScriptDev2 and SD2-ACID.
Why compile your own server? This way you know it is absolutely up-to-date, contains no malicious crap from little kiddies screwing around and will actually work.
Needed Tools
A subversion client (I'll be using
You must be registered to see links
)
You must be registered to see links
You must be registered to see links
You must be registered to see links
(I'll explain the installation later)
An SQL DB editor (I'll be using
You must be registered to see links
).
Downloading MaNGOS
Once you've installed all the programs mentioned in the above section, needed tools. Go ahead and open up
GIT Bash (Not
GIT GUI). First we need to change the directory. Type
cd /c to change it's working directory to the root of your C: drive, otherwise it will download to God knows where (Seriously, I don't know where). Now we can download the latest MaNGOS. Type
git clone git://github.com/mangos/mangos.git mangos. Let it finish and close
GIT Bash. Your server should now be located in
C:\mangos.
Downloading ScriptDev2
Make a new folder somewhere. It doesn't matter where. Open the folder and right click again and click
SVN Checkout. In the field that says
URL of Repository, type in
https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2. Let it finish and click OK.
Compiling MaNGOS
Open
C:\mangos\win\. Open
mangosdVC100.sln in
Visual Studio Express C++ 2010. Once it loads, go to
Build>Configuration Manager now change the
Active solution configuration to
Release and the
Active solution platform to
x64 and click
Close. Now go to
Build>Rebuild Solution. It will seem like it's doing nothing if you do not have the
Output window enabled (
Ctrl+Alt+O). It will take a while to compile.
Compiling ScriptDev2
STOP. Do not do continue until MaNGOS has finished compiling. If you continue on, your server will not work.
Once MaNGOS has finished compiling, copy the your ScriptDev2 folder you downloaded to
C:\mangos\src\bindings. This step is pretty much the same at compiling the core. Open
scriptVC100.sln. Go to
Build>Configuration Manager now change the
Active solution configuration to
Release and the
Active solution platform to
x64 and click
Close. Now go to
Build>Rebuild Solution. This will also take a little while.
Setting Up MYSQL
This part is relatively easy. Install
MYSQL, when it asks you about setting up an instance. Go to
Standard Configuration then click Next. Make sure
Include Bin Directory in Windows PATH is unchecked. Click
Next. Set up your password. It doesn't matter what it is. Most people use root as their password and click Next and let it set itself up.
Setting up the Database
Open
Navicat. Go to
Connection>MYSQL. Type anything for
Connection Name. Type
localhost for
Host Name/IP Address and
3306 for
Port. Type
root for
User Name (MYSQL uses root for the root user) and whatever your password is. Click
OK and connect to the SQL server over in the sidebar by double clicking the connection. Click on
User and go to
New User. For
User Name type
mangos,
localhost for
Host and
mangos for the
Password and click
Save. Now your MaNGOS server can, by default settings, properly connect to the SQL server.
Creating Databases
Now right click on your SQL connection in the sidebar and click
Execute SQL file and browse to
C:\mangos\sql\. Open
mangos.sql and click
Start. Let it finish and click
Close. Repeat that step with
characters.sql and
realmd.sql. Now we need to set up ScriptDev2's database. Do the same as before but browse to
C:\mangos\src\bindings\scriptdev2\sql\ and open
scriptdev2_create_database.sql, execute it and then run
scriptdev2_create_structure.sql.
Populating Databases
Now that we have our databases set up. We need to populate them. There are different ways we can do this but I prefer my server being Blizz-like so I use the UDB database. Download this
You must be registered to see links
. You'll need the browse to
/trunk/Full_DB/ and download the zip file there. Extract it. Open up
Navicat and right click your
mangos database (Not the connection) and go to
Execute SQL File. Browse to the database we just downloaded and extracted and click
Start. This will take a while to finish. Now we need to include ScriptDev2's mangos database. Once again right click on the mangos DB and go to
Execute SQL File and browse to
C:\mangos\src\bindings\scriptdev2\sql\ and execute
mangos_scriptname_full.sql.
Now comes the most annoying part it my opinion. We need to update the databases. In
Navicat, open up the
mangos database and go to
Tables and open the
db_version table. The last field should say something like
required_blahblah. Remember what it says. Now right click the database and click
Execute SQL File and browse to
C:\mangos\sql\updates\ find that file name that we needed to remember (Make sure names are assorted ascending), execute the
next file. Make sure the next file says
mangos and not
realmd or
character. Then execute the next file and so on and so forth until you are at the latest file. Look for the same table in both
realmd and
characters and do the same. Usually you wont need to update
characters or
realmd. Note if you do not do these steps, the server will not work.
Downloading & Installing SD2-ACID
STOP. Do not do continue until you have finished populating your mangos database with UDB and ScriptDev2. If you continue on, your server will not work.
Make a folder anywhere, right click and click
SVN Checkout and type
https://sd2-acid.svn.sourceforge.net/svnroot/sd2-acid/ and click
OK to download
ACID. Once it finishes downloading, open
Navicat and right click on your
mangos database and click
Execute SQL File, browse to
\trunk\wotlk\ in the folder we just downloaded ACID to and open the latest numbered folder and execute the SQL file within.
Extracting DBC, Maps & VMaps
Browse to
C:\mangos\contrib\extractor\release\ and copy
ad.exe to your root
World of Warcraft installation folder. Then go to
c:\mangos\contrib\vmap_extract_assembler_bin\ and copy over all the files. Run
ad.exe and
makevmaps_SIMPLE.bat. Let them finish, it will take a while. Once done, go to
C:\mangos\bin\x64_release\ and make a new folder called
Data. Copy the folders
dbc,
maps and
vmaps from your
World of Warcraft folder into there.
If
ad.exe or the 3 files in
\contrib\vmap_extract_assembler_bin\ are not there, scroll down to the
Compiling Tools section to learn how to compile them.
Configuring Your Server
Browse to
\src\mangos\ and copy
mangosd.conf.dist.in to
\bin\x64_Release\ do the same with
realmd.conf.dist.in in
\src\realmd\ and
scriptdev2.conf.dist.in in
\src\bindings\scriptdev2\. Remove the
.dist.in from the file names. Now open
mangosd.conf, scroll down to
DataDir = and type
"./Data". Scroll down to
BindIP = and type
"127.0.0.1".
LoginDatabaseInfo,
WorldDatabaseInfo and
CharacterDatabaseInfo should be correct by default if you followed this guide correctly.
You can also customize your server by editing values in
mangosd.conf. Every value is explained within the configuration file. Most tutorials explain changes you need to make in the file, fortunately for you, if you followed this guide, you don't need to change anything as we set up the server so, by default settings, we would need to change very little.
Setting Up Your Client
Make sure first you have the proper version of
World of Warcraft installed. Now go to
\World of Warcraft\Data\enUS\ and open
realmlist.wtf in
Notepad and change
set realmlist and
set patchlist to
127.0.0.1.
If you need to update your copy of
World of Warcraft, I suggest looking for the patches you need at
You must be registered to see links
.
Starting Your Server
Go to
\bin\x64_Release\ and start
realmd.exe and
mangosd.exe. If it automatically closes, look for a file in that folder named
Server.log (If
mangosd.exe closed) or
Realmd.log (If
realmd.exe closed), read what happened. If you cannot figure out the problem, PM me and I will tell you what to do. If they did not close, wait till you hear
mangosd.exe make a beep sound. This means it has finished starting.
You can now start World of Warcraft and log in with the
username and
password administrator
Compiling Tools
This section is only if
ad.exe and 3 files in
\contrib\vmap_extract_assembler_bin\ were not there. Go to
\contrib\extractor\ and open
VC100_AD.sln and go to
Build>Rebuild Solution. Once it's finished,
ad.exe should be in
\extractor\release\. Now go to
\contrib\vmap_assembler\ and open
vmap_assemblerVC100.sln, rebuild it and do the same with
vmapExtractor3_VC100.sln in
\contrib\vmap_extractor_v3\win\. Copy the files we just compiled to your
World of Warcraft folder and also copy over
makevmaps_SIMPLE.bat from
\contrib\vmap_extract_assembler_bin\. Now if
makevmaps_SIMPLE.bat is not there, create a notepad document, open it and copy the following:
Code:
vmapExtractor3.exe
md vmaps
vmap_assembler.exe buildings vmaps
pause
Save and close it. Change the extension from .txt to .bat and move it to your
World of Warcraft folder. Now you can extract the
vmaps,
dbc and
maps.
Additional poop
If I left out anything, please feel free to tell me. If you need help, PM me, I will do my best to help you but for the love of God, please use proper grammar. I hate deciphering what people say when they use broken English or teen texting lingo.
This guide can easily be also used for compiling and setting up non-MaNGOS servers, since setting up most servers is relatively the same.
If you require compiling a 32-bit server, follow the guide but when you compile ScriptDev2 and the MaNGOS core just leave the
Active solution configuration and
Active solution platform at
Win32. This will also change the directory of your compiled binaries. They would be in
\mangos\bin\Win32_Release\.
If you are importing a very large database using Navicat, you may run into a problem where the execution gets stuck at like 70 commands, that's cause Navicat sucks at executing large queries. Here's a simple workaround:
Make a copy of the SQL file you need to execute and put it in
C:\Program Files\MySQL\MySQL Server X.X\bin\ (Replace X.X with whatever version folder is in there). Press
Win+R to open the Command Prompt and type
CD C:\Program Files\MySQL\MySQL Server X.X\bin\ (Replace X.X with whatever version folder is in there) then type
mysql -u root -p database_name < FileToExecute.sql, it'll prompt you to enter your MySQL server password (By default it's "root"). It'll only take a couple of seconds this way.
Now that's what I call a Ducking guide.