krampf_
-
Posts
11 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Content Type
Profiles
Bug Tracker
Wiki
Release Notes
Forums
Downloads
Blogs
Events
Posts posted by krampf_
-
-
*********
NOTE: The MaNGOS source repositories URLs have changed. Cataclysm 4.3.4 is now the master and WoTLK 3.3.5a has been moved to MaNGOS-wotlk. Refer to the Announcements section and the "mangos source/projects list" stickied there for details.
*********
Since I find myself always looking for this guild and most of those out there are a bit dated; here is my attempt. This example assumes you are starting from your user's home directory.
Installing necessary packages to compile and run MaNGOS
sudo apt-get install build-essential gcc g++ automake git-core autoconf make patch libmysql++-dev mysql-server libtool libssl-dev grep binutils zlibc libc6 libbz2-dev cmake
Grabbing the source code of MaNGOS and ScriptDev2. I create a directory called mangos rather than dumping it in your home directory.
mkdir mangos cd mangos git clone git://github.com/mangos/server.git cd server git clone git://github.com/mangos/scripts.git src/bindings/ScriptDev2
Patching SD2 into MaNGOS
git apply src/bindings/ScriptDev2/patches/MaNGOS-*-ScriptDev2.patch
Compiling (with an install dir of /opt/mangos-server) Note: If /opt/mangos-server does not exist, create it and chown to the user you compile your code with
mkdir objdir cd objdir cmake .. -DPREFIX=/opt/mangos-server make make install
Extracting dbc, maps, vmaps.
Copy the contents of the server/contrib/extractor_binary directory to your WoW client directory. Then run the following:
C:\\Users\\Public\\Games\\World of Warcraft>ad.exe C:\\Users\\Public\\Games\\World of Warcraft>vmapExtractor4 C:\\Users\\Public\\Games\\World of Warcraft>vmap_assembler.exe buildings vmaps
You can also just run the ExtractResources.sh; however need to install git bash or some other shell to run under Windows
I like to create a directory just for these files called data in your /opt/mangos-server directory. Move the directories (dbc, maps, and vmaps) that were created with the aforementioned windows commands to your /opt/mangos-server/data directory. (note: the directory location of your data files is set in your /opt/mangos-server/etc/mangosd.conf file) You can delete the files you copied from /contrib/extractor_binary and the directories when finished as they are not needed to run the client.
Grabbing the database.
cd ~/mangos git clone git://github.com/mangos/database.git
Configuring the Databases
There are four databases that need to be set up. Characters, mangos, and realmd are found in your sql directory; ScriptDev2 is in your src/bindings/ScriptDev2/sql directory
Creating the databases and base structure
cd ~/mangos/server/sql mysql -u root -p < create_mysql.sql mysql -u root -p characters < characters.sql mysql -u root -p mangos < mangos.sql mysql -u root -p realmd < realmd.sql
ScriptDev2 Database
cd ~/mangos/server/src/bindings/ScriptDev2/sql mysql -u root -p < scriptdev2_create_database.sql mysql -u root -p scriptdev2 < scriptdev2_create_structure_mysql.sql mysql -u root -p scriptdev2 < scriptdev2_script_full.sql
MaNGOS Database
cd ~/mangos/database ./make_full_db.sh mysql -u root -p mangos < full_db.sql
Configuration files
Finally before running the server, you need to modify the .conf files in /opt/mangos-server/etc directory. First copy the mangosd.conf.dist, realmd.conf.dist and scriptdev2.conf.dist to just *.conf
cd /opt/mangos-server/etc cp mangosd.conf.dist mangosd.conf cp realmd.conf.dist realmd.conf cp scriptdev2.conf.dist scriptdev2.conf
These files contain the information on how the server talks to the database, what ip and port your server runs on, and various other customizable game settings.
Here is the first few lines of my mangosd.conf file (of course with my password and actual domain removed). If you run your database on a seperate server, remember to change 127.0.0.1 to reflect the database server's correct IP address.
RealmID = 1 DataDir = "/opt/mangos-server/data" LogsDir = "/opt/mangos-server/logs" LoginDatabaseInfo = "127.0.0.1;3306;mangos;PASSWORD;realmd" WorldDatabaseInfo = "127.0.0.1;3306;mangos;PASSWORD;mangos" CharacterDatabaseInfo = "127.0.0.1;3306;mangos;PASSWORD;characters" LoginDatabaseConnections = 1 WorldDatabaseConnections = 1 CharacterDatabaseConnections = 1 MaxPingTime = 30 WorldServerPort = 8085 BindIP = "mangos.YOURDOMAIN.com"
If you don't want your server to be seen from the outside world, you can just use the IP address in the BindIP variable. To get your sever seen from the outside, I modified my /etc/hosts file and added
192.168.0.2 mangos.YOURDOMAIN.com
You will also need to modify your DNS so your routable IP gets resolved to mangos.YOURDOMAIN.com as well. I just created a CNAME record for my mangos.XXXXXX.com
Server Logs
As you notice, I configure logging as it is helpful in troubleshooting. Create /opt/mangos-server/logs directory. Then set "LogsDir = "/opt/mangos-server/logs"" in your mangosd.conf and realmd.conf files.
Need to also modify your realmd database, realmlist table, address record. Unlike WotLK, this MUST be the IP address of the server.
Router config
If you want to share this server with the outside world you will need to forward TCP 8085 and TCP 3724 for mangosd and realmd, respectively to your server.
Client Configuration
Need to modify "World of Warcraft\\Data\\enUS\\realmlist.wtf" to point to your server.
set realmlist mangos.YOURDOMAIN.com set patchlist mangos.YOURDOMAIN.com set realmlistbn "" set portal us
Also if you are using mangos.YOURDOMAIN.com in your .conf files, you either need to make sure your DNS has your server IP pointing to mangos.YOURDOMAIN.com or you can modify your C:\\Windows\\System32\\drivers\\etc\\hosts file to include the same line you put on your server's /etc/hosts file.
Remember to run Wow.exe and not Launcher.exe when starting the client. Running Launcher.exe will start a patch process and you do not what this to happen.
To update source code and database
cd ~/mangos/server git pull cd src/bindings/ScriptDev2 git pull cd ~/mangos/database git pull
Running the server using screen. Create the following two files and make them +x (chmod +x {filename}) and place them in /usr/local/bin
mangos-world
#!/bin/sh cd /opt/mangos-server/bin screen -A -m -d -S mangosworld ./mangosd
mangos-realm
#!/bin/sh cd /opt/mangos-server/bin screen -A -m -d -S mangosrealm ./realmd
[Wiki] How to Compile on Linux (Ubuntu)
in Wiki Articles
Posted
Thanks for the typo catch. I was planning on adding to the guild, but was getting late for me. Will add extract, database, and some basic config today.