OpenResty® 通过 Lua 扩展 NGINX 实现的可伸缩的 Web 平台

OpenResty XRay

Advanced observability built for OpenResty and more

×

limited time offer

Request TRIAL today and receive a diagnostic REPORT
Learn more
最新! OpenResty 1.25.3.1 已发布。
最新! OpenResty 1.21.4.3 已发布。
最新! 新博客文章 使用 C++ 动态追踪 C++ 应用 已发表。
最新! 新博客文章 自动分析 Core Dump(使用 OpenResty XRay) 已发表。

Drizzle Nginx Module

Yichun Zhang , 26 Aug 2011 (created 21 Jun 2011)

This is an nginx upstream module that talks to MySQL and/or Drizzle database servers by libdrizzle.

This ngx_drizzle module is not enabled by default. You should specify the --with-http_drizzle_module optiotn while configuring OpenResty.

The libdrizzle C library is no longer bundled by OpenResty. You need to download the drizzle server tarball from https://launchpad.net/drizzle.

When you get the drizzle7 release tarball, you can install libdrizzle-1.0 like this:

tar xzvf drizzle7-VERSION.tar.gz
cd drizzle7-VERSION/
./configure --without-server
make libdrizzle-1.0
make install-libdrizzle-1.0

where VERSION is the drizzle7 release version number like 2011.06.20.

Please ensure that you have the python command point to a python2 interpreter. It's known that on recent Arch Linux distribution, python is linked to python3 by default, and while running make libdrizzle-1.0 will yield the following error:

File "config/pandora-plugin", line 185
    print "Dependency loop detected with %s" % plugin['name']
                                           ^
SyntaxError: invalid syntax
make: *** [.plugin.scan] Error 1

You can fix this by pointing python temporarily to python2.

When you install the libdrizzle-1.0 library to a custom path prefix, you can specify the libdrizzle prefix to OpenResty like this:

cd /path/to/ngx_openresty-VERSION/
./configure --with-libdrizzle=/path/to/drizzle --with-http_drizzle_module

Documentation page: http://wiki.nginx.org/HttpDrizzleModule

Project page: https://github.com/openresty/drizzle-nginx-module