centos7 php7.2环境搭建
安装nginx
如果是控系统先安装nginx 依赖的一些 lib 库:
yum install gcc-c++
yum install pcre pcre-devel
yum install zlib zlib-devel
yum install openssl openssl--devel
// 查看yum源
yum list | grep nginx
//检查一下安装已有的 nginx
find -name nginx
//如果系统安装了Nginx,那么卸载
yum remove nginx
//这三步也可以忽略
选择想要下载的版本
// 没有版本要求直接安装
yum install nginx
确认需要下载的版本,没问题直接 y y y 看见Complete! 安装完成
// 查看版本
nginx -v
// 检测配置文件
nginx -t
// 启动 .service 可以省略
systemctl start nginx.service
// 停止
systemctl stop nginx
//重启
systemctl restart nginx
//热启动
systemctl reload nginx
//设置开启启动
systemctl enable nginx
//取消开机启动
systemctl disable nginx
//查看服务状态
systemctl status nginx
//查看进程
ps -aux | grep nginx
这时候直接输入ip 就已经可以成功访问了
安装php7.2
// 首先安装epel-release 升级软件包
yum install epel-release
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
什么是EPEL 及 Centos上安装EPEL
RH