wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.13.tar.gz
wget http://www.openssl.org/source/openssl-1.0.0d.tar.gz
wget http://www.dnaphp.com/downloads/server/linux/30-zlib-1-2-5-tar/download -O zlib-1.2.5.tar.gz
apt-get -y install libatomic-ops-dev
#解压
tar -xf nginx-1.1.1.tar.gz pcre-8.13.tar.gz openssl-1.0.0d.tar.gz zlib-1.2.5.tar.gz
#获取nginx-gridfs代码
git clone git://github.com/mdirolf/nginx-gridfs.git
cd nginx-gridfs
git submodule init
git submodule update
cd nginx-1.1.1
./configure --user=`id -un` --group=`id -gn` --prefix=$HOME/work/nginx --with-http_gzip_static_module --with-zlib=$HOME/download/nginx/zlib-1.2.5 --with-pcre=$HOME/download/nginx/pcre-8.13 --with-http_ssl_module --with-openssl=$HOME/download/nginx/openssl-1.0.0d --http-proxy-temp-path=$HOME/work/nginx/temp/proxy --http-client-body-temp-path=$HOME/work/nginx/temp/client-body --http-fastcgi-temp-path=$HOME/work/nginx/temp/fastcgi --http-uwsgi-temp-path=$HOME/work/nginx/temp/uwsgi --http-scgi-temp-path=$HOME/work/nginx/temp/scgi --with-libatomic --with-http_stub_status_module --add-module=$HOME/download/nginx/nginx-gridfs
make && make install
gridfs p_w_picpaths
field=filename
type=string;
mongo 127.0.0.1:30000;
}