今天装了CentOS6.7,直接yum install Nginx不行,错误如下:
[root@localhost ~]# yum install Nginx
已加载插件:fastestmirror
设置安装进程
Loading mirror speeds from cached hostfile
* base: mirror.bit.edu.cn
* extras: mirrors.yun-idc.com
* updates: mirrors.yun-idc.com
base | 3.7 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
No package Nginx available.
错误:无须任何处理
1、首先处理下源,下面是安装完整流程,也十分简单:
[root@localhost ~]# 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.EeFe3z: Header V4 RSA/SHA1 Signature,key ID 7bd9bf62: NOKEY
Preparing... ########################################### [100%]
1:Nginx-release-centos ########################################### [100%]
2、查看yum的Nginx信息:
[root@localhost ~]# yum info Nginx
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.bit.edu.cn
* extras: mirrors.yun-idc.com
* updates: mirrors.yun-idc.com
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 install Nginx安装
[root@localhost ~]# yum install Nginx
已加载插件:fastestmirror
设置安装进程
Loading mirror speeds from cached hostfile
* base: mirror.bit.edu.cn
* extras: mirrors.yun-idc.com
* updates: mirrors.yun-idc.com
解决依赖关系
--> 执行事务检查
---> Package Nginx.x86_64 0:1.10.1-1.el6.ngx will be 安装 --> 完成依赖关系计算 依赖关系解决
=====================================================================================================================================
软件包 架构 版本 仓库 大小
=====================================================================================================================================
正在安装:
Nginx x86_64 1.10.1-1.el6.ngx Nginx 821 k
事务概要 =====================================================================================================================================
Install 1 Package(s)
总下载量:821 k
Installed size: 2.1 M
确定吗?[y/N]:y^H^[[3~^C在用户的命令下退出
Your transaction was saved,rerun it with:
yum load-transaction /tmp/yum_save_tx-2016-06-14-12-56K4938y.yumtx
[root@localhost ~]# yum install Nginx
已加载插件:fastestmirror
设置安装进程
Loading mirror speeds from cached hostfile
* base: mirror.bit.edu.cn
* extras: mirrors.yun-idc.com
* updates: mirrors.yun-idc.com
解决依赖关系
--> 执行事务检查
---> Package Nginx.x86_64 0:1.10.1-1.el6.ngx will be 安装 --> 完成依赖关系计算 依赖关系解决
=====================================================================================================================================
软件包 架构 版本 仓库 大小
=====================================================================================================================================
正在安装:
Nginx x86_64 1.10.1-1.el6.ngx Nginx 821 k
事务概要 =====================================================================================================================================
Install 1 Package(s)
总下载量:821 k
Installed size: 2.1 M
确定吗?[y/N]:y
下载软件包:
Nginx-1.10.1-1.el6.ngx.x86_64.rpm | 821 kB 00:00 运行 rpm_check_debug 执行事务测试 事务测试成功 执行事务 Warning: RPMDB altered outside of yum. 正在安装 : Nginx-1.10.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.10.1-1.el6.ngx.x86_64 1/1
已安装:
Nginx.x86_64 0:1.10.1-1.el6.ngx
完毕!
4、运行启动
[root@localhost ~]# service Nginx start
正在启动 Nginx: [确定]
[root@localhost ~]#