- 设置yum repository, 创建
/etc/yum.repos.d/nginx.repo
文件, 并加入以下内容
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1
yum info nginx
yum install nginx
/etc/yum.repos.d/nginx.repo
文件, 并加入以下内容[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1
yum info nginx
yum install nginx