去官方站点获取yum仓库
[root@web01 ~]# cat /etc/yum.repos.d/nginx.repo [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/7/$basearch/ gpgcheck=0 enabled=1
yum nginx最新版安装
原文:https://www.cnblogs.com/john5yang/p/10203953.html