nigx pcre openssl zlib安装配置

来源:互联网 发布:手机号被绑定淘宝账号 编辑:程序博客网 时间:2024/05/16 05:02

1)zlib安装

下载:http://www.zlib.net

./configure

make

make install

2)openssl安装

下载:http://openssl.org/source/openssl-1.0.0a.tar.gz

./config --prefix=/usr/local/ssl-1.0.0 shared zlib-dynamic enable-camellia

make

make install

3)pcre安装

下载ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-  8.02.tar.gz 

./configure --prefix=/usr/local/pcre --enable-utf8 --enable-unicode-properties 

make

make install

将/usr/local/pcre/lib下面的libpcre.a,libpcre.la和include/pcre.h复制到/usr/local/pcre目录下面,并建立.libs,并把刚才的3个文件也复制进去

4)nginx安装

下载http://www.nginx.org/ 

./configure --with-openssl=/usr/local/ssl-1.0.0 --with-pcre=/usr/local/pcre/ --with-http_stub_status_module

make

make install

如果出现异常:

make -f objs/Makefile
                make[1]: Entering directory `/usr/local/nginx-1.0.10'
                cd /usr/local/webserver/pcre \
                        && if [ -f Makefile ]; then make distclean; fi \
                        && CC="gcc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
                        ./configure --disable-shared
                /bin/sh: line 2: ./configure: No such file or directory
                make[1]: *** [/usr/local/webserver/pcre/Makefile] Error 127
                make[1]: Leaving directory `/usr/local/nginx-1.0.10'
                make: *** [build] Error 2


则进入objs目录,修改下面的Makefile,找到configure --disable-shared,去掉即可

0 0