zoukankan      html  css  js  c++  java
  • Nginx之旅系列

    题记:Nginx之旅系列是用来记录Nginx从使用到源码学习的点点滴滴,分享学习Nginx的快乐

     

    Nginx 首页: http://nginx.org/


    Nginx的configuration


            今天对Nginx开始小试牛刀,其实对Nginx几年之前便久仰大名,由于之前精力一直局限在TCP/IP协议栈,也只是偶尔看看Nginx相关的资料。最近计划把协议栈传输层和传输之上层结合Nginx一起看,也算是从应用程序的角度来协议栈,学以致用。


    对于Nginx的编译配置以及安装其实没什么好说的,但是今天在./configuration的时候发现了一个小问题网上有的帖子没有说明白,就是配置的时候会check相关的库函数。我们可以看到

    目录nginx-1.5.2/auto/lib下相关的库包括:

    geoip  google-perftools  libatomic  libgd  libxslt  md5  openssl  pcre  perl  sha1  zlib


    其中的一处错误提示是:

    ./configure: error: the HTTP gzip module requires the zlib library.

    You can either disable the module by using --without-http_gzip_module
    option, or install the zlib library into the system, or build the zlib library
    statically from the source with nginx by using --with-zlib=<path> option.

    看到网上很多帖子的解决办法是 apt-get install libssl-dev,但是估计很多人还是不明白为什么zlib和libssl-dev有什么关系。其实在apt-get install libssl-dev的时候会安装三个相关的文件:  libssl-dev, libssl-doc, zlib1g-dev。上面的错误其实可以直接apt-get install zlib1g-dev,避免重复的安装相同的库文件。这个其实不是什么重要的问题,但是既然遇到了,就报着治学的态度还是知其然知其所以然吧。




  • 相关阅读:
    -bash: fork: Cannot allocate memory 问题的处理
    Docker top 命令
    docker常见问题修复方法
    The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)
    What's the difference between encoding and charset?
    hexcode of é î Latin-1 Supplement
    炉石Advanced rulebook
    炉石bug反馈
    Sidecar pattern
    SQL JOIN
  • 原文地址:https://www.cnblogs.com/jiangu66/p/3198841.html
Copyright © 2011-2022 走看看