基于 Linux 自建怀旧游戏之 - 80 款 H5 精品小游戏合集

发布于:2024-05-07 ⋅ 阅读:(20) ⋅ 点赞:(0)

1)简介

最近又找到了一款宝藏游戏资源分享给大家,包含 80 款 H5 精品小游戏,都是非常有趣味耐玩的游戏,比如 植物大战僵尸、捕鱼达人、贪吃蛇、俄罗斯方块、斗地主、坦克大战、双人五子棋、中国象棋 等等超级好玩的 H5 小游戏,让大家一次爽个够~

Demohttp://game.wuhanjiayou.cn/

image.png

2)源码

来自:https://echeverra.cn/80h5

链接:https://pan.baidu.com/s/1Xw-iR3DKYSsGpqrpgel5gQ?pwd=66d5 
提取码:66d5

3)部署

3.1)关闭防火墙

# 关闭防火墙
[root@localhost ~] systemctl disable --now firewalld
# 关闭 SELinux
[root@localhost ~] sed -i  's/enforcing/disabled/g' /etc/selinux/config 
[root@localhost ~] setenforce 0

3.2)安装 NGINX

# 安装 nginx 软件包
[root@localhost ~] yum install nginx -y

# 启用 nginx 服务
[root@localhost ~] systemctl enable --now nginx

3.3)上传源码

# 上传源码并解压
[root@localhost ~] unzip 80h5.zip

# 拷贝源码前端数据至 nginx 的默认站点目录
[root@localhost ~] cp -r 80h5/* /usr/share/nginx/html/
cp: overwrite ‘/usr/share/nginx/html/404.html’? y			# 覆盖
cp: overwrite ‘/usr/share/nginx/html/index.html’? y		# 覆盖

3.4)修改端口号

1. 重命名 nginx 模板文件
[root@localhost ~] cd /etc/nginx
[root@localhost ~] mv nginx.conf.default nginx.conf
mv: overwrite ‘nginx.conf’? y		# 覆盖

2. 编写 nginx 配置文件
[root@localhost ~] vim /etc/nginx/nginx.conf
listen 8080;									  # 修改端口号信息
index  index.html index.htm;		# 配置支持 htm 文件的识别 ( 重要 )

3. 生效配置文件
[root@localhost ~] nginx -t
[root@localhost ~] systemctl reload nginx

image.png

4)访问验证

使用浏览器访问 http://服务器IP地址:8080

image.png

植物大战僵尸

image.png

维京战争

image.png

飞机大战

image.png

中国象棋

image.png

坦克大战

image.png

像素小鸟飞行

image.png

斗地主

image.png

大功告成~