
这里我们以:CENTOS 7.6 64为例
教程演示虚拟机地址:123.207.42.5 外网和局域网类似
安装宝塔直接运行命令即可。
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
输入y回车确认安装
输入n取消安装SSL
搭建环境:
Nginx 1.22
mysql5.6
php5.6
1、关闭防火墙、开放端口
systemctl stop firewalld
systemctl disable firewalld
防火墙不关闭也行
宝塔放行端口:1:65535
或单独打开
PS:如果使用腾讯云或阿里云记得把控制台的端口也打开
2、上传lt.zip到服务器根目录(根目录不是root目录!!使用WinSCP或其他工具上传数据,也可以直接宝塔传!!)
解压lt.zip
cd /home
unzip lt.zip
给予 777权限
chmod 777 -R /home
3.环境配置
无
4、设置数据库密码为:123456(在宝塔直接设置)
修改 /home/sql/globaldata.sql文件里面的ip 改成你服务器ip 还有区名
导入数据库
命令行输入
cd /home
./sk
数据库创建结束。可以通过宝塔查看是否创建成功。(数据库 – 点击 从服务器获取 获取到X个就正确的)
运行后为了安全可以把 sk 文件删除
6、搭建网站
新建一个网站-你的ip:端口 或域名:端口
有端口就添加端口这里的端口88
网站目录设置/home/www
———————————————————————
7、服务端和网站修改 123.207.42.5 修改为你的IP
无需修改
到此算服务端就可以了
7、启动游戏服务
启动一区:
cd /home/server/s1&& ./run.sh
启动二区:
cd /home/server/s2&& ./run.sh
启动跨服:
cd /home/server/s99&& ./run.sh
启动后可以通过命令:netstat -lntp 查看启动端口
关闭一区:
cd /home/server/s1&& ./stop.sh
关闭二区:
cd /home/server/s2&& ./stop.sh
关闭跨服:
cd /home/server/s99&& ./stop.sh
查看端口:
netstat -lntp
有9001就可以了
游戏地址:
http://ip:88
可以正常登陆。
好了。本期教程到此结束。
祝君好运。。。。
其他自行研究吧。。。
PS:
简单介绍下GM后台使用
gm后台:
http://ip:88/gm/
账号admin
密码:syymw.com


























