Installation Guide | |
---|---|
This article is a part of the Installation Guide. You can read it alone or click the previous link to easily move between the steps. | |
<< Step 1: Requirements | Step 3: Server Setup >> |
The following steps will install AzerothCore at $HOME/azerothcore
. This will be in the home directory of the current user. This path can be changed to any other location the user has access to if desired.
The user azerothuser
will be used in some examples as well. Again, this can be changed to whatever is desired.
See Requirements before you continue.
Choose ONE of the following method, run one of the below git ...
commands in your terminal.
Clone only the master branch + full history (smaller size - recommended):
git clone https://github.com/azerothcore/azerothcore-wotlk.git --branch master --single-branch $HOME/azerothcore
Clone only the master branch + no previous history (smallest size):
git clone https://github.com/azerothcore/azerothcore-wotlk.git --branch master --single-branch $HOME/azerothcore --depth 1
Note: If you want to get the full history back, use git fetch --unshallow
.
Clone all branches and all history:
git clone https://github.com/azerothcore/azerothcore-wotlk.git $HOME/azerothcore
This will create an azerothcore
directory in your home folder containing the AC source files.
To avoid issues with updates and colliding source builds, we create a specific build-directory, so we avoid any possible issues due to that (if any might occur)
cd $HOME/azerothcore
mkdir build
cd build
Parameter explanation for advanced users CMake options.
At this point, you must be in your $HOME/azerothcore/build
directory.
Note: in the following command the variable $HOME
is the path of the current user, so if you are logged as root, $HOME will be "/root". You can check the state of the environment variable, as follows:
echo $HOME
Note: in case you use a non-default package for clang
, you need to replace it accordingly. For example, if you installed clang-6.0
then you have to replace clang
with clang-6.0
and clang++
with clang++-6.0
cmake ../ -DCMAKE_INSTALL_PREFIX=$HOME/azerothcore/env/dist/ -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DWITH_WARNINGS=1 -DTOOLS_BUILD=all -DSCRIPTS=static -DMODULES=static
To know the amount of cores available. You can use the following command
nproc --all
Then, replacing 6
with the number of threads that you want to execute, type:
make -j 6
make install
It may be useful to preserve these commands in a script or otherwise keep note of them for later. You will need to re-run all three commands again whenever you update AzerothCore or add new modules. For example:
#!/bin/bash
cmake ../ -DCMAKE_INSTALL_PREFIX=$HOME/azerothcore/env/dist/ -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DWITH_WARNINGS=1 -DTOOLS_BUILD=all -DSCRIPTS=static -DMODULES=static &&
make -j 6 &&
make install
Systemd services can help you with managing your AzerothCore server. The service files shown below must be installed by root
in most distros. The appropriate location on most distros is /etc/systemd/system
.
The username used here is azerothuser
, and should be substituted for your username.
Since these commands won't be run with access to the user's variables, the install directory $HOME/azerothcore
must be fully expanded to, for example, /home/azerothuser/azerothcore
. Run echo $HOME/azerothcore
as your user if you're not sure what this should be.
[Unit]
Description=AzerothCore Authserver
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=azerothcore
WorkingDirectory=/home/azerothuser/azerothcore
ExecStart=/home/azerothuser/azerothcore/acore.sh run-authserver
[Install]
WantedBy=multi-user.target
[Unit]
Description=AzerothCore Worldserver
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=azerothcore
WorkingDirectory=/home/azerothuser/azerothcore
ExecStart=/bin/screen -S worldserver -D -m /home/azerothuser/azerothcore/acore.sh run-worldserver
[Install]
WantedBy=multi-user.target
systemd is made aware of these new service files with systemd daemon-reload
. You can start AzerothCore like this:
sudo service worldserver start
sudo service authserver start
Or stop it:
sudo service worldserver stop
sudo service authserver stop
The servers can be set to automatically start when the system boots with:
sudo systemctl enable authserver
sudo systemctl enable worldserver
You can inspect if the services started properly by inspecting the log entries from the systemd journal like so:
sudo journalctl authserver.service
sudo journalctl worldserver.service
If you are still having problems, check:
Join our Discord Server, but it is not a 24/7 support channel. A staff member will answer you whenever they have time.
Installation Guide | |
---|---|
This article is a part of the Installation Guide. You can read it alone or click the previous link to easily move between the steps. | |
<< Step 1: Requirements | Step 3: Server Setup >> |