How To Compile Trinity Core 3.3.5a On Debian 11 – Step By Step Tutorial

PrivateDonut

Account Closed
banned
Rep
3
0
0
Rep
3
Vouches
0
0
0
Vouches
0
Posts
533
Likes
444
Bits
2 YEARS
2 YEARS OF SERVICE
LEVEL 31 71 XP
Welcome to my step-by-step tutorial on how to compile Trinity Core 3.3.5a on Debian 11.

Step 1: Requirements To Begin​

Step 2: Logging Into Debian via Termius​

If you already know how to connect to your server via ssh, you can skip this part. I decided to use termius for this tutorial simply because it is cross platform and anyone can follow along with this tutorial. Now that you have all the tools needed to follow along with this tutorial, let’s begin.

Logging Into the server:

You’ll need to enter your server IP into the field shown in the circle and click Create host.

Screen-Shot-2023-01-08-at-3.57.07-PM-1024x634.png


Once you created the host, you’ll see the following screen where you’ll need to enter your username and password to connect to your server.

Screen-Shot-2023-01-08-at-4.01.44-PM-1024x741.png

Once you have configured your username and password, simply double-click the host you just created to login into the server via ssh.

Step 3: Creating A User​

Let’s create a separate user, we will use to compile and manage our trinity core server from. We will call this user trinitycore for the sake of this tutorial, but you can name it whatever you’d like.

sudo adduser trinitycore
Screen-Shot-2023-01-08-at-4.16.03-PM.png

Now you’d need to give this newly created user sudo permissions in order to follow along with this tutorial.

sudo usermod -aG sudo trinitycore
Screen-Shot-2023-01-08-at-4.20.07-PM.png

Now let’s switch over to the new user we just created and gave sudo permissions. Use the password you decided on when creating the user.

Screen-Shot-2023-01-08-at-4.21.28-PM.png

Now you’ll want to change to your Directory that belongs to this user.
cd /home/trinitycore/
Please be aware that it is generally considered best practice to avoid using the root username and to refrain from granting sudo permissions to new users, as they are not usually necessary. However, for the purposes of this tutorial, I have demonstrated how to do so.

Step 4: Updating The Server And Installing Required Tools​

Now you are ready to update your server and install the required tools to compile trinity core.

sudo apt-get update && sudo apt-get upgrade
Screen-Shot-2023-01-08-at-4.27.58-PM-1024x642.png

Now that your server is updated, you are ready to install the required software to compile trinity core.

sudo apt-get install git clang cmake make gcc g++ libmariadb-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev libboost-all-dev mariadb-server p7zip default-libmysqlclient-dev p7zip-full
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang 100
Screen-Shot-2023-01-08-at-4.29.22-PM-1024x905.png

Enter ‘Y’ and the installation process for the software may take a moment to complete.

Step 5: Cloning Trinity Core From Github & Compiling​

Now that you have the necessary tools for the job. You can clone TrinityCore from GitHub.

Screen-Shot-2023-01-08-at-4.35.50-PM-1024x273.png

We will know go to the trinity core folder just cloned and make a build directory.

cd TrinityCore
mkdir build
cd build
Screen-Shot-2023-01-08-at-4.38.29-PM.png

Before we begin the compilation process, we need to determine the number of cores in our CPU. As shown in the example below, my server has 8 cores. However, the number of cores on your server may be different, so use the number that corresponds to your server.

nproc --all
Screen-Shot-2023-01-08-at-4.41.03-PM.png

We are now ready to use cmake to prepare the source code. The command below will set the server directory to /home/trinitycore/Server.

cmake ../ -DCMAKE_INSTALL_PREFIX=/home/trinitycore/Server -DTOOLS=0
Screen-Shot-2023-01-08-at-4.46.21-PM-1024x43.png

Remember the number of cores in your CPU. You will need to input that information here by replacing ‘X’ with the number of cores. For example, if your server has 8 cores, you would enter ‘8’

make -j X
sudo make install
You are now compiling trinity core. This may take awhile depending on the resources available on your server.



Screen-Shot-2023-01-08-at-5.02.12-PM-1024x202.png
 
Last edited:
Liked By 3 members :

PrivateDonut

Account Closed
banned
Rep
3
0
0
Rep
3
Vouches
0
0
0
Vouches
0
Posts
533
Likes
444
Bits
2 YEARS
2 YEARS OF SERVICE
LEVEL 31 71 XP

Step 6: Setting up MySQL​

We will now go ahead and setup our mysql database for our server, and connect to it using the following command. There is no password by default.

sudo mysql -u root -p
Screen-Shot-2023-01-08-at-5.48.31-PM-1024x320.png

Now that you have connected to your database, you will need to run some queries.

