打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
ubuntu10.04 下 nginx1.0.3安装记录

ubuntu10.04 下 nginx1.0.3安装记录

青一 发布于 6个月前,共有 0 条评论

下午回来准备晚上安装下 这个最新版到瞧瞧,忙完后就坐电脑前了,老毛病又犯了,坐着坐着就又睡着了,过了12点就又醒了,做事不能半途而废,虽然已经不能够  “今日事,今日毕” 啦  废话结束。

nginx 在./configure阶段会提示缺少一些库

缺少pcre 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=<path> option.

 

解决方法:下载安装pcre-8.12解决问题,解压后对pcre进行如下操作

./configure

make

sudo make install

运气好一次通过,运气不好,make pcre时会出错

我就属于后者

libtool: compile: unrecognized option `-DHAVE_CONFIG_H'

libtool: compile: Try `libtool --help' for more information.

make[1]: *** [pcrecpp.lo] Error 1

make[1]: Leaving directory `/home/xxx/pcre-8.12'

make: *** [all] Error 2

这个问题我找到到解决方法就是  sudo apt-get install libtool    然后回去pcre就可以正常安装了

再次./configure 时提示还缺少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.

下载一个安装就可以,官网已经被X,在我们这个站有个下载链接是链接到一个国外一个开源站到下载点,安装没遇到问题

条件都已满足,接下来关注nginx安装过程

./configure  正常

make  出问题了  好像提示就是下面这样,

> > src/event -I src/event/modules -I src/os/unix -I objs > > 		-o objs/src/core/ngx_crypt.o > > 		src/core/ngx_crypt.c> > cc1: warnings being treated as errors> > src/core/ngx_crypt.c: In function Б─≤ngx_crypt_apr1Б─≥:> > src/core/ngx_crypt.c:76: warning: pointer targets in passing argument 2 ofБ─≤ngx_md5_updateБ─≥ differ in signedness

google了下(先百度了下,结果很瞎)在nginx邮件列表中看到了解决方法,1.0.3版本到一个bug

解决方法不细写了,网址贴出来留念 

http://forum.nginx.org/read.php?2,201470

http://permalink.gmane.org/gmane.comp.web.nginx.english/27068

下一步 sudo make install 没遇到问题

启动nginx到时候遇到了问题,

提示:error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory

解决方法,在/lib中创建一个symbol link到/usr/local/lib/libpcre.so.0.1

命令

sudo ln /usr/local/lib/libpcre.so.0.0.1 /lib/
sudo ln /usr/local/lib/libpcre.so.0 /lib/

 

然后启动时发现端口被占了,想起来前两天安装绿apache玩,暂不知如何该默认端口  直接卸了apache

然后启动nginx,

Welcome to nginx!

 

文中很多片段都是从网上copy下到,感觉遇到到问题还挺多到,就集合一下做个备份,省的以后再造轮子


本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
交叉编译PHP5、Nginx、Squid的详细步骤
ubuntu下安装nginx时PCRE库、zlib库、OpenSSL库的安装
centos编译安装nginx,及其编译参数解析
手动编译 Nginx 并安装 VeryNginx
Nginx编译参数大全 configure参数中文详解
nginx 编译参数详解(运维不得不看)
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服