debian12+lnmp+wow simple registration安装记录备忘

1、安装Debian12

2、安装mariadb-server:如果已安装过azeroth core,已完成

3、安装nginx:
sudo apt-get update
sudo apt-get install nginx
sudo nginx-V #检查是否安装带ssl版本

访问http://ip测试连通性

4、安装php(23年7月,Debian12使用apt-get自动安装获得php版本为8.2):
sudo apt-get install php-{common,fpm,mysql,xml,xmlrpc,curl,gmp,gd,imagick,cli,dev,imap,mbstring,opcache,soap,zip,intl,pdo,pdo-mysql}

5、配置php.ini,查询php状态:
sudo nginx -t #查询nginx配置文件位置,实际是site-enabled/default,获得root /var/www/html
sudo nano /etc/php/8.2/fpm/php.ini
# 去掉extension里 curl,mysqli,curl,gmp,gd,cli,mbstring,opcache,soap,intl,pdo-mysql的注释
sudo systemctl restart php8.2-fpm
sudo nano /var/www/html/info.php
# 添加phpinfo代码

遇到php文件被下载问题:
sudo nano /etc/nginx/sites-enabled/default
取消代码注释:
location ~ \.php$ {
include snippets/fastcgi-php.conf;

# With php-fpm (or other unix sockets):
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
# With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}

nginx测试、载入配置文件,重启服务:
sudo nginx -t
sudo nginx -s reload
sudo systemctl restart nginx

重新访问info.php,查看extensions是否正确载入

6、安装wow simple registration,项目:WoWSimpleRegistration
由于我的azeroth core是单独使用一个dedicated server(acore最低需要4g内存跑起来,若全部地图载入需要16g内存),所以项目直接下载文件解压缩放到/var/www/html。

7、配置wowsimplereg:
cd /var/www/html/application/config/
sudo mv config.php.sample config.php
sudo nano config.php
# 按需修改
# baseurl为web访问网址
# server_core改为1
# db_auth和realmlist按实际情况填写,以下是web服务与azeroth core装在同服务器下,默认情况的配置
/*=====================================================================*/
$config['db_auth_host'] = 'localhost';
$config['db_auth_port'] = '3306';
$config['db_auth_user'] = 'acore';
$config['db_auth_pass'] = 'acore';
$config['db_auth_dbname'] = 'acore_auth';
/*=====================================================================*/
$config['realmlists'] = array(
"1" => array(
'realmid' => 1, // Realm ID
'realmname' => "您的realm name", // Realm Name
'db_host' => "localhost", // MySQL Host IP
'db_port' => "3306", // MySQL Host Port
'db_user' => "acore", // MySQL username
'db_pass' => 'acore', // MySQL password
'db_name' => "acore_characters" // Characters database name
)

访问index.php测试配置是否正确

8、配置https:
sudo nano /etc/nginx/sites-enabled/default
# 加入配置
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
server_name 您的域名;
ssl_certificate /etc/nginx/cert/cf.pem; #key地址可以随意
ssl_certificate_key /etc/nginx/cert/cf.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;

重新载入nginx配置后测试连通性

9、外网访问,配置服务器443端口转发到网关任意端口(电信禁用80和443)

10、如需优雅的处理外部访问必须指定端口问题,请使用cf的ddns和origin rules功能,这里就不多说了

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注