魔兽世界服务端AzerothCore+Centos系统+docker编译教程

  • 1.1 准备工作
    • 1.1.1 准备
    • 1.1.2 安装软件
    • 1.1.3 下载源码
    • 1.1.4 地图文件
  • 1.2 修改配置文件
    • 1.2.1 修改环境变量文件
    • 1.2.2 修改文件执行权限
    • 1.2.3 修改配置文件
  • 1.3 编译及启动
    • 1.3.1 编译项目
    • 1.3.2 启动容器
    • 1.3.3 无法启动
      • 1. 网络问题
      • 2.时区问题
    • 1.3.4 数据库表修改
  • 1.4 游戏测试
    • 1.4.1 创建GM账户
    • 1.4.2 客户端登录游戏
  • 1.5 GM指令

声明:本文只做探讨性研究,不以盈利为目的,仅供个人娱乐。如果涉及侵权行为,请联系本作者删除。

1.1 准备工作

1.1.1 准备

  1. linux系统服务器1台, 推荐Centos7 系统,虚拟机即可
  2. 服务器能够访问外网
  3. 地图文件
  4. 下载魔兽世界客户端12340版本,即3.3.5 WLK版本

1.1.2 安装软件

安装docker CentOS 环境下安装 Docker
安装docker compose 12.2.2 二进制包
安装git:yum install git

1.1.3 下载源码

cd /
git clone https://gitee.com/53957105/azerothcore-wotlk.git

下载完成后,会出现 /azerothcore-wotlk 目录

1.1.4 地图文件

地图文件下载地址 (data.zip)
上传地图数据文件到 docker/worldserver/data/
解压地图数据

cd /azerothcore-wotlk/docker/worldserver/data/
unzip data.zip

1.2 修改配置文件

1.2.1 修改环境变量文件

进入 /azerothcore-wotlk 目录

[root@localhost ~]# cd /azerothcore-wotlk/
[root@localhost azerothcore-wotlk]# cp .env.dist .env
[root@localhost azerothcore-wotlk]# cat .env
WORLDSERVER_DATA=./docker/worldserver/data
WORLDSERVER_ETC=./docker/worldserver/etc
WORLDSERVER_LOGS=./docker/worldserver/logsAUTHSERVER_ETC=./docker/authserver/etc
AUTHSERVER_LOGS=./docker/authserver/logsWORLD_EXTERNAL_PORT=1001
AUTH_EXTERNAL_PORT=1002
DB_EXTERNAL_PORT=1003
DB_ROOT_PASSWORD=123456
SOAP_EXTERNAL_PORT=1004

端口可自定义,后面操作同步修改

1.2.2 修改文件执行权限

chmod +x -R ../azerothcore-wotlk

1.2.3 修改配置文件

[root@localhost azerothcore-wotlk]# cat docker/worldserver/etc/worldserver.conf
################################################
# AzerothCore World Server configuration file #
################################################
[worldserver]# Do NOT change those Dir configs
LogsDir = "/azeroth-server/logs" # will reflect on your host directory: docker/worldserver/logs
DataDir = "/azeroth-server/data"# Change this configuration accordingly with your docker setup
# The format is "hostname;port;username;password;database":
# - docker containers must be on the same docker network to be able to communicate
# - the DB hostname will be the name of the database docker container
LoginDatabaseInfo     = "ac-database;3306;root;123456;acore_auth"
WorldDatabaseInfo     = "ac-database;3306;root;123456;acore_world"
CharacterDatabaseInfo = "ac-database;3306;root;123456;acore_characters"# Add more configuration overwrites by copying settings from worldserver.conf.dist
LogLevel = 2# Disable idle connections automatic kick since it doesn't work well on macOS + Docker
CloseIdleConnections = 0SOAP.Enabled = 1
SOAP.IP = "0.0.0.0"
SOAP.Port = 7878
[root@localhost azerothcore-wotlk]# cat docker/authserver/etc/authserver.conf
###############################################
# AzerothCore Auth Server configuration file #
###############################################
[authserver]# Do not change this
LogsDir = "/azeroth-server/logs" # will reflect on your host directory: docker/worldserver/logs# Change this configuration accordingly with your docker setup
# The format is "hostname;port;username;password;database":
# - docker containers must be on the same docker network to be able to communicate
# - the DB hostname will be the name of the database docker container
LoginDatabaseInfo = "ac-database;3306;root;123456;acore_auth"# Add more configuration overwrites by copying settings from from authserver.conf.dist
LogLevel = 3
SQLDriverLogFile = "SQLDriver.log"
SQLDriverQueryLogging = 1

