WoWSimpleRegistration是azerothcore官方提供的账号注册页面的项目。
同TrinityCore类似,azerothcore也是一个模拟魔兽世界的开源项目。
WoWSimpleRegistration同样也支持TrinityCore的账号注册。
下面是网站的部署介绍。
WoWSimpleRegistration是基于php的。
sudo apt install php-fpm php-opcache php-cli php-gd php-curl php-mysql php-mbstring php-gmp
添加/etc/php/7.4/fpm/pool.d/www.conf文件下的security.limit_extensions参数
security.limit_extensions = .php .php3 .php4 .php5 .php7 .js .css .jpg .png .gif .html .htm
网站使用nginx部署,所以如下安装nginx
sudo apt install nginx
#下载
sudo wget https://github.com/TrinityCore/WoWSimpleRegistration/archive/refs/tags/2.0.2.tar.gz
#解压
sudo tar -zxvf 2.0.2.tar.gz
#将解压得到的源码,移动到/var/www/html 目录下
sudo mv WoWSimpleRegistration-2.0.2 /var/www/html/
cd /var/www/html/WoWSimpleRegistration-2.0.2/application/config
sudo cp config.php.sample config.php
sudo vi config.php
#对config.php进行配置,具体填什么选什么跟着注释走就行了
#下面列出比较重要的几个参数
Core Type: #支持的魔兽开源项目类型
0 = TrinityCore
1 = AzerothCore
2 = AshamaneCore
3 = Skyfire Project
4 = OregonCore
5 = CMangos
10 = etc
=====================================================================*/
$config['server_core'] = 0; #TC选0(默认为0)
***************** GMP REQUIRED ********************
******Uncomment extension=gmp in your php.ini******
=====================================================================*/
#21年版本的TC都选true
$config['srp6_support'] = true; // READ COMMENTS, [Please ENABLE GMP]
/*===================================================================
You Auth/Realmd MySQL information.
db_auth_host
Auth Database Host
db_auth_port
Auth Database Port
db_auth_user
Auth Database Username
db_auth_pass
Auth Database Password
db_auth_dbname
Auth Database DBName
=====================================================================*/
$config['db_auth_host'] = '127.0.0.1'; #数据库的地址
$config['db_auth_port'] = '3306'; #端口
$config['db_auth_user'] = 'root'; #用户名
$config['db_auth_pass'] = 'root'; #密码
$config['db_auth_dbname'] = 'auth'; #db名称(TC为auth)
/*===================================================================
Your character's databases.
If your server has a lot of realms you can check the example
at the bottom of the file.
=====================================================================*/
$config['realmlists'] = array(
"1" => array(
'realmid' => 1, // Realm ID
'realmname' => "WOW沸腾了", // Realm Name 服务器名称
'db_host' => "127.0.0.1", // MySQL Host IP
'db_port' => "3306", // MySQL Host Port
'db_user' => "root", // MySQL username
'db_pass' => 'root', // MySQL password
'db_name' => "characters" // Characters database name
)
);
具体nginx如何使用不在这里介绍。以下是本项目中我的配置。
cd /etc/nginx/conf.d/
vi wow.conf
#内容如下
server {
listen 80; # 监听端口
server_name 127.0.0.1; # 自己PC的ip或者服务器的域名,本地访问用的127.0.0.1
root /var/www/html/WoWSimpleRegistration-2.0.2; # 网页、文件路径
index index.html index.htm index.php index.nginx-debian.html;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
}
重启php7.4-fpm和nginx,整个项目搭建完毕。
可以点这里沸腾WOW看看我的效果