yum官方源安装nginx CentOS7

╄→гoц情女王★ 提交于 2020-02-02 21:23:13
#更新nginx官方yum源 http://nginx.org/en/linux_packages.html#RHEL-CentOS
#编辑以下信息到文件 /etc/yum.repos.d/nginx.repo
vim /etc/yum.repos.d/nginx.repo

[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true

#安装软件
yun install -y nginx
#启动服务
systemctl start nginx		#CentOS7
systemctl enable nginx		#CentOS7
#查看服务状态
systemctl status nginx		#CentOS7
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!