
































服务器系统:centos7.6
安装宝塔
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
安装环境
Nginx1.18
Mysql5.6
Php5.4
开放端口:1:65535
关闭防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service
上传服务端到服务器根目录
解压
cd / && tar -zxvf tsqt.tar.gz
给权限
chmod -R 777 /data/
chmod -R 777 /usr/java/
chmod -R 777 /www/wwwroot/game
设置数据库密码为:123456
修改mysql配置26行加上
lower_case_table_names=1
重载配置
重启数据库
修改数据库IP 43.142.252.133
\data\sql\gm_manage_sg_002.sql
导入数据库
cd /data
./sk
创建网站
网站端口:81 安卓高版本需要域名配置SSL
网站目录:/www/wwwroot/game
关闭防跨站
设置伪静态:rewrite ^/(.*).hl$ /$1.php last;
配置环境
修改etc/profile文件最后添加如下
set java environment
JAVA_HOME=/usr/java/jdk1.8.0_241
JRE_HOME=/usr/java/jdk1.8.0_241/jre
CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME JRE_HOME CLASS_PATH PATH
立即生效
source /etc/profile
修改服务端IP 43.142.252.133
\data\gameserver\db_s1\logcenter.conf
\data\gameserver\db_s2\logcenter.conf
\data\gameserver\fight_s1\fightserver.conf
\data\gameserver\game_s1\config.lua
\data\gameserver\game_s1\gameworld.conf
\data\gameserver\game_s1\logcenter.conf
\data\gameserver\game_s1\loginserver.conf
\data\gameserver\game_s2\config.lua
\data\gameserver\game_s2\gameworld.conf
\data\gameserver\game_s2\logcenter.conf
\data\gameserver\game_s2\loginserver.conf
\data\gway-002\bin\WEB-INF\classes\server.properties 手动改
批量替换ip命令
find /data -type f -name ‘*.conf’ | xargs sed -i ‘s/43.142.252.133/43.154.102.30/g’
find /data -type f -name ‘*.lua’ | xargs sed -i ‘s/43.142.252.133/43.154.102.30/g’
启动游戏
cd /data/
./start.sh
关闭游戏
cd /data/
./stop.sh
客户端修改
安卓
\assets\channel_config.json 本地验证accessOpenApiUrl改成自己的 安卓高版本必须用域名配置SSL
\assets\launch\LaunchHelper.lua 解密后把地址改成自己的
苹果
\Payload\mmoGame.app\channel_config.json
\Payload\mmoGame.app\launch\LaunchHelper.lua
GM后台:http://IP:81/gm/gm.php
GM码:syymw.com
CDK后台:http://IP:81/cdk
GM码:syymw.com
友情提示:如果是阿里云或者腾讯云架设 请注意端口是否开放。