nginx 源码(1)编译

今年准备认真一下nginx源码,目的是学习网络编程,我用的源码公开发布的第一个版本 nginx-0.1.0-RELEASE,代码地址:
http://hg.nginx.org/nginx/rev/551102312e19
在浏览器里直接点左边的zip或gz就可以下载了。解压后源码目录下有4个文件夹:

  • auto
  • conf
  • docs
  • src

把auto目录下的configure文件拷贝到源码目录,运行
.configure
就可以生成Makefile,同时configure命令的输出,在我的ubuntu上看起来是这样的:

Configuration summary
+ PCRE library is not found
+ md5 library is not used
+ OpenSSL library is not used
+ using system zlib library

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using –without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using –with-pcre= option.`

未找到PCRE库,因此无法正确安装HTTP rewrite模块。
执行命令:
sudo apt-get install libpcre3 libpcre3-dev
后再执行make clean,configure;显示结果:

Configuration summary
+ using system PCRE library
+ md5 library is not used
+ OpenSSL library is not used
+ using system zlib library

nginx path prefix: /usr/local

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值