1.3 编译及启动

1.3.1 编译项目

./bin/acore-docker-build

1.3.2 启动容器

docker-compose up

如果失败,再试一次

显示下面内容,表示服务器启动成功:

ac-worldserver_1  | Max allowed socket connections 1048576
ac-worldserver_1  | AzerothCore rev. 036a8c2450ef+ 2020-10-13 10:23:18 +0200 (master branch) (Unix, Release) (worldserver-daemon) ready...
[root@localhost azerothcore-wotlk]# docker ps
CONTAINER ID   IMAGE                     COMMAND                  CREATED        STATUS                  PORTS                                                                                  NAMES
a7c8660f835d   azerothcore/worldserver   "/azeroth-server/bin…"   25 hours ago   Up 24 hours (healthy)   0.0.0.0:1004->7878/tcp, :::1004->7878/tcp, 0.0.0.0:1001->8085/tcp, :::1001->8085/tcp   azerothcore-wotlk_ac-worldserver_1
a0a051f3a1ab   azerothcore/authserver    "/azeroth-server/bin…"   2 days ago     Up 24 hours (healthy)   0.0.0.0:1002->3724/tcp, :::1002->3724/tcp                                              azerothcore-wotlk_ac-authserver_1
f6d8ff788432   azerothcore/database      "docker-entrypoint.s…"   2 days ago     Up 24 hours (healthy)   33060/tcp, 0.0.0.0:1003->3306/tcp, :::1003->3306/tcp                                   azerothcore-wotlk_ac-database_1

当程序启动成功,可以切换至后台运行

docker-compose up -d

1.3.3 无法启动

1. 网络问题

如果出现网络问题,无法启动,可参考以下内容修改

[root@localhost azerothcore-wotlk]# cat docker-compose.yml
version: '3.2'services:ac-database:image: azerothcore/databaserestart: unless-stoppedbuild:context: .dockerfile: ./docker/database/Dockerfilenetworks:proxy:ipv4_address: 169.17.0.10ports:- ${DB_EXTERNAL_PORT:-3306}:3306environment:- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD:-password}volumes:- type: volumesource: ac-databasetarget: /var/lib/mysqlac-worldserver:stdin_open: truetty: trueimage: azerothcore/worldserverrestart: unless-stoppedprivileged: truebuild:context: ./docker/worldserverdockerfile: Dockerfilenetworks:proxy:ipv4_address: 169.17.0.11ports:- ${WORLD_EXTERNAL_PORT:-8085}:8085- ${SOAP_EXTERNAL_PORT:-7878}:7878volumes:- type: bindsource: ./docker/worldserver/bintarget: /azeroth-server/bin- type: bindsource: ${WORLDSERVER_ETC:-./docker/worldserver/etc}target: /azeroth-server/etc- type: bindsource: ${WORLDSERVER_LOGS:-./docker/worldserver/logs}target: /azeroth-server/logs- type: bindsource: ${WORLDSERVER_DATA:-./docker/worldserver/data}target: /azeroth-server/datadepends_on:- ac-databaseac-authserver:image: azerothcore/authserverrestart: unless-stoppedbuild:context: ./docker/authserverdockerfile: Dockerfilenetworks:proxy:ipv4_address: 169.17.0.12ports:- ${AUTH_EXTERNAL_PORT:-3724}:3724volumes:- type: bindsource: ./docker/authserver/bintarget: /azeroth-server/bin- type: bindsource: ${AUTHSERVER_ETC:-./docker/authserver/etc}target: /azeroth-server/etc- type: bindsource: ${AUTHSERVER_LOGS:-./docker/authserver/logs}target: /azeroth-server/logsdepends_on:- ac-databasevolumes:ac-database:networks:proxy:ipam:config:- subnet: 169.17.0.0/24

