Github页https://github.com/TrinityCore/TrinityCore/releases
官网https://github.com/TrinityCore/TrinityCore/releases
双核心4G,debian 11.1
安装 mysql(版本5.7),据说是因为官网说的那个mariadb安装因为版本问题容易报错
wget [http://repo.mysql.com/mysql-apt-config_0.8.13-1_all.deb](http://repo.mysql.com/mysql-apt-config_0.8.13-1_all.deb)
然后要安装以下组件gnupg
apt install gnupg
接下来进行安装
dpkg -i mysql-apt-config_0.8.13-1_all.deb
![[Pasted image 20220227163046.png]]
dpkg-reconfigure mysql-apt-config
# 直接选ok
# 安装mysql-server
apt update;apt install mysql-server
![[Pasted image 20220227163137.png]]
我这里先用123456
官方资料,但是要去掉mariabd,
apt-get update
apt-get install git clang cmake make gcc g++ libmariadbclient-dev-compat libssl-dev libbz2-dev libreadline-dev libncurses-dev libboost-all-dev p7zip default-libmysqlclient-dev
update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang 100
# (去掉了mariadb-server)
# Clone core 克隆核心
git clone -b 3.3.5 git://github.com/TrinityCore/TrinityCore.git
克隆、编译的时候可以利用[[screen工具]]切出去干别的。
#编译源码
cd TrinityCore
mkdir build
cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=/home/wow/server -DTOOLS=1
make -j 6 install
#注:6可以为$(nproc)或其他指定核心数
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf # 也可能需要把bind-address改成0.0.0.0
sudo /etc/init.d/mysql restart
![[Pasted image 20220227164317.png]]
# 开启远程访问
Mysql
Update user set host = “%” where user = “root”;
如果有iptables防火墙
# FTP端口,没有就算了
iptables -A INPUT -p tcp --dport 21 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 21 -j ACCEPT
# MYSQL端口
iptables -A INPUT -p tcp --dport 3306 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 3306 -j ACCEPT
# 魔兽登录端口
iptables -A INPUT -p tcp --dport 3724 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 3724 -j ACCEPT
# 魔兽服务端端口
iptables -A INPUT -p tcp --dport 8085 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 8085 -j ACCEPT
![[Pasted image 20220227164504.png]]![[Pasted image 20220227164508.png]]![[Pasted image 20220227164513.png
如果已经都抽取好了,可以直接放到服务器,就不用这么干了
![[Pasted image 20220227164711.png]]
创建data目录放地图
Cd到游戏根目录,然后开始提取地图
/home/<username>/server/bin/mapextractor
如
/home/wow/server/bin/mapextractor
移动抽取出的地图
cp -r Cameras dbc maps /home/<username>/server/data
如
cp -r Cameras dbc maps /home/wow/server/data
vmap抽取
/home/<username>/server/bin/vmap4extractor
如
/home/wow/server/bin/vmap4extractor
mkdir vmaps
/home/<username>/server/bin/vmap4assembler Buildings vmaps
cp -r vmaps /home/<username>/server/data
mkdir mmaps
/home/<username>/server/bin/mmaps_generator
cp -r mmaps /home/<username>/server/data
使用如navicat的软件连接数据库,跑以下脚本
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;
![[Pasted image 20220227165004.png]]
![[Pasted image 20220227165010.png]]
T 数据库,使用版本19101
![[Pasted image 20220227165043.png]]
![[Pasted image 20220227165434.png]]
Cd server/bin
./worldserver #世界服务器
./authserver #开启登录服务器
![[Pasted image 20220227165523.png]]
修改客户端的ip
![[Pasted image 20220227165608.png]]
[[利用WoWSimpleRegistration实现TrinityCore自助注册]]