转自  http://wlheihei.com/view/64

[root@51ou.com yum.repos.d]# yum install nginx
Loaded plugins: fastestmirror, priorities, refresh-packagekit, security
Loading mirror speeds from cached hostfile
163 packages excluded due to repository priority protections
Setting up Install Process
No package nginx available.
Error: Nothing to do

没法使用yum安装

百度之,找到的第一个答案是没有安装EPEL,则安装之

[root@51ou.com yum.repos.d]# rpm -Uvh ftp://ftp.univie.ac.at/systems/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
Retrieving ftp://ftp.univie.ac.at/systems/linux/fedora/epel/6/x86_64/epel-release-6-

8.noarch.rpm
Preparing...                ##################
###### [100%]
package epel-release-6-8.noarch is already installed

之后照样执行yum install nginx依然错误

之后发现这台机器上已经编译安装过nginx,找一台新机器,尝试后依然错误。

[root@51ou.com local]# yum info nginx
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.cug.edu.cn
 * extras: mirrors.cug.edu.cn
 * updates: mirrors.cug.edu.cn
Error: No matching Packages to list

经查询原来是没有nginx的yum源包

直接安装一个nginx的yum源文件

[root@51ou.com local]# rpm -ivh http://nginx.org/packages/centos/
6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
Retrieving http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-

0.el6.ngx.noarch.rpm
warning: /var/tmp/rpm-tmp.y29UIV: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY
Preparing...                ######################## [100%]
   1:nginx-release-centos   ########################### [100%]

[root@51ou.com local]# cd /etc/yum.repos.d/
[root@51ou.com yum.repos.d]# ll
总用量 20
-rw-r--r--. 1 root root 1926 12月  9 2011 CentOS-Base.repo
-rw-r--r--. 1 root root  637 12月  9 2011 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  626 12月  9 2011 CentOS-Media.repo
-rw-r--r--. 1 root root  113 10月 14 2011 nginx.repo
-rw-r--r--. 1 root root 1250 11月  8 17:40 puppetlabs.repo

就可以使用yum install nginx安装了
    
[root@51ou.com local]# yum install nginx

Setting up Install Process

Loading mirror speeds from cached hostfile

* epel: mirrors.opencas.cn

nginx                                                              
                                                                       
                                 | 2.9 kB     00:00

nginx/primary_db                                                  
                                                                       
                                  | 8.3 kB     00:00

Resolving Dependencies

--> Running transaction check

---> Package nginx.x86_64 0:1.8.1-1.el6.ngx will be installed

--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================================================

Package                                     Arch                  
                      Version                                          
      Repository                                   Size

====================================================================================================================================================================================================

Installing:

nginx                                       x86_64                
                      1.8.1-1.el6.ngx                                  
      nginx                                       352 k

Transaction Summary

====================================================================================================================================================================================================

Install       1 Package(s)

Total download size: 352 k

Installed size: 872 k

Is this ok [y/N]: y

Downloading Packages:

nginx-1.8.1-1.el6.ngx.x86_64.rpm                                  
                                                                       
                                  | 352 kB     00:12

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Warning: RPMDB altered outside of yum.

Installing : nginx-1.8.1-1.el6.ngx.x86_64                        
                                                                       
                                                    1/1

----------------------------------------------------------------------

Thanks for using nginx!

Please find the official documentation for nginx here:

* http://nginx.org/en/docs/

Commercial subscriptions for nginx are available on:

* http://nginx.com/products/

----------------------------------------------------------------------

Verifying  : nginx-1.8.1-1.el6.ngx.x86_64                        
                                                                       
                                                    1/1

Installed:

nginx.x86_64 0:1.8.1-1.el6.ngx

Complete!

