先安装nginx 软件源
touch /etc/yum.repos.d/nginx.repo
vi /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
安装nginx、php、php-fpm、php-mysql
yum install nginx php php-fpm php-mysql
启动nginx php-fpm
systemctl start nginx
systemctl start php-rpm
浏览器打开ip
安装完成