2.时区问题

如果因为时区问题,无法启动,参考如下修改

[root@localhost azerothcore-wotlk]# cat docker/authserver/Dockerfile
FROM ubuntu:20.04# List of timezones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones# set timezone environment variable
ENV TZ=Asia/Shanghai# set noninteractive mode so tzdata doesn't ask to set timezone on install
ENV DEBIAN_FRONTEND=noninteractive# install the required dependencies to run the authserver
RUN apt update && apt install -y libmysqlclient-dev libssl-dev libace-6.4.5 libace-dev net-tools tzdata;# change timezone in container
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdataHEALTHCHECK --interval=5s --timeout=15s --start-period=30s --retries=1 CMD netstat -lnpt | grep :3724 || exit 1# run the authserver located in the directory "docker/authserver/bin" of the host machine
CMD ["/azeroth-server/bin/authserver"]
[root@localhost azerothcore-wotlk]# cat docker/database/Dockerfile
FROM alpine:3.9 as builder# install bash
RUN apk add --no-cache bash# copy the sources from the host machine
COPY apps /azerothcore/apps
COPY bin /azerothcore/bin
COPY conf /azerothcore/conf
COPY data /azerothcore/data
COPY deps /azerothcore/deps
COPY acore.json /azerothcore/acore.json# run the AzerothCore database assembler
RUN ./azerothcore/bin/acore-db-asm 1FROM mysql:5.7# List of timezones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones# set timezone environment variable
ENV TZ=Asia/ShanghaiENV LANG C.UTF-8# copy files from the previous build stage - see: https://docs.docker.com/develop/develop-images/multistage-build/
COPY --from=builder /azerothcore/env/dist/sql /sql# adding the "generate-databases.sh" to the directory "/docker-entrypoint-initdb.d"
# because all scripts included in that directory will automatically be executed when the docker container starts
COPY docker/database/generate-databases.sh /docker-entrypoint-initdb.dHEALTHCHECK --interval=5s --timeout=15s --start-period=30s --retries=1 CMD mysqladmin -uroot -p$MYSQL_ROOT_PASSWORD ping -h localhost
[root@localhost azerothcore-wotlk]# cat docker/worldserver/Dockerfile
FROM ubuntu:20.04# List of timezones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones# set timezone environment variable
ENV TZ=Aisa/Shanghai# set noninteractive mode so tzdata doesn't ask to set timezone on install
ENV DEBIAN_FRONTEND=noninteractive# install the required dependencies to run the authserver
RUN apt update && apt install -y libmysqlclient-dev libssl-dev libace-6.4.5 libace-dev libreadline-dev net-tools tzdata;# change timezone in container
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdataHEALTHCHECK --interval=5s --timeout=15s --start-period=30s --retries=1 CMD netstat -lnpt | grep :8085 || exit 1# run the worldserver located in the directory "docker/worldserver/bin" of the host machine
CMD ["/azeroth-server/bin/worldserver"]

1.3.4 数据库表修改

  1. 进入容器,连接数据库
[root@localhost azerothcore-wotlk]# docker exec -it azerothcore-wotlk_ac-database_1 bash
bash-4.2# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1416
Server version: 5.7.41 MySQL Community Server (GPL)Copyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>
  1. 打开 acore_auth数据库, realmlist 数据表
