本文主要是介绍TrinityCore最新版本master安装@ubuntu22@win10,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
原名字是:trinitycore最新版本master安装@docker@freebsd15@win10
说明一下,原计划是在win10的virtualbox安装FreeBSD,然后在FreeBSD系统安装docker-machine,再安装tinycore-linux,在里面再安装docker,docker里面再安装TrinityCore!
最终实施方案是:在Win10里VirtualBox安装Ubuntu22.04,然后安装TrinityCore
VirtualBox中安装Ubuntu
刚开始为了能在FreeBSD里面再虚拟化,需要在VirtualBox打开VT-x。但是选项是灰色的。这时候按照常规想法,应该是在虚拟机开机的时候进入bios修改。但是VirtualBox没有bios,所以要在Windows10 用执行命令的方法打开:
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe list vms
"freebsd2" {d07f2950-2ba5-4d88-b81f-13b58703ba43}
"freebsd15" {0cc27105-42ee-4bef-b11e-f82a6e2c2e48}
"freebsd1" {cb381dc6-f89b-4509-a3d8-60b4df70129a}
"freebsd15new" {13e6778a-8a35-482d-9813-c71f5cd35278}
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifyvm "freebsd15" --nested-hw-virt on
执行完之后VT-x选项就不是灰色的,可以勾选了。当然win10 bios里要打开VT-x,这个就不赘述了
创建和安装Ubuntu
到清华镜像下载安装盘 Index of /ubuntu-releases/22.04.4/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
安装好Ubuntu后,
安装相关库
apt-get update
apt-get install git clang cmake make gcc g++ libmysqlclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev libboost-all-dev mysql-server p7zip
update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang 100
创建专用账户wow
sudo adduser wow
用wow用户登录,然后下载master源码
cd ~/
git clone -b master https://github.com/TrinityCore/TrinityCore.git
源码编译
cd TrinityCore
mkdir build
cd buildcmake ../ -DCMAKE_INSTALL_PREFIX=/home/wow/server
编译
make -j $(nproc)
make install
若有需要,及时更新代码
cd ~/TrinityCore/
git pull origin master
更新完之后,不要忘记再重新编译!
配置服务器
下载程序需要的地图等文件,可以从这里下载: https://tc.arctium.io
下载master版本的,下载后解压,带目录拷贝到server/data目录
配置config文件
将dist后缀去掉
server/etc$ ls
bnetserver.conf bnetserver.conf.dist worldserver.conf worldserver.conf.dist
创建数据库
sudo mysql# 进入mysql后执行
source /home/wow/download/create_mysql.sql
最后配置网络
UPDATE realmlist SET address = '192.168.0.16' WHERE address = '127.0.0.1';
use 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> select id,name,address,localaddress,gamebuild from realmlist;
+----+---------+-----------+--------------+-----------+
| id | name | address | localaddress | gamebuild |
+----+---------+-----------+--------------+-----------+
| 1 | Trinity | 127.0.0.1 | 127.0.0.1 | 54604 |
+----+---------+-----------+--------------+-----------+
1 row in set (0.00 sec)mysql> UPDATE realmlist SET address = '192.168.0.16' WHERE address = '127.0.0.1';
Query OK, 1 row affected (0.02 sec)
Rows matched: 1 Changed: 1 Warnings: 0mysql> select id,name,address,localaddress,gamebuild from realmlist;
+----+---------+--------------+--------------+-----------+
| id | name | address | localaddress | gamebuild |
+----+---------+--------------+--------------+-----------+
| 1 | Trinity | 192.168.0.16 | 127.0.0.1 | 54604 |
+----+---------+--------------+--------------+-----------+
1 row in set (0.00 sec)
启动服务
执行
cd server/bin/
./worldserver
执行
./bnetserver
创建用户:
bnetaccount create test@test test
提升gm权限:account set gmlevel 1#1 3 -1
登录:
E-mail: test@test
Password: test
配置客户端
对于master版本,需要特制的game Launcher,下载地址: https://arctium.io/wow/
在_retail/config.wtf文件中加入:SET portal "192.168.0.16"
调式
FreeBSD下docker-machine提示This computer doesn't have VT-X/AMD-v enabled
docker-machine create --driver virtualbox myvm
Running pre-create checks...
Error with pre-create check: "This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory"
首先到VirtualBox里面把启用嵌套VT-x打上对勾
如果是灰色的,执行这条命令试试:C:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifyvm "freebsd15" --nested-hw-virt on
加上这条命令:--virtualbox-no-vtx-check
docker-machine create --virtualbox-no-vtx-check --driver virtualbox myvm
执行后报错"Get \"https://github.com/boot2docker/boot2docker/releases/download/v19.03.12/boot2docker.iso\": EOF"
docker-machine create --virtualbox-no-vtx-check -
Running pre-create checks...
(myvm) Image cache directory does not exist, creating it at /home/skywalk/.docker/machine/cache...
(myvm) No default Boot2Docker ISO found locally, downloading the latest release...
(myvm) Latest release for github.com/boot2docker/boot2docker is v19.03.12
(myvm) Downloading /home/skywalk/.docker/machine/cache/boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v19.03.12/boot2docker.iso...
Error with pre-create check: "Get \"https://github.com/boot2docker/boot2docker/releases/download/v19.03.12/boot2docker.iso\": EOF"
$ docker-machine create --virtualbox-no-vtx-check --driver virtualbox myvm
Running pre-create checks...
(myvm) No default Boot2Docker ISO found locally, downloading the latest release...
(myvm) Latest release for github.com/boot2docker/boot2docker is v19.03.12
(myvm) Downloading /home/skywalk/.docker/machine/cache/boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v19.03.12/boot2docker.iso...
Error with pre-create check: "Get \"https://github.com/boot2docker/boot2docker/releases/download/v19.03.12/boot2docker.iso\": EOF"
github抽风,把其它地方的boot2docker.iso文件cp到~/.docker/machine/cache目录下。
用普通用户创建的时候报错Failed to create the host-only adapter
(myvm) Check network to re-create if needed...
(myvm) Creating a new host-only adapter produced an error: /usr/local/bin/VBoxManage hostonlyif create failed:
(myvm) 0%...
(myvm) Progress state: NS_ERROR_FAILURE
(myvm) VBoxManage: error: Failed to create the host-only adapter
(myvm) VBoxManage: error: Failed to execute '/usr/local/lib/virtualbox/VBoxNetAdpCtl add 2>&1' - exit status: 32256
(myvm) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(myvm) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp
(myvm)
(myvm) This is a known VirtualBox bug. Let's try to recover anyway...
Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue
原因是没有权限。用root账户创建
root账户下网卡也没创建成功
(myvm) Creating a new host-only adapter produced an error: /usr/local/bin/VBoxManage hostonlyif create failed:
(myvm) 0%...
(myvm) Progress state: NS_ERROR_FAILURE
(myvm) VBoxManage: error: Failed to create the host-only adapter
(myvm) VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
(myvm) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(myvm) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp
(myvm)
(myvm) This is a known VirtualBox bug. Let's try to recover anyway...
Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue
我想是因为没有装virtualbox吧? 发现已经装好了。问题遗留
发现virtualbox中只能创建32位系统
这是个大问题啊,不解决后面没法继续啊!
放弃,直接虚拟出来ubuntu!
trinitycore创建数据库报错
source /home/wow/download/create_mysql.sql
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2024 GitHub, ' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Inc.
</span>
</div>
<nav aria-label="Footer">
<h3 class="sr' at line 1
发现create_mysql.sql文档有问题,wget没有下载下来,用笨方法下载。然后再source执行,ok了
运行worldserver报错Map file './maps/0000_43_31.map' does not exist!
VMap support included. LineOfSight: true, getHeight: true, indoorCheck: true
VMap data directory is: ./vmaps
Map file './maps/0000_43_31.map' does not exist!
Please place MAP-files (*.map) in the appropriate directory (./maps/), or correct the DataDir setting in your worldserver.conf file.
Unable to load map and vmap data for starting zones - server shutting down!
但是那个文件明明在那里啊!
网上有issue:Map 0000_43_31.map is missing · Issue #19791 · TrinityCore/TrinityCore · GitHub
还是有人说数据路径要用绝对路径,于是
编辑文件server/etc/worldserver.conf,使用绝对路径
# DataDir = "."
DataDir = "/home/wow/server/data"
问题解决。
报错enUS/Achievement.db2, expected 0x920E09CB, got 0x145BE391 (possibly wrong client version)
Incorrect layout hash in /home/wow/server/data/dbc/enUS/Achievement.db2, expected 0x920E09CB, got 0x145BE391 (possibly wrong client version) Incorrect layout hash in /home/wow/server/data/dbc/enUS/ContentTuning.db2, expected 0x3E5D4B74, got 0x7364682E (possibly wrong client version) Incorrect layout hash in /home/wow/server/data/dbc/enUS/ItemModifiedAppearance.db2, expected 0x0120090C, got 0xF881E7D5 (possibly wrong client version) Unable to load db2 files for enUS locale specified in DBC.Locale config!
先更新master源代码试试
cd ~/TrinityCore/
git pull origin master
然后重新编译,安装。再运行,ok了!
客户端还是登录不上
这篇关于TrinityCore最新版本master安装@ubuntu22@win10的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!