Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Before we proceed to the installation instructions, a note on MongoDB versioning is in order. Briefly, you should run the latest stable version for your architecture. Stable releases of MongoDB are marked by an even minor version number. Thus, versions 1.8, 2.0, and 2.2 are stable; 1.9 and 2.1 are development versions and should not be used in production. The downloads page at http://mongodb.org provides statically linked binaries compiled for 32-bit and 64-bit systems. These binaries are available for the latest stable releases as well as for the development branches and nightly builds of the latest revision. The binaries provide the easiest way to install MongoDB across most platforms, including Linux, Mac OS X, Windows, and Solaris, and they’re the method we’ll prefer here.
There are three ways to install MongoDB on Linux. You can download the precompiled binaries directly from the mongodb.org website, use a package manager, or compile manually from source. We’ll discuss the first two in the next sections, and then provide a few notes on compiling later in the appendix.