阅读更多
cd ~/src
mkdir nginx_gridfs && cd nginx_gridfs
yum install scons boost boost-devel pcre pcre-devel
git clone git://github.com/mdirolf/nginx-gridfs.git
wget http://sysoev.ru/nginx/nginx-0.7.62.tar.gz
tar -zxvf nginx-0.7.62.tar.gz
#note my mongo install path; different from on OSX
export MONGO_INCLUDE_PATH=/root/src/mongodb-linux-x86_64-1.0.0/include/mongo/
export LIBMONGOCLIENT=/root/src/mongodb-linux-x86_64-1.0.0/lib64/libmongoclient.a
export BOOST_INCLUDE_PATH=/usr/lib64/
export LIBBOOST_THREAD=/usr/lib64/libboost_thread.so
export LIBBOOST_FILESYSTEM=/usr/lib64/libboost_filesystem.so
cd nginx-0.7.62/
./configure --add-module=/root/src/nginx_gridfs/nginx-gridfs
make
make install