centos6 yum 安装nginx 不成功解决办法的更多相关文章

  1. Centos6 yum安装nginx

    1.Centos6系统库中默认是没有nginx的rpn包的,所以我们需要先更新下rpm依赖库 (1):使用yum安装nginx,安装nginx库 rpm -Uvh http://nginx.org/p ...

  2. CentOS-6 yum安装nginx php53 mysql55 搭建LNMP环境

    1.导入外部软件库 01.rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/epel-release-6-5.noa ...

  3. Centos7下yum安装软件报错解决办法

    Traceback (most recent call last): File "/usr/bin/yum", line 29, in yummain.user_main(sys. ...

  4. Ubuntu安装Nginx 问题以及解决办法

    Error1 the HTTP rewrite module requires the PCRE library sudo apt-get update sudo apt-get install li ...

  5. Linux -- Centos6 yum安装相关问题与处理

    Centos6 yum安装相关问题与处理 由于要使用yum下载文件,突然yum下载不了想要的文件,想更换yum源,结果得重新安装yum 来自本人GitHub地址https://github.com/m ...

  6. 返回xml过长时被nginx截断的解决办法

    返回xml过长时被nginx截断的解决办法 问题描述:通过网页获取数据,数据格式为xml.当xml比较短时,可以正常获取数据.但是xml长度过长时不能正常获取数据,通过观察返回数据的源代码,发现xml ...

  7. yum安装nginx,配置资源访问出现403Forbidden问题

    使用yum安装nginx后除了nginx自带页面其他配置页面都是403forbidden问题. 暂时的解决办法是,修该nginx配置文件中的user为root , 然后关闭seliunx或者添加ngi ...

  8. [转]CENTOS 6.5 配置YUM安装NGINX+服务器负载均衡

    原文连接: CENTOS 6.5 配置YUM安装NGINX  http://blog.sina.com.cn/s/blog_69f467b70102uyux.html 参考博文: Centos下安装. ...

  9. sublime text 3 无法安装Package Control插件解决办法

    sublime text 3 无法安装Package Control插件解决办法 ***关于sublime text 3 常用的 Package Control插件的安装方法*** 1.CTRL+` ...

随机推荐

  1. Git之代码合并及分支管理

    环境说明: 对于一个git项目而言,公司在gitlab上有对应的三个分支,以kazihuo项目为例说明,分别是development.master.testing,运维首先在gitlab上创建一个gr ...

  2. grpc-gateway:grpc转换为http协议对外提供服务

    我所在公司的项目是采用基于Restful的微服务架构,随着微服务之间的沟通越来越频繁,就希望可以做成用rpc来做内部的通讯,对外依然用Restful.于是就想到了google的grpc. 使用grpc ...

  3. 单进程单线程的Redis如何能够高并发

    redis快的原因: 1.纯内存操作2.异步非阻塞 IO 参考文档: (1)http://yaocoder.blog.51cto.com/2668309/888374 (2)http://www.cn ...

  4. 针对TCP连接异常断开的分析

    我们知道,一个基于TCP/IP的客户端-服务器的程序中,正常情况下,我会是启动服务器使其在一个端口上监听请求,等待客户端的连接:通过TCP的三次握手,客户端能够通过socket建立一个到服务器的连接: ...

  5. SQL Server 2008 R2 企业版安装教程

    1 安装包解压 2 解压后,打开setup.exe文件,选择安装,显示如图: 3 选择全新安装或向现有安装添加功能 4 点确定 5 输入 企业版序列号:R88PF-GMCFT-KM2KR-4R7GB- ...

  6. Is it possible to create @Around Aspect for feign.Client

    https://github.com/spring-cloud/spring-cloud-openfeign/issues/59 看到github 有人问这个问题,做了个示例: import org. ...

  7. Scrapy可视化管理软件SpiderKeeper

    通常开发好的Scrapy爬虫部署到服务器上,要不使用nohup命令,要不使用scrapyd.如果使用nohup命令的话,爬虫挂掉了,你可能还不知道,你还得上服务器上查或者做额外的邮件通知操作.如果使用 ...

  8. 【BZOJ】2434: [Noi2011]阿狸的打字机 AC自动机+树状数组+DFS序

    [题意]阿狸喜欢收藏各种稀奇古怪的东西,最近他淘到一台老式的打字机.打字机上只有28个按键,分别印有26个小写英文字母和'B'.'P'两个字母. 经阿狸研究发现,这个打字机是这样工作的: l 输入小写 ...

  9. Jenkins02:Jenkins+maven+svn集成

    1.安装Maven并配置环境变量 下载maven(windows下载zip包,linux下载tar.gz包),然后配置环境变量 在项目中使用maven,可以从java中央仓库中获取到项目所依赖的jar ...

  10. [转]CNN目标检测(一):Faster RCNN详解

    https://blog.csdn.net/a8039974/article/details/77592389 Faster RCNN github : https://github.com/rbgi ...