centos 下yum 安装nginx

centos 下yum 安装nginx

1、 直接yum install nginx不行,要先处理下源:

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

2. 查看源:

yum info nginx

这时会提示有可安装的软件包

nginx | 2.9 kB 00:00
nginx/primary_db | 15 kB 00:00
可安装的软件包
Name : nginx
Arch : x86_64
Version : 1.10.1
Release : 1.el6.ngx
Size : 821 k
Repo : nginx
Summary : High performance web server
URL : http://nginx.org/
License : 2-clause BSD-like license
Description : nginx [engine x] is an HTTP and reverse proxy
: server, as well as a mail proxy server.

3、 安装

yum -y install nginx

原文地址:https://www.cnblogs.com/mywebnumber/p/5572113.html