mysql> use acore_auth;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
mysql> show tables;
+----------------------+
| Tables_in_acore_auth |
+----------------------+
| account              |
| account_access       |
| account_banned       |
| account_muted        |
| autobroadcast        |
| ip2nation            |
| ip2nationCountries   |
| ip_banned            |
| logs                 |
| logs_ip_actions      |
| realmcharacters      |
| realmlist            |
| uptime               |
| version_db_auth      |
+----------------------+
14 rows in set (0.00 sec)mysql> select * from realmlist;
+----+-------------+---------------+--------------+-----------------+------+------+------+----------+----------------------+------------+-----------+
| id | name        | address       | localAddress | localSubnetMask | port | icon | flag | timezone | allowedSecurityLevel | population | gamebuild |
+----+-------------+---------------+--------------+-----------------+------+------+------+----------+----------------------+------------+-----------+
|  1 | AzerothCore | 192.168.1.200 | 127.0.0.1    | 255.255.255.0   | 1001 |    0 |    0 |        1 |                    0 |          0 |     12340 |
+----+-------------+---------------+--------------+-----------------+------+------+------+----------+----------------------+------------+-----------+
1 row in set (0.00 sec)
  1. address 修改为服务器ip或者域名,port 修改为 1001
update realmlist set address='192.168.1.200',port='1001';
  1. 重启服务器

1.4 游戏测试

1.4.1 创建GM账户

进入服务器容器,并创建gm账号

docker attach azerothcore-wotlk_ac-worldserver_1account create admin 123456
account set gmlevel admin 3 -1

创建完成,退出容器

1.4.2 客户端登录游戏

在客户端中,创建 login.bat 文件,并写入如下内容:

@echo y | rd /s "Cache"
echo SET realmlist "192.168.1.200:1002"> realmlist.wtf
echo SET realmList "192.168.1.200:1002"> Data/zhCN/realmlist.wtf
echo SET realmList "192.168.1.200:1002"> Data/zhTW/realmlist.wtfren Data\commoo.MPQ common.MPQ
ren Data\expansioo.MPQ expansion.MPQ
start wow.exe
goto end
:end

1.5 GM指令

GM指令

ENJOR YOUR GAME!

