备份repo(防止修改错误还能还原)
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
下载新的CentOS-Base.repo 到/etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
分别运行下面命令
yum makecache
yum install epel-release
yum install nginx
默认首页:vim /usr/ share/nginx/ html/index.html
配置:/etc/ngnix/ngnix.conf
版本:ngnix -v
网友评论