介绍

基于 azerothcore-wotlk 构建docker wow 335服务端

软件架构

Ubuntu 20.04

安装教程

1.下载 docker 环境

更换国内apt源,自行选择 清华源

bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)

安装docker 以及docker-compose,并且设置自行选择 清华源

bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh)

安装需要的环境

apt -y install git unzip wget curl vim

2.下载源码 https://github.com/azerothcore/azerothcore-wotlk.git

https://ghproxy.com 为国内github下载加速

git clone https://ghproxy.com/https://github.com/azerothcore/azerothcore-wotlk.git

3.进入项目目录 ,下载 data.zip 文件 到 azerothcore-wotlk/env/docker/data 目录下,然后解压

data 地址为 https://github.com/wowgaming/client-data/releases/

cd azerothcore-wotlk
wget https://ghproxy.com/https://github.com/wowgaming/client-data/releases/download/v16/data.zip
unzip -o data.zip -d env/docker/data
  1. 在项目目录执行,校验环境变量
snap install deno
./acore.sh docker --help

修改Dockerfile文件,改为国内镜像

vim ./apps/docker/Dockerfile

在29行 上面添加一行代码 (也就是 在 RUN apt-get update && apt-get install -y 执行之前 先替换源,然后再更新)

例子:

RUN apt-get update && apt-get install -y

改为

RUN sed -i s@/archive.ubuntu.com/@/mirrors.tuna.tsinghua.edu.cn/@g /etc/apt/sources.list
RUN apt-get update && apt-get install -y

不改的话,apt 会更新包 走的国外的源,会有点慢
改后走的是 清华的apt源

5.编译

./acore.sh docker build

6.运行(或者后台运行)

./acore.sh docker start:app

后台运行命令:

./acore.sh docker start:app:d

7.打开一个窗口 进入world控制台

./acore.sh docker attach ac-worldserver

创建游戏账号

account create <user> <password>

user: 用户名

password: 密码

8.打开一个窗口 进入MySQL,并且修改服务端Ip

docker exec -it azerothcore-wotlk_ac-database_1 bash
mysql -uroot -ppassword
USE acore_auth;
SELECT * FROM realmlist;
UPDATE realmlist SET address='<SERVER PUBLIC IP ADDRESS>';

<SERVER PUBLIC IP ADDRESS> : 服务端Ip

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