Skip to content

Instantly share code, notes, and snippets.

@flyerhzm
Created August 22, 2010 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flyerhzm/543914 to your computer and use it in GitHub Desktop.
Save flyerhzm/543914 to your computer and use it in GitHub Desktop.
As the nightly build will fail with nginx-gridfs, we have to compile mongodb
from scratch and use the fresh libmongoclient.a version.
1) Install neccessary dependencies for Ubuntu
apt-get -y install tcsh git-core scons g++
apt-get -y install libpcre++-dev libboost-dev libreadline-dev libmozjs-dev
2) Get the source from github and compile it (Note we do not need to run scons
install, because we only need the libmongoclient.a)
cd /home/user
git clone git://github.com/mongodb/mongo.git
cd mongo
scons all
3) Next set the required environment variables for the nginx-gridfs module
export MONGO_INCLUDE_PATH=/home/user/mongo/
export LIBMONGOCLIENT=/home/user/mongo/libmongoclient.a
export BOOST_INCLUDE_PATH=/usr/include/boost/
export LIBBOOST_THREAD=/usr/lib/libboost_thread-gcc42-mt-1_34_1.so.1.34.1
export LIBBOOST_FILESYSTEM=/usr/lib/libboost_filesystem-gcc42-mt-1_34_1.so.1.34.1
4) Get Nginx and nginx-gridfs running
wget http://sysoev.ru/nginx/nginx-0.8.8.tar.gz
tar -xzf nginx*.tar.gz
cd nginx*
./configure --add-module=/home/users/nginx-gridfs --prefix=/usr/local/nginx
make
make install
5) Enjoy the performance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment