IT运维工程师、律师 IT相关技术支持、法律咨询
分类: LINUX
2009-07-02 09:36:28
[root@localhost]#./configure --prefix=/usr/local/server/nginx --with-openssl=/usr/include \
--with-pcre=/usr/include/pcre/ --with-http_stub_status_module --without-http_memcached_module \
--without-http_fastcgi_module --without-http_rewrite_module --without-http_map_module \
--without-http_geo_module --without-http_autoindex_module
pcre
模块的支持。我已经安装了 pcre
及 pcre-devel
的rpm包,但是 Ngxin 并不能正确找到 .h/.so/.a/.la 文件,因此我稍微变通了一下:[root@localhost]#mkdir /usr/include/pcre/.libs/
[root@localhost]#cp /usr/lib/libpcre.a /usr/include/pcre/.libs/libpcre.a
[root@localhost]#cp /usr/lib/libpcre.a /usr/include/pcre/.libs/libpcre.la
可能还会报错,报错信息中有“--disable-shared"的字样,
然后,修改 objs/Makefile
大概在926行的位置上,注释掉以下内容:
./configure --disable-shared2。修改配置文件:
|
测试当请目录下nginx.conf文件是否正确,使用命令:
nginx -t -c nginx.conf
2009/04/27 22:17:57 [info] 54240#0: the configuration file nginx.conf syntax is ok
2009/04/27 22:17:57 [info] 54240#0: the configuration file nginx.conf was tested successfully