1.官网
2.下载
点击右侧的download
点击下图所示的stabel_version
3.安装
根据所打开的网页的安装说明进行安装
[root@localhost yum.repos.d]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# vim nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1
安装
[root@localhost yum.repos.d]# yum install nginx
[root@localhost yum.repos.d]# nginx -v
nginx version: nginx/1.14.2
查看nginx -v版本号,能够正常看到说明已经安装成功