CentOS release 6.6 nginx install

Posted zengjf

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS release 6.6 nginx install相关的知识,希望对你有一定的参考价值。

/*************************************************************************
 *                CentOS release 6.6 nginx install 
 * 说明:
 *     在VPS上安装nginx,以供有些时候无聊使用。
 * 
 *                                     2016-11-26 深圳 南山平山村 曾剑锋
 ************************************************************************/

一、参考文档:
    Centos6 下的 nginx 安装  
        http://blog.163.com/[email protected]/blog/static/17266492820121119111120164/

二、安装nginx:
    1. 错误:
        [[email protected] ~]# yum install nginx
        Loaded plugins: fastestmirror
        Setting up Install Process
        Loading mirror speeds from cached hostfile
         * base: mirrors.usc.edu
         * extras: mirror.scalabledns.com
         * updates: mirror.hostduplex.com
        No package nginx available.
        Error: Nothing to do
    2. 解决办法:
        wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
        rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm 
    3. 安装:
        [[email protected] ~]# yum install nginx
        Loaded plugins: fastestmirror
        Setting up Install Process
        Loading mirror speeds from cached hostfile
         * base: mirrors.usc.edu
         * extras: mirror.scalabledns.com
         * updates: mirror.hostduplex.com
        nginx                                                    | 2.9 kB     00:00     
        nginx/primary_db                                         |  19 kB     00:00     
        Resolving Dependencies
        --> Running transaction check
        ---> Package nginx.i386 0:1.10.2-1.el6.ngx will be installed
        --> Finished Dependency Resolution

        Dependencies Resolved

        ================================================================================
         Package        Arch          Version                      Repository      Size
        ================================================================================
        Installing:
         nginx          i386          1.10.2-1.el6.ngx             nginx          844 k

        Transaction Summary
        ================================================================================
        Install       1 Package(s)

        Total download size: 844 k
        Installed size: 2.0 M
        Is this ok [y/N]: y
        Downloading Packages:
        nginx-1.10.2-1.el6.ngx.i386.rpm                          | 844 kB     00:01     
        Running rpm_check_debug
        Running Transaction Test
        Transaction Test Succeeded
        Running Transaction
        Warning: RPMDB altered outside of yum.
          Installing : nginx-1.10.2-1.el6.ngx.i386                                  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.2-1.el6.ngx.i386                                  1/1 

        Installed:
          nginx.i386 0:1.10.2-1.el6.ngx                                                 

        Complete!
        [[email protected] ~]# 

 

以上是关于CentOS release 6.6 nginx install的主要内容,如果未能解决你的问题,请参考以下文章

centos 6.6编译安装nginx--来自阿里云帮助文档

Centos 6.6 下 nginx +php mysql + phpMyadmin 安装部署

带有Nginx 1.6.2的CentOS 6.6 - 突然无法重启nginx - nginx:[emerg] open()“/ usr / share / nginx / on”失败(13:权限被拒绝

CentOS 6.6编译安装Nginx1.6.2+MySQL5.6.21+PHP5.6.3

linux install SVN (CentOS_6.6)

CentOS 6.6 搭建Zabbix 3.0.3 过程