通过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
原文地址:https://www.cnblogs.com/mrma/p/9962414.html
时间: 2024-11-05 21:47:23