Linux系统之部署网页小游戏合集网站

Linux系统之部署网页游戏合集网站

  • 一、项目介绍
    • 1.1 项目介绍
    • 1.2 自定义配置方法
  • 二、本次实践介绍
    • 2.1 环境规划
    • 2.2 本次实践介绍
  • 三、检查本地环境
    • 3.1 检查操作系统版本
    • 3.2 检查当前yum仓库
  • 四、安装httpd软件
    • 4.1 检查yum仓库
    • 4.2 安装httpd软件
    • 4.3 启动httpd服务
    • 4.4 查看httpd服务
    • 4.5 防火墙和selinux设置
    • 4.6 浏览器测试web服务
  • 五、安装PHP
    • 5.1 清空PHP环境
    • 5.2 Remi镜像仓库介绍
    • 5.3 安装remi的yum源
    • 5.4 安装php
    • 5.5 重启httpd服务
    • 5.6 检查PHP相关模块
    • 5.7 检查PHP版本
  • 六、部署小游戏网站
    • 6.1 下载源码包
    • 6.2 查看源码目录
    • 6.3 构建项目
    • 6.4 复制网站内容
  • 七、访问小游戏网站

一、项目介绍

1.1 项目介绍

  • games项目

Games项目是一个网页小游戏合集的网站,用户可以在浏览器中直接打开并试玩其中的游戏。该网站已经自动安装了一些开源的小游戏,同时也支持定制功能,用户可以根据自己的需求对游戏进行定制。这个项目的目的是为了提供一个方便、快捷并且开放的平台,让用户能够轻松地享受到各种小游戏的乐趣。

1.2 自定义配置方法

  • 使用目录可以轻松进行可选自定义_build/custom/
  • 自定义游戏列表:复制和编辑_build/games.php_build/custom/games.php
  • 自定义标题和标题:复制和编辑_build/config.php_build/custom/config.php
  • 自定义 HTML 页眉:复制和编辑_build/templates/header.php_build/custom/header.php
  • 自定义 HTML 页面页脚:复制和编辑_build/templates/footer.php_build/custom/footer.php
  • 自定义 CSS:复制和编辑_build/templates/css.css_build/custom/css.css
  • 重建方式 php build.php install

二、本次实践介绍

2.1 环境规划

hostname 操作系统版本 IP地址 PHP版本
jeven centos 7.6 192.168.3.166 v7.4.33

2.2 本次实践介绍

1.本次实践部署环境为个人测试环境,生产环境请谨慎;
2.本次实践为部署一个开源的小游戏合集网站。

三、检查本地环境

3.1 检查操作系统版本

检查操作系统版本,本次实践操作系统为centos7.6。

[root@docker ~]# cat /etc/centos-release
CentOS Linux release 7.6.1810 (Core) 

3.2 检查当前yum仓库

检查当前的yum仓库源,默认使用的是centos镜像源,可更换阿里的镜像源。

[root@jeven html]# yum repolist enabled
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * epel: mirrors.bfsu.edu.cn
 * remi-safe: ftp.riken.jp
repo id                                              repo name                                                                                 status
appnode/x86_64                                       AppNode's RPM repository for Enterprise Linux 7 - x86_64                                   4,266
appnode-agent/x86_64                                 AppNode Agent Repository - x86_64                                                            332
appnode-ccenter/x86_64                               AppNode CCenter Repository - x86_64                                                           71
appnode-extras/x86_64                                AppNode Extras Repository - x86_64                                                            88
base/7/x86_64                                        CentOS-7 - Base - mirrors.aliyun.com                                                      10,072
epel/x86_64                                          Extra Packages for Enterprise Linux 7 - x86_64                                            13,787
extras/7/x86_64                                      CentOS-7 - Extras - mirrors.aliyun.com                                                       519
remi-safe                                            Safe Remi's RPM repository for Enterprise Linux 7 - x86_64                                 5,571
updates/7/x86_64                                     CentOS-7 - Updates - mirrors.aliyun.com                                                    5,742
repolist: 40,448

四、安装httpd软件

4.1 检查yum仓库

如果没有镜像源,可以使用阿里云的镜像源。

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
sed -i -e '/mirrors.cloud.aliyuncs.com/d' 

你可能感兴趣的:(Linux,linux,运维,服务器)