yum安装最新版本Nginx

 

#安装yum,存在即忽略

yum install yum-utils

#安装依赖

yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel

#配置yum源

vi /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

 

#安装

yum install nginx

posted @ 2021-05-25 16:37  小清澈  阅读(788)  评论(0编辑  收藏  举报