通过rpm 添加yum源

rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

安装

yum -y install nginx

设置启动nginx同时以开机自动运行

systemctl start nginx.service
systemctl enable nginx.service

转自:https://www.cnblogs.com/Liang-jc/p/8137956.html

posted on 2018-11-15 11:20  mrma1989  阅读(335)  评论(0编辑  收藏  举报