centos7系统库中默认是没有nginx的rpm包的,所以我们自己需要先更新下rpm依赖库
使用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 -y nginx
启动Nginx
#/etc/init.d/nginx start
#service nginx start
#systemctl start nginx.service
网友评论