更多内容,请查看博客原文:通过yum源安装nginx
https://finolo.gy/2020/01/通过yum源安装nginx/
前置依赖,安装这个的目的是可以使用sudo yum-config-manager --enable nginx-mainline
命令
sudo yum install yum-utils
创建yum仓库配置文件
/etc/yum.repo.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
[nginx-mainlne]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
安装nginx
sudo yum install nginx
更多内容,请查看博客原文:通过yum源安装nginx
https://finolo.gy/2020/01/通过yum源安装nginx/