• CentOS 中安装nginx


    Centos6.8 yum  安装 nginx

     1:使用yum安装nginx,安装nginx库

    [root@hadoop110 //]# rpm -Uvh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
    [root@hadoop110 //]# rpm -Uvh 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.vs8gI4: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY
    Preparing...                ########################################### [100%]
       1:nginx-release-centos   ########################################### [100%]

     

    2.使用下面命令安装nginx

    [root@hadoop110 //]# yum -y install nginx
    [root@hadoop110 //]# yum -y install nginx
    已加载插件:fastestmirror, refresh-packagekit, security
    设置安装进程
    Loading mirror speeds from cached hostfile
     * base: mirror.bit.edu.cn
     * extras: mirror.bit.edu.cn
     * updates: mirrors.aliyun.com
    base                                                                                              | 3.7 kB     00:00     
    extras                                                                                            | 3.4 kB     00:00     
    nginx                                                                                             | 2.9 kB     00:00     
    nginx/primary_db                                                                                  |  45 kB     00:00     
    updates                                                                                           | 3.4 kB     00:00     
    解决依赖关系
    --> 执行事务检查
    ---> Package nginx.x86_64 0:1.14.2-1.el6.ngx will be 安装
    --> 完成依赖关系计算
    
    依赖关系解决
    
    =========================================================================================================================
     软件包                   架构                      版本                                  仓库                      大小
    =========================================================================================================================
    正在安装:
     nginx                    x86_64                    1.14.2-1.el6.ngx                      nginx                    957 k
    
    事务概要
    =========================================================================================================================
    Install       1 Package(s)
    
    总下载量:957 k
    Installed size: 2.6 M
    下载软件包:
    nginx-1.14.2-1.el6.ngx.x86_64.rpm                                                                 | 957 kB     02:17     
    运行 rpm_check_debug 
    执行事务测试
    事务测试成功
    执行事务
    Warning: RPMDB altered outside of yum.
      正在安装   : nginx-1.14.2-1.el6.ngx.x86_64                                                                         1/1 
    ----------------------------------------------------------------------
    
    Thanks for using nginx!
    
    Please find the official documentation for nginx here:
    * http://nginx.org/en/docs/
    
    Please subscribe to nginx-announce mailing list to get
    the most important news about nginx:
    * http://nginx.org/en/support.html
    
    Commercial subscriptions for nginx are available on:
    * http://nginx.com/products/
    
    ----------------------------------------------------------------------
      Verifying  : nginx-1.14.2-1.el6.ngx.x86_64                                                                         1/1 
    
    已安装:
      nginx.x86_64 0:1.14.2-1.el6.ngx                                                                                        
    
    完毕!

     

    3:启动nginx

    [root@hadoop110 //]# service nginx start
    正在启动 nginx:                                           [确定]
    [root@hadoop110 //]# 

    4.浏览器查看一下

    http://localhost/

     

  • 相关阅读:
    C++:变量声明和定义的关系
    Docker 方式搭建 zookeeper + kafka 集群
    Centos7.6系统下docker的安装
    CentOS7服务器下安装配置SSL
    《深入浅出密码学》|ing
    车联网入侵检测技术(持续更新)
    Hive的安装及交互方式
    Centos7中安装MySQL5.7记录
    Zookeeper-分布式锁代码实现
    【Java】String字符串的最大长度
  • 原文地址:https://www.cnblogs.com/zhukaixin/p/10192313.html
Copyright © 2020-2023  润新知