一键安装上面四个依赖
yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel
使用yum安装nginx需要包括Nginx的库,安装Nginx的库
rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
使用下面命令安装nginx
yum install nginx
service nginx start
然后在浏览器上直接输入47.106.***.**就可以显示nginx了
重启命令。在sbin 下 ./nginx -s reload