本帖付費內容售價 10钻石 本帖部分内容需要扣减积分,您尚未登录,请 登录 或 注册
龙玉传说
测试系统 CentOS 7.x
安装宝塔
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
安装环境
Nginx 1.18
MySQL 5.6.5
PHP7.0 (安装redis扩展、Swoole扩展)
Redis
放行端口:1:65535
关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
上传data.zip 到服务器根目录
解压
cd /
unzip data.zip
给权限
chmod -R 777 /data
新建站点:127.0.0.1:5100
网站目录 /data/htdocs/sword_lord/server/api/www
关闭防跨站
设置伪静态
rewrite ^(?i)/admin1/(.*)$ /yz.php/$1 last;
配置文件 第8行开始增加
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Expose-Headers' 'X-Requested-With';
配置文件 第50行 回车 开始增加
location / {
expires -1s; #禁止缓存
try_files $uri $uri/ /action.php?$query_string;
}
新建站点 IP
网站目录 /data/htdocs/sword_lord/client/web
关闭防跨站
软件商店 Redis 配置文件第二行加入改为
requirepass l123
maxclients 10000
重载配置
重启
软件商店 PHP
配置修改 修改 memory_limit 为1024M脚本内存限制
性能调整 并发方案选择4GB内存
重载配置
重启
服务端IP修改 替换:106.55.254.14
\data\htdocs\sword_lord\client\web\index.html
\htdocs\sword_lord\server\api\config\mysql.php
\htdocs\sword_lord\server\api\config\redis.php
\data\htdocs\sword_lord\server\api\www\client.php
\data\htdocs\sword_lord\server\sbin\init.php
宝塔设置数据库密码为:123456
修改/data/sql/lx_lord.sql 数据库IP 替换:106.55.254.14 为你服务器IP
导入数据库
cd /data
./sk
安装环境
cd /data/htdocs/sword_lord/server
./install.sh
宝塔软件商店
重启 nginx php redis
重启服务器
reboot
启动游戏
cd /data/htdocs/sword_lord/server/sbin
sh start-keep.sh
关闭游戏
cd /data/htdocs/sword_lord/server/sbin
sh host-stop.sh
游戏地址:
http://IP
游戏后台
总后台:http://IP/xzj.php
GM码:123123
CDK 后台:http://IP/cdk
GM码:123123
玩家激活后台:http://IPIP/pay
玩家后台:IP/vip
重新上游戏生效
|
|