添加Nginx yum源
vim /etc/yum.repos.d/nginx.repo
[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1
列出已经配置的所有可用仓库
yum repolist
安装Nginx服务器
yum install nginx -y
启动Nginx服务,并设置开机启动
systemctl start nginx systemctl enable nginx
文章评论