Building for Linux

General Instructions

  1. Install Dependencies - see platform specific below
  2. get source
    git clone git://github.com/mongodb/mongo.git
    # pick a stable version unless doing true dev
    git tag -l
    # Switch to a stable branch (unless doing development) --
    # an even second number indicates "stable".  (Although with
    # stharding you will want the latest if the latest is less
    # than 1.6.0.) For example:
    git checkout r1.4.1
    
  3. build
    scons all
  4. install
    scons --prefix=/opt/mongo install

Special Notes about Spider Monkey

Most pre-built spider monkey binaries don't have UTF8 compiled in. Additionally, ubuntu has a weird version of spider monkey that doesn't support everything we use. If you get any warnings during compile time or runtime, we highly recommend building spider monkey from source. See Building Spider Monkey for more information.

We currently support spider monkey 1.6 and 1.7, although there is some degredation with 1.6, so we recommend using 1.7. We have not yet tested 1.8, but will once it is officially released.

Package Requirements

Fedora

Fedora 8 or 10

sudo yum -y install git tcsh scons gcc-c++ glibc-devel
sudo yum -y install boost-devel pcre-devel js-devel readline-devel
#for release builds:
sudo yum -y install boost-devel-static readline-static ncurses-static

Ubuntu

See spider monkey note above.

Ubuntu 8.04

apt-get -y install tcsh git-core scons g++
apt-get -y install libpcre++-dev libboost-dev libreadline-dev xulrunner-1.9-dev
apt-get -y install libboost-program-options-dev libboost-thread-dev libboost-filesystem-dev libboost-date-time-dev

Ubuntu 9.04 and 9.10

apt-get -y install tcsh git-core scons g++
apt-get -y install libpcre++-dev libboost-dev libreadline-dev xulrunner-1.9.1-dev
apt-get -y install libboost-program-options-dev libboost-thread-dev libboost-filesystem-dev libboost-date-time-dev

Ubuntu 10.04

apt-get -y install tcsh git-core scons g++
apt-get -y install libpcre++-dev libboost-dev libreadline-dev xulrunner-dev
apt-get -y install libboost-program-options-dev libboost-thread-dev libboost-filesystem-dev libboost-date-time-dev

See Also


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

PLEASE POST QUESTIONS IN THE USER GROUPS FORUM. Post non-question comments and helpful hints here.

blog comments powered by Disqus