魔兽世界服务端AzerothCore+Centos系统+docker编译教程相关推荐

  1. 魔兽世界服务端centos架设

    目前最完美的魔兽世界服务端AzerothCore 60级经典旧世版本 70级燃烧的远征版版本 80级巫妖王之怒版本 85级大地的裂变版本 90级熊猫人之谜版本 100级德拉诺之王版本 R110级军团再 ...

  2. wow魔兽世界服务端主体结构

    wow魔兽世界服务端主体结构 服务端主要由三大块组成,数据库.服务端逻辑.脚本.数据库用的MySQL,这里不是很关键暂且不说.脚本有自己的脚本引擎,简单的任务.战斗等都可以通过数据库配置相应条目来完成 ...

  3. ngrok服务端搭建并使用docker解放80端口

    [start] 前言:为什么要搭建ngrok服务端,为什么使用docker 1.开发环境下调试微信公众号使用(要求80端口): 2.ngrok配置中要指定 http的端口,如果指定80端口的话,会和n ...

  4. 魔兽世界服务端源码各个重要文件详细情况说明——魔兽世界开服

    魔兽服务端开服源文件各文件翻译 很多文件在服务器中我们知道是跟什么有关,但就是不知道其作用是什么.就算我们知道在这些地方中的文件都是有着不小的作用.但是由于不知道各个文件代表的是什么意思所以在面对这些 ...

  5. java计算机毕业设计社区养老综合服务平台服务端源码+系统+数据库+lw文档+mybatis+运行部署

    java计算机毕业设计社区养老综合服务平台服务端源码+系统+数据库+lw文档+mybatis+运行部署 java计算机毕业设计社区养老综合服务平台服务端源码+系统+数据库+lw文档+mybatis+运 ...

  6. 传奇服务器是测试模式怎么修改,www.23bb.net告诉你传奇服务端中默认系统提示文字修改方法...

    在玩传奇中中,常见一些系统提示,如人物在安全区中扔东西时,会弹出对话框提示禁止扔,或者在游戏登陆时提示攻击模式,及人物行会显示与夫妻称号显示格式等所有的系统默认格式.其实这些格式都是可以进行修改的,今 ...

  7. java计算机毕业设计融呗智慧金融微资讯移动平台服务端源码+系统+数据库+lw文档+mybatis+运行部署

    java计算机毕业设计融呗智慧金融微资讯移动平台服务端源码+系统+数据库+lw文档+mybatis+运行部署 java计算机毕业设计融呗智慧金融微资讯移动平台服务端源码+系统+数据库+lw文档+myb ...

  8. 计算机毕业设计JavaVue.js网上书城管理系统设计与实现服务端(源码+系统+mysql数据库+lw文档)

    计算机毕业设计JavaVue.js网上书城管理系统设计与实现服务端(源码+系统+mysql数据库+lw文档) 计算机毕业设计JavaVue.js网上书城管理系统设计与实现服务端(源码+系统+mysql ...

  9. java游戏刀剑_Game_rc 刀剑无双服务端后端源代码,完美编译运行,javawanmeiyunxing Engine 游戏引擎 267万源代码下载- www.pudn.com...

    文件名称: Game_rc下载  收藏√  [ 5  4  3  2  1 ] 开发工具: Java 文件大小: 8214 KB 上传时间: 2016-12-01 下载次数: 0 提 供 者: 王文文 ...

最新文章

  1. 超干货3D视觉技术分享+人才内推!独角兽奥比中光与你相约VALSE 2021
  2. 计算机设备图标怎么删除,电脑设备和驱动器中没用的图标怎么删除? 我的电脑中手机...
  3. G - Strongly connected - hdu 4635(求连通分量)
  4. win10系统要求配置_酒店智能化集成系统设计要素、系统功能要求和配置标准
  5. 服务端端口状态和客户端端口状态解释-LISTENING-ESTABLISHED-TIME_WAIT
  6. python rbf神经网络_RBF神经网络是什么?
  7. 英汉汉英词典,牛津高级词典,电子词典,离线英汉,汉英词典的使用方法
  8. 02-Spring的核心API
  9. 各种dns:百度DNS/阿里DNS/114DNS/腾讯DNS/谷歌DNS/OpenDNS 对比评测
  10. CUDA加速——共享内存介绍及其应用
  11. AI上推荐 之 FiBiNET模型(特征重要性选择与双线性特征交叉)
  12. VM虚拟机网络设置问题
  13. 计算机毕业设计之 少儿编程学习平台的设计与实现
  14. 【​观察】数据驱动零售变革 重塑消费体验是关键
  15. 直播预告 | ICLR专场一
  16. jmeter监听器---跟随响应时间的指标监控
  17. 快手直播前期怎么引流?快手新人主播怎么做涨粉
  18. plsql-数据查询(二、条件查询)
  19. PowerPoint2003上嵌入Excel Sheet
  20. Linux基础_李孟_新浪博客

热门文章

  1. 国家防沉迷实名认证系统--NODEJS
  2. 水面波纹.shader
  3. cpu二级缓存和一级缓存详解及区别(图解)
  4. 三校生计算机模拟试题1,三校生高考计算机模拟试卷一
  5. Liunx网卡绑定(Bond0-6)原理及相关实验
  6. 屌丝程序员走过的第一个十年
  7. Java 单测—static方法
  8. 开启吉利动力4.0时代 全球动力科技品牌“雷神动力”正式发布
  9. 至少包含一个浅层人工神经网络和一个深层人工神经网络_Wow!仅19.9元就能变仙变美!大厂好多美女坚持一个月就变成这样了.........
  10. 什么是伪静态?伪静态有何作用?