WOW TrinityCore installation tutorial (based on 10.0.2.47657)
WOW TrinityCore installation tutorial
Related references
Environment setup: Ubuntu 20.04
Switch apt to the Alibaba Cloud mirror:
https://developer.aliyun.com/mirror/ubuntu?spm=a2c6h.13651102.0.0.3e221b11KR1TWB
Change the root password:
Run sudo passwd and enter the current user’s password when prompted.
Press Enter, then type and confirm the new password. That password becomes the new root password.
After that, run su root and log in with the new root password.
Set up passwordless SSH login:
cd ~
mkdir .ssh
echo ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAyq1pB5aF0w6ps4OzwQl1C8uP41Iq7J+gqylLMXkoESrTUVhH1+irHuImxi2At886sO7x9s+b4jhRZoJZpZURPU4UmzUEBHKoXlqOf9eO//GtUita2AaPFw5tc0YgLPrgnO+z5MKfjo20aoJtVBvleRA/0YJcWy1a6ufXa8944D8a1Dirc9uVNR5QjKVFRbQt/twLkLdFB6t16HCwISKCVI56DcJOoY2g7mXI8clKaESeB+ANIhSKJclPwjoC6P0pHFfgqNauxC+0xugx3W2ZSIkVhdZu1L7iKvzXXPiETjPQA6qMjp/1dY2WU49Lf+wDOQplCy4HLq7QqNNVSzIBGw== Administrator@PCOS-1407251925 >> ~/.ssh/authorized_keys
Enable SSH root login:
sudo vim /etc/ssh/sshd_config
Switch apt to the Huawei Cloud mirror:
sudo cp -a /etc/apt/sources.list /etc/apt/sources.list.bak
sudo sed -i "s@http://.*archive.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list
sudo sed -i "s@http://.*security.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list
sudo sed -i "s@http://mirrors.aliyun.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list
sudo sed -i "s@http://mirrors.aliyun.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list
sudo sed -i "s@http://mirrors.163.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list
sudo sed -i "s@http://mirrors.163.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list
Install common tools
apt install vim lrzsz p7zip unzip net-tools curl wget -y
Install common networking tools
sudo apt install net-tools
Install qemu-guest-agent on the VM:
apt-get install qemu-guest-agent
Regular Ubuntu maintenance updates
apt update && apt dist-upgrade
apt autoremove
fstrim
Expand the Ubuntu logical volume (optional)
# Show the current capacity
vgdisplay
--- Volume group ---
VG Name ubuntu-vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size <96.95 GiB
PE Size 4.00 MiB
Total PE 24818
Alloc PE / Size 12409 / 48.47 GiB
Free PE / Size 12409 / 48.47 GiB
VG UUID 0r0B09-AHil-bc9D-fXtF-o3Y3-MjZj-T10Sf9
# Expand everything
# Extend the logical volume boundary
lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
# Use `resize2fs` to reload the filesystem size for the change to take effect
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
Compile code and process data
Code compilation
cd ~/TrinityCore/build
mkdir -p /home/wow/server1002
cmake ../ -DCMAKE_INSTALL_PREFIX=/home/wow/server1002
make -j 6
Mount the DSM shared disk on Linux (optional)
mkdir -p /home/dsm10/sg10t
mount -t cifs -o username=my,password=123456 //192.168.1.1/sg10t/ /home/dsm10/sg10t
Copy the script (optional)
cp /root/TrinityCore/contrib/extractor.sh /home/dsm10/sg10t/Game/Development/wow1002
cd /home/dsm10/sg10t/Game/Development/wow1002
Perform map and other data conversion (adjust the path as needed)
Select 4. Extract all
Create the database and tables
# Path configuration
ClientPath: /home/dsm10/sg10t/Game/Development/wow1002
ServerPath: /home/wow/server1002
# Run the commands
screen
cd /home/dsm10/sg10t/Game/Development/wow1002
./extractor.sh
Open the ports and start the server
# Create an empty database
mysql
source /TrinityCore/sql/create/create_mysql.sql
show databases;
# Import the `auth` tables
use auth
source /TrinityCore/sql/base/auth_database.sql
# Import the `characters` tables
use characters
source /TrinityCore/sql/base/characters_database.sql
Create a Battle.net account
iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 1119 -j ACCEPT
iptables -I INPUT -m state --state NEW -m udp -p udp --dport 1119 -j ACCEPT
iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 8081 -j ACCEPT
iptables -I INPUT -m state --state NEW -m udp -p udp --dport 8081 -j ACCEPT
iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 8085 -j ACCEPT
iptables -I INPUT -m state --state NEW -m udp -p udp --dport 8085 -j ACCEPT
iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 8086 -j ACCEPT
iptables -I INPUT -m state --state NEW -m udp -p udp --dport 8086 -j ACCEPT
/etc/init.d/iptables save
/etc/init.d/iptables restart
iptables-save
iptables-apply
iptables --list
cd /home/wow/server1002
mkdir log
cd /home/wow/server1002/bin
nohup ./bnetserver -c /home/wow/server1002/etc/bnetserver.conf > /home/wow/server1002/log/bnetserver.log 2>&1 &
cd /home/wow/server1002/data
screen ../bin/worldserver -c /home/wow/server1002/etc/worldserver.conf
Log in with your game username and password
# TC commands:
bnetaccount create test@test test
# Enable the GM account
account set gmlevel 1#1 3 -1
Game username/password
test@test/test