CREATE USER 'trinity'@'localhost' IDENTIFIED BY 'trinity' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;

GRANT USAGE ON * . * TO 'trinity'@'localhost';

CREATE DATABASE `world` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

CREATE DATABASE `characters` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

CREATE DATABASE `auth` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

GRANT ALL PRIVILEGES ON `world` . * TO 'trinity'@'localhost' WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON `characters` . * TO 'trinity'@'localhost' WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON `auth` . * TO 'trinity'@'localhost' WITH GRANT OPTION;
These queries will create a new user with the name trinity, and password trinity. It will also create three new databases ‘auth’, ‘characters’ and ‘world’.

Now that we have our database ready, we will need to visit the trinity core release section of GitHub. You will need to download the latest version, as of right now it’s TDB 335.22101. We will only need the database file, simply right click and copy the link.

Screen-Shot-2023-01-08-at-5.59.47-PM-1024x497.png

Now download the file to your server, making sure that you are in the server folder ‘/home/trinitycore/Server/bin/’ before doing so.”

Once the download is complete, we will use p7zip to extract the files using the following command.

sudo 7z x TDB_full_world_335.22101_2022_10_17.7z
It is important to note that if you are using this tutorial at a later date, the name of the file may have changed.

Step 7: Populating Your Databases & Downloading Data​

You will now need to start the worldserver to populate the databases, this may take awhile depending on resources available to you.

cd /home/trinitycore/Server/bin
./worldserver
After the world server completes populating the databases, run the following commands in order to download the data(maps, dbc, mmaps, vmaps) required to run the worldserver.

cd /home/trinitycore/Server/bin/
sudo wget https://www.mediafire.com/file/7a45qqij3a11xl9/data.zip
sudo unzip data.zip
sudo rm -v data.zip

Learn how to setup and start your server with my new tutorial: [Linux]How To Set Your Server Up As A Service On Debian

If you have any suggestions on how I can improve this tutorial, feel free to share them below.
 
Last edited:

Prupet

Divine
Divine
Prupet Rep
0
0
0
Rep
0
Prupet Vouches
0
0
0
Vouches
0
Posts
30
Likes
13
Bits
2 YEARS
2 YEARS OF SERVICE
LEVEL 1 105 XP

Instadev

MySQL & C++ Developer
banned
Instadev Rep
4
0
0
Rep
4
Instadev Vouches
0
0
0
Vouches
0
Posts
338
Likes
153
Bits
2 YEARS
2 YEARS OF SERVICE
LEVEL 2 90 XP
And he has done it again! Thank you!
 

RedLine

Divine
Divine
RedLine Rep
0
0
0
Rep
0
RedLine Vouches
0
0
0
Vouches
0
Posts
74
Likes
28
Bits
2 YEARS
2 YEARS OF SERVICE
LEVEL 4 205 XP
Wondeful job!

Just use other source for the pictures if possible cuz they do not load at all. not sure if its me!

1675941434942.png
 

NarcoRP

El Diablo Nunca Duerme
Divine
NarcoRP Rep
1
0
0
Rep
3
NarcoRP Vouches
0
0
0
Vouches
0
Posts
132
Likes
109
2 YEARS
2 YEARS OF SERVICE
LEVEL 8 81 XP

Lushen Japanese Blossom Tree

Dreamer
Divine
Lushen Rep
7
0
0
Rep
7
Lushen Vouches
0
0
0
Vouches
0
Posts
498
Likes
509
2 YEARS
2 YEARS OF SERVICE
LEVEL 8 26 XP
Very nice Guide, maybe check the pictures in the guide, I think they are down! :)
 

splicho

Emudevs Founder
Administrator
splicho Rep
6
0
0
Rep
6
splicho Vouches
3
0
0
Vouches
3
Posts
1,003
Likes
1,424
Bits
2 YEARS
2 YEARS OF SERVICE
LEVEL 248 60 XP

PrivateDonut

Account Closed
banned
Rep
3
0
0
Rep
3
Vouches
0
0
0
Vouches
0
Posts
533
Likes
444
Bits
2 YEARS
2 YEARS OF SERVICE
LEVEL 31 71 XP
I’ll fix the images after work, it’s mostly due to the way it’s trying to display the images. But they are still there on the server.
 

Kerpackie

Well-known member
Kerpackie Rep
3
0
0
Rep
3
Kerpackie Vouches
0
0
0
Vouches
0
Posts
164
Likes
130
Bits
2 YEARS
2 YEARS OF SERVICE
LEVEL 1 105 XP
Just a thought, would it be worth while turning this into a shell script that would help to automate the process, making for easier updating?
 

3,389

1,271

9,555

428

Top