zoukankan      html  css  js  c++  java
  • linux 安装nginx

    linux系统为Centos6.5 64位

    nginx为1.4.7

    从http://nginx.org/download/上下载相应的版本

    解压 tar -zxvf nginx-1.4.7.tar.gz 

    设置一下配置信息: ./configure --prefix=/usr/local/nginx (如果不执行此命令,make的时候可能会报错【make:No targets specified and no makefile found stop】)

    make编译

    make install安装

    执行./configure --prefix=/usr/local/nginx可能会出现错误

    【错误为:】./configure: error: the HTTP rewrite module requires the PCRE library.

    【解决办法:】安装pcre-devel解决问题 yum -y install pcre-devel

    【错误为:】/configure: error: the HTTP cache module requires md5 functions
    from OpenSSL library.   You can either disable the module by using
    --without-http-cache option, or install the OpenSSL library into the system,
    or build the OpenSSL library statically from the source with nginx by using
    --with-http_ssl_module --with-openssl=<path> options.

    【解决办法:】yum -y install openssl openssl-devel

    然后启动/usr/nginx/sbin/nginx

    修改了nginx.conf文件之后,最好检查一下文件是否配置正确 执行:/usr/nginx/sbin/nginx -t

    nginx重启的话,别杀进程,再重启,执行/usr/nginx/sbin/nginx -s reload

    访问后会显示如图:

    然后就安装成功了!!!

  • 相关阅读:
    3、Spring Cloud Rest工程创建(通过IDEA创建)
    Centos7配置阿里epel源|yum源
    OSI七层模型:TCP/IP && HTTP && WebSocket && MQTT
    几种进程间的通信方式
    Tomcat类加载机制
    JAVA类加载器
    Spring事务隔离级别
    Spring事务传播特性
    Spring事务实现原理
    RPC框架Dubbo分析
  • 原文地址:https://www.cnblogs.com/ppli/p/5729896.html
Copyright © 2011-2022 走看看