【百恋成仙H5】Linux服务端架设教程!

以本站架设游戏为例

测试系统:CentOS 7.6

安装宝塔

yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh

输入y回车确认安装

安装环境
Nginx 1.24
MySQL 8.0
PHP 7.1
宝塔-网站-Java项目-Java环境管理-安装 jdk-17.0.8–命令行版本设置为安装的 jdk-17.0.8

宝塔放行端口:1-65535

关闭防火墙

systemctl stop firewalld.service
systemctl disable firewalld.service

上传服务端home.zip到服务器的根目录

解压

cd /
unzip home.zip

给权限

chmod -R 7777 /home

立即生效:

source /etc/profile

修改服务端文件IP:替换:118.25.55.225

使用命令批量修改:把“你的IP”替换为服务器IP再运行命令

find /home -type f -name '*.*' | xargs sed -i 's/118.25.55.225/114.67.75.116/g'

以下为具体文件路径:
\home\web-mobile\internal.json
\home\server\blcx-center\config\core-config.properties
\home\web-mobile\assets\app\index.07129.js
\home\server\blcx-center\actuator\ui\static\js\app.c3a2891e.js
\home\server\blcx-center\actuator\ui\static\js\chunk-1b7dc73a.4908cf69.js
\home\server\blcx-center\actuator\ui\static\js\chunk-2d3937ee.0e0c438a.js
\home\server\blcx-center\actuator\ui\static\js\chunk-5363a573.ed711e2c.js
\home\server\blcx-center\actuator\ui\static\js\chunk-612fab9d.213e9298.js
\home\server\blcx-center\actuator\ui\static\js\chunk-65fef222.4ebeef98.js
\home\server\blcx-center\actuator\ui\static\js\chunk-76e4cac9.8b6aee4e.js
\home\server\blcx-center\actuator\ui\static\js\chunk-acf25570.cf00e2fa.js
\home\server\blcx-center\actuator\ui\static\js\chunk-c0f314c8.88ea8c18.js
\home\sql\blcx_center.sql

设置数据库root密码为:123456

导入数据库:

cd /home
./sk

创建网站:

IP:99

网站目录指向:/home/web-mobile

启动游戏:

cd /home/server
./start.sh

关闭游戏:

cd /home/server
./stop.sh

游戏地址:

http://114.67.75.116:99

————————————————————————————

源码来源与网络。本源码只是供大家研究学习之用。请大家不要用于商用,否者如引起一切纠纷和本人与论坛无关,后果自负,请下载后24小时内删除!!!

请登录后发表评论

    没有回复内容