Linux 之 CentOS yum 安装 Nginx
Linux Nginx CentOS About 651 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
方法二
CentOS6
直接执行以下命令
rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
CentOS7
直接执行以下命令
rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
更多包信息可查看http://nginx.org/packages/centos
开始安装
方法一使用如下命令安装
sudo yum install nginx
方法二使用如下命令安装
sudo yum --disablerepo=epel install nginx
Views: 3,185 · Posted: 2019-03-27
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...