How to Build and Maintain a Private World of Warcraft Server on Linux

Begin by installing all of the packages required for compilation., Accept the yes/no prompt., Navigate to your home folder, cd /home/yourusername., Now you must download the source code for the Trinity server., Go to the new directory named...

45 Steps 4 min read Advanced

Step-by-Step Guide

  1. Step 1: Begin by installing all of the packages required for compilation.

    These are easily installed with this command: sudo apt-get install build-essential cmake libace-dev libmysql++-dev subversion mercurial openssl libssl-dev zlib1g-dev libmysqlclient15-dev libtool mysql-client unrar.
  2. Step 2: Accept the yes/no prompt.

    This will install the packages to your computer. , Make three folders, named bin, src and db.

    The commands are mkdir bin, mkdir src and mkdir db. , Go to the "src" directory with CD src and type the command hg clone http://www.bitbucket.org/KingPin/trinitycore/ For TC1 (2.4.3) or hg clone http://www.bitbucket.org/KingPin/trinitycore2/ for TC2 (3.0.9). , Go to the build directory with cd build. , There are several ways to configure the process, but this guide will assume that you are using MySQL for the server's database needs and that you want the default configuration.

    Type the command cmake ../
    -DPREFIX=/home/yourusername/bin. , If you want the build process to go faster, you can first type make genrev and then make
    -j3 or make
    -j5.

    This works best on dual-core processors and quad-core processors respectively. ,, This will copy the necessary executable files to the /home/yourusername/bin directory. , There are a number of tools in the "src/trinitycore/contrib/" directory that serve this purpose. , copy it to the WoW root directory (example:
    C:\Program Files\World of Warcraft\) and run it.

    Copy the two new directories, "dbc" and "maps" to the /home/yourusername/bin/bin/ directory on the Linux computer.

    Check your hard drive space before running ad.exe, however.

    The program requires at least
    1.5GB of space before running., Run the file "makevmaps_SIMPLE.bat" and copy the new directory "vmaps" to the /home/yourusername/bin/bin/ directory on the Linux computer.

    Remove the "buildings" directory.

    Remember, makevmaps takes even more hard drive space than ad.exe, it requires at least 2GB., Go to your home directory with cd /home/yourusername and type the command svn checkout http://svn.assembla.com/svn/trinitydatabase/ db. , This directory contains SQL dumps that must be inserted into the MySQL database.

    This guide will not provide any examples of inserting SQL queries.

    You may, of course, use whatever MySQL interface you prefer. , Execute the script "characters.sql" in the characters database and execute the script "realmd.sql" in the realmd database.

    Both of these can be obtained from the src/trinitycore/sql directory.,, These files are called core updates.

    They must be applied to their corresponding databases in the correct order from number 1098 and up(TC1) or 1733 and up(TC2). , Make the id 1, name servername, address externalipaddress, port 8085, icon 0, color 0, timezone 8, allowedSecurityLevel 0, population
    0., The two files in here act as configuration files for the server.

    They must be renamed to work, so remove the trailing ".dist" at the end of the filename.(If they don't have the .dist extension, you need to turn off the "hide extensions for known filetypes" option (google it) Now open the file "trinitycore.conf"., Make sure it is the same as you just put in the database. , These must be set to the username and password of your MySQL database.

    Replace the ";trinity;trinity;" with ";username;password;"., These must be changed from 0 to
    1., Fix the "DatabaseInfo" options as you did in the previous file.,, Do the same again except type ./trinity-realm., To connect with your WoW client, simply access the file "realmlist.wtf" in the WoW root directory (2.4.3) or World of Warcraft\Data\{locale} (enUS or enGB for example)(3.0.9) and change it's contents to "set realmlist computeripaddress".

    When you connect with your client, it should connect to the Trinity server!,,, Type the command hg pull and then hg update.(This can also be done in one step by using hg pull
    -u) This will download the latest source code. ,, If you were previously on revision 1312, and a file that begins with 1313 is present, apply it and everything above.

    It is advisable to keep note of the latest file before doing step
    31., Apply the new files named "updatepack" in ascending numerical order to the world database.

    Ignore the "corepatch" files. , Simply start the binaries and enjoy.
  3. Step 3: Navigate to your home folder

  4. Step 4: cd /home/yourusername.

  5. Step 5: Now you must download the source code for the Trinity server.

  6. Step 6: Go to the new directory named "trinitycore" with cd trinitycore and create a new folder named "build" with mkdir build.

  7. Step 7: Configure the build process with the cmake command.

  8. Step 8: Begin the build process with the make command.

  9. Step 9: When the process is done

  10. Step 10: it should look like the image on the right.

  11. Step 11: Type the command make install.

  12. Step 12: Now that you have built the server program

  13. Step 13: you must retrieve the game data from World of Warcraft itself.

  14. Step 14: Go to the "extractor" directory and find "ad.exe".

  15. Step 15: Go to the "vmap_extract_assembler_bin" directory and copy all the present files to the WoW root directory.

  16. Step 16: Now that you have the server and the data

  17. Step 17: you need a database to store the players and creatures.

  18. Step 18: Go to the /home/yourusername/db/trunk directory.

  19. Step 19: Create three new databases

  20. Step 20: "world"

  21. Step 21: "characters" and "realmd".

  22. Step 22: Extract the "full_database/TDB0.0.2.rar(TC1) or TDB0.0.3(TC2)" and execute the "TDBlatestversion.sql" to the world database.

  23. Step 23: Go to the /home/yourusername/src/trinitycore/sql/updates directory.

  24. Step 24: Add a new row to the table "realmlist" in the realmd database.

  25. Step 25: Go to the /home/yourusername/bin/etc directory.

  26. Step 26: Scroll down a bit until you find the "RealmID" option.

  27. Step 27: Find the "DatabaseInfo" options

  28. Step 28: a few rows down.

  29. Step 29: under "Performance Settings" the "vmap.enableLOS" and "vmap.enableHeight" options.

  30. Step 30: Open the "trinityrealm.conf" file.

  31. Step 31: Explore the different options in the files

  32. Step 32: and set them to your liking.

  33. Step 33: When you are done

  34. Step 34: open a terminal window to /home/yourusername/bin/bin and type the command ./trinity-core.

  35. Step 35: You now have a working Trinity server!

  36. Step 36: Now that your server is up and running

  37. Step 37: you will want to learn how to properly update it.

  38. Step 38: Shut down the server by pressing CTRL+C in the terminal windows.

  39. Step 39: Open a terminal

  40. Step 40: and go to the /home/yourusername/src/trinitycore directory.

  41. Step 41: Repeat steps 5-9.

  42. Step 42: Go to the /home/yourusername/src/trinitycore/sql/updates directory

  43. Step 43: and apply all new sql files to their corresponding databases.

  44. Step 44: Go to the /home/yourusername/db/trunk/updates directory.

  45. Step 45: Now your server and database are updated.

Detailed Guide

These are easily installed with this command: sudo apt-get install build-essential cmake libace-dev libmysql++-dev subversion mercurial openssl libssl-dev zlib1g-dev libmysqlclient15-dev libtool mysql-client unrar.

This will install the packages to your computer. , Make three folders, named bin, src and db.

The commands are mkdir bin, mkdir src and mkdir db. , Go to the "src" directory with CD src and type the command hg clone http://www.bitbucket.org/KingPin/trinitycore/ For TC1 (2.4.3) or hg clone http://www.bitbucket.org/KingPin/trinitycore2/ for TC2 (3.0.9). , Go to the build directory with cd build. , There are several ways to configure the process, but this guide will assume that you are using MySQL for the server's database needs and that you want the default configuration.

Type the command cmake ../
-DPREFIX=/home/yourusername/bin. , If you want the build process to go faster, you can first type make genrev and then make
-j3 or make
-j5.

This works best on dual-core processors and quad-core processors respectively. ,, This will copy the necessary executable files to the /home/yourusername/bin directory. , There are a number of tools in the "src/trinitycore/contrib/" directory that serve this purpose. , copy it to the WoW root directory (example:
C:\Program Files\World of Warcraft\) and run it.

Copy the two new directories, "dbc" and "maps" to the /home/yourusername/bin/bin/ directory on the Linux computer.

Check your hard drive space before running ad.exe, however.

The program requires at least
1.5GB of space before running., Run the file "makevmaps_SIMPLE.bat" and copy the new directory "vmaps" to the /home/yourusername/bin/bin/ directory on the Linux computer.

Remove the "buildings" directory.

Remember, makevmaps takes even more hard drive space than ad.exe, it requires at least 2GB., Go to your home directory with cd /home/yourusername and type the command svn checkout http://svn.assembla.com/svn/trinitydatabase/ db. , This directory contains SQL dumps that must be inserted into the MySQL database.

This guide will not provide any examples of inserting SQL queries.

You may, of course, use whatever MySQL interface you prefer. , Execute the script "characters.sql" in the characters database and execute the script "realmd.sql" in the realmd database.

Both of these can be obtained from the src/trinitycore/sql directory.,, These files are called core updates.

They must be applied to their corresponding databases in the correct order from number 1098 and up(TC1) or 1733 and up(TC2). , Make the id 1, name servername, address externalipaddress, port 8085, icon 0, color 0, timezone 8, allowedSecurityLevel 0, population
0., The two files in here act as configuration files for the server.

They must be renamed to work, so remove the trailing ".dist" at the end of the filename.(If they don't have the .dist extension, you need to turn off the "hide extensions for known filetypes" option (google it) Now open the file "trinitycore.conf"., Make sure it is the same as you just put in the database. , These must be set to the username and password of your MySQL database.

Replace the ";trinity;trinity;" with ";username;password;"., These must be changed from 0 to
1., Fix the "DatabaseInfo" options as you did in the previous file.,, Do the same again except type ./trinity-realm., To connect with your WoW client, simply access the file "realmlist.wtf" in the WoW root directory (2.4.3) or World of Warcraft\Data\{locale} (enUS or enGB for example)(3.0.9) and change it's contents to "set realmlist computeripaddress".

When you connect with your client, it should connect to the Trinity server!,,, Type the command hg pull and then hg update.(This can also be done in one step by using hg pull
-u) This will download the latest source code. ,, If you were previously on revision 1312, and a file that begins with 1313 is present, apply it and everything above.

It is advisable to keep note of the latest file before doing step
31., Apply the new files named "updatepack" in ascending numerical order to the world database.

Ignore the "corepatch" files. , Simply start the binaries and enjoy.

About the Author

S

Shirley Wilson

Writer and educator with a focus on practical pet care knowledge.

41 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: