首页  >  文章  >  后端开发  >  常见的nginx扩展安装

常见的nginx扩展安装

WBOY
WBOY原创
2016-08-08 09:29:211306浏览

1.安装drizzle1.0:

wget http://agentzh.org/misc/nginx/drizzle7-2011.07.21.tar.gz
cd drizzle7-2011.07.21/
./configure --without-server 
make libdrizzle-1.0
make install-libdrizzle-1.0
修改/etc/profile,新增以下两行,或者直接执行下面两句
export LIBDRIZZLE_INC=/usr/local/include/libdrizzle-1.0
export LIBDRIZZLE_LIB=/usr/local/lib

2.下载并解压rds-json-nginx-module
wget https://github.com/openresty/rds-json-nginx-module/archive/v0.13.tar.gz
tar -zxvf v0.13.tar.gz

3.下载并解压drizzle-nginx-module
wget https://github.com/openresty/drizzle-nginx-module/archive/master.zip
unzip master.zip
mv master.zip drizzle-nginx-module-master.zip
mv drizzle-nginx-module-master drizzle-nginx-module	

4. 下载并解压redis2-nginx-module
wget https://github.com/openresty/redis2-nginx-module/archive/master.zip
unzip master.zip
mv master.zip redis2-nginx-module-master.zip
mv redis2-nginx-module-master redis2-nginx-module

下载并解压set-misc-nginx-module(unknown directive "set_unescape_uri")
wget https://github.com/openresty/set-misc-nginx-module/archive/v0.28.tar.gz
tar -zxvf v0.28.tar.gz

下载并编译lua-cjson( module 'cjson' not found)
wget http://www.kyne.com.au/~mark/software/download/lua-cjson-2.1.0.tar.gz	
tar -zxvf lua-cjson-2.1.0.tar.gz
cd lua-cjson-2.1.0
修改当前目录下的Makefile,将LUA_INCLUDE_DIR值赋值为 $(PREFIX)/include/luajit-2.0
make
make install

下载并编译lua-redis-parser-0.10.tar.gz(module 'redis.parser' not found
wget https://github.com/openresty/lua-redis-parser/archive/master.zip
mv master.zip lua-redis-parser-master.zip
unzip lua-redis-parser-master.zip 
cd lua-redis-parser-master

修改当前目录下的Makefile,将LUA_INCLUDE_DIR值赋值为 $(PREFIX)/include/luajit-2.0
make && make install

4.重新编译nginx
<pre name="code" class="html">cd /data0/source_code/nginx-1.4.2  

./configure  --user=www --group=www --prefix=/data0/nginx-1.4.2 --with-http_stub_status_module --with-pcre=/data0/source_code/pcre-8.33/ --add-module=/data0/source_code/ngx_devel_kit-0.2.18  --add-module=/data0/source_code/echo-nginx-module-0.57 --add-module=/data0/source_code/lua-nginx-module-0.8.6  --add-module=/data0/source_code/rds-json-nginx-module-0.13 --add-module=/data0/source_code/drizzle-nginx-module --add-module=/data0/source_code/redis2-nginx-module --add-module=/data0/source_code/set-misc-nginx-module-0.28

make -j2

make install

完成后可以在当前目录下执行objs/nginx -V 看看是否所有该装的module都装上了,如下:

objs/nginx -V

以上就介绍了常见的nginx扩展安装,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn