安装前的准备工作:
特别说明:本文基于军团再临110级 AshamaneCore/TrinityCore/LegionCore735 版本源码的单机安装教程。服务端均为源码编译安装,无任何限制。如需局域网或外网架设将在后续文章中发布
1、下载Oracle VM虚拟机
https://download.virtualbox.org/virtualbox/7.0.14/VirtualBox-7.0.14-161095-Win.exe?source=:ow:o:p:nav:mmddyyVirtualBoxHero_cn
2、下载Ubuntu22.04.3 LTS版本
https://ubuntu.com/download/server
3、下载openssl-1.0.2版本
https://www.openssl.org/source/old/
4、下载zlib-1.2.13版本
https://zlib.net/zlib-1.2.13.tar.gz
5、下载boost1.58版本
https://www.boost.org/users/history/
6、下载mysql-5.7版本
https://cdn.mysql.com/archives/mysql-5.7/mysql-server_5.7.42-1ubuntu18.04_amd64.deb-bundle.tar
7、安装vim文本编辑工具
sudo apt install vim
8、下载Navicat Premium数据库管理工具
9、下载源码
https://gitee.com/tanyjan/AshamaneCore
源码bug1:/src/server/game/Grids/NGrid.h,移除const: SetGridId(...) .... const {} ----> SetGridId(...) .... {}
10、下载源码匹配的客户端 Legion735-26972版本,若有需要可私信我提供下载链接。
安装步骤:
1、安装依赖工具包
sudo apt update && sudo apt full-upgrade -y && sudo apt install git cmake make gcc g clang libssl-dev libbz2-dev libreadline-dev libncurses-dev
2、安装zlib
https://zlib.net/zlib-1.2.13.tar.gz
解压文件
tar -zxvf zlib-1.2.13.tar.gz
编译安装
sudo ./configure
sudo make & sudo make install
注:若CPU多核心可以携带 -j ${nproc} 参数充分发挥CPU性能提高编译安装速度
3、安装boost-1.58.0
sudo tar -zxvf boost-1.58.0.tar.gz & sudo ./bootstrap.sh --prefix=/usr/local/boost --with-libraries=all --with-toolset=gcc & sudo ./b2 & sudo ./b2 install
4、安装openssl-1.0.2
sudo tar -zxvf openssl-1.0.2.tar.gz & sudo ./config --prefix=/usr/local/openssl & sudo make & sudo make install
5、安装mysql-5.7
sudo tar -zxvf mysql-server_5.7.42-1ubuntu18.04_amd64.deb-bundle.tar
sudo dpkg -i mysql-common_5.7.42-1ubuntu18.04_amd64.deb
sudo apt-get install -f //自动安装缺少的依赖,安装时提示输入数据库root账号的登录密码,此处输入 “123456” 作为root账号的密码
sudo dpkg -i mysql-community-client_5.7.42-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-client_5.7.42-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-community-server_5.7.42-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-server_5.7.42-1ubuntu18.04_amd64.deb
sudo dpkg -i libmysqlclient-dev_5.7.42-1ubuntu18.04_amd64.deb
sudo dpkg -i libmysqld-dev_5.7.42-1ubuntu18.04_amd64.deb
sudo dpkg -i libmysqlclient20_5.7.42-1ubuntu18.04_amd64.deb
配置mysql:
1、打开远程访问
vi /etc/mysql/mysql.conf.d/mysqld.cnf: bind-address = 127.0.0.1 ----> bind-address = 0.0.0.0
2、重启mysql服务:
service mysql restart
3、使用客户端连接mysql服务:
mysql -u root -p 输入 “123456” 进入数据库
4、创建用户并授权,同时开启远程登录访问:
create user root@'%' identified by '123456';
grant all privileges on *.* to root@'%' with grant option;
6、下载735源码并解压
https://gitee.com/tanyjan/AshamaneCore
sudo mkdir build & cd build //源码根目录下创建build文件夹并进入build目录进行编译
sudo cmake ../ -DCMAKE_INSTALL_PREFIX=/opt/trinity-server/ -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang -DOPENSSL_INCLUDE_DIR=/usr/local/openssl/include -DOPENSSL_SSL_LIBRARIES=/usr/local/openssl/lib -DOPENSSL_CRYPTO_LIBRARIES=/usr/local/openssl/lib/libcrypto.a -DOPENSSL_SSL_LIBRARIES=/usr/local/openssl/lib/libssl.a -DBoost_INCLUDE_DIR=/usr/local/boost/include -DBoost_SYSTEM_LIBRARY=/usr/local/boost/lib/libboost_system.a -DBoost_FILESYSTEM_LIBRARY=/usr/local/boost/lib/libboost_filesystem.a -DBoost_IOSTREAMS_LIBRARY=/usr/local/boost/lib/libboost_iostreams.a -DWITH_WARNINGS=1 -DTOOLS_BUILD=all -DSCRIPTS=static -DMODULES=static
sudo make -j ${nproc}
sudo make
7、将map_extractor、vmap4_extractor、vmap4_assembler、mmaps_generator复制到客户端根目录下依次执行以下命令提取地图文件(耗时较长),若有需要可私信我提供下载链接:
1、sudo ./mapextractor
2、sudo ./vmap4extractor
3、sudo mkdir vmaps & sudo ./vmap4assembler Buildings vmaps
4、sudo mkdir mmaps & sudo ./mmaps_generator
用爱发电欢迎参与测试体验。若发现bug可以私信,欢迎相同兴趣爱好者参与修复。