1、首先确认搭建基本环境
yum -y install wget
yum -y install curl
yum -y install gcc make zlib-devel pcre pcre-devel openssl-devel
yum -y install gcc*
yum install autoconf
yum -y install lsof vim
2、导入相关源并安装
(1)php-fpm
yum install epel-release
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum -y install php72w-cli php72w-common php72w-devel php72w-mysql
yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum update #软件升级
yum install yum-utils #yum-utils 可以扩展yum的默认功能 用于管理yum存储库以及程序包
yum -y install php74 php74-php-devel #安装php-fpm
yum -y install php74-php-gd php74-php-pdo php74-php-mbstring php74-php-cli php74-php-fpm php74-php-mysqlnd
(2)nginx
rpm -Uvh http://nginx.org/package