Linux 之 CentOS yum 安装 Nginx

Linux Nginx CentOS About 469 words

添加 Nginx 源

方法一

sudo vim /etc/yum.repos.d/nginx.repo

插入内容

  • Centos6
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/6/$basearch/
gpgcheck=0
enabled=1
  • Centos7
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1

方法二

直接执行以下命令(CentOS7修改为对应的即可,可查看http://nginx.org/packages/centos

rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm

开始安装

sudo yum install nginx
Views: 3,024 · Posted: 2019-03-27

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh