Inbuilt with multi-purpose announcement bar Check here


How To Compile Trinity Core 3.3.5a On Debian 11 - Step By Step Guide
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

#1
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.


[Image: 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.

[Image: 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.

Code:
sudo adduser trinitycore

Quote:[Image: Screen-Shot-2023-01-08-at-4.15.24-PM.png]
[Image: 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.

Code:
sudo usermod -aG sudo trinitycore

[Image: 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.
[Image: 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.

Code:
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.

Code:
sudo apt-get update && sudo apt-get upgrade

[Image: 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.

Code:
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 unzip
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang 100

[Image: 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.

Code:
git clone -b 3.3.5 https://github.com/TrinityCore/TrinityCore.git

[Image: 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.

Code:
cd TrinityCore
mkdir build
cd build

[Image: 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.

Code:
nproc --all​

[Image: 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.

Code:
cmake ../ -DCMAKE_INSTALL_PREFIX=/home/trinitycore/Server -DTOOLS=0

[Image: 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’

Code:
make -j X
sudo make install

You are now compiling trinity core. This may take awhile depending on the resources available on your server.

[Image: Screen-Shot-2023-01-08-at-5.02.12-PM-1024x202.png]

We will now need to rename the configuration files before moving to the next step.
Code:
cd /home/trinitycore/Server/etc/
sudo mv authserver.conf.dist authserver.conf | sudo mv worldserver.conf.dist worldserver.conf


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.
Code:
sudo mysql -u root -p

[Image: 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.

Code:
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 utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE DATABASE `characters` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE DATABASE `auth` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_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.

[Image: 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.”

Code:
sudo wget https://github.com/TrinityCore/TrinityCore/releases/download/TDB335.22101/TDB_full_world_335.22101_2022_10_17.7z

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

Code:
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.

Code:
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.
Code:
cd /home/trinitycore/Server/bin/
sudo wget https://www.mediafire.com/file/7a45qqij3a11xl9/data.zip
sudo unzip data.zip
sudo rm -v data.zip

You may now start your authserver and worldserver by simply typing ./authserver or ./worldserver. But please note, doing it this way will disconnect as soon as you close the SSH session. I will be making a guide shortly about setting these up as a service.



If you need any help, please feel free to make a thread in the support section. Thank you!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)