Database Reference
In-Depth Information
appendix A
Installation
In this appendix you'll learn how to install MongoDB on Linux, Mac OS X , and Win-
dows, and you'll get at an overview of MongoDB's most commonly used configuration
options. For developers, there are a few notes on compiling MongoDB from its source.
I'll conclude with some pointers on installing Ruby and RubyGems; this will aid
those wanting to run the Ruby-based examples from the topic.
A.1
Installation
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 stat-
ically linked binaries compiled for 32-bit and 64-bit systems. These binaries are avail-
able 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.
A.1.1
MongoDB on Linux
There are three ways to install MongoDB on Linux. You can download the precom-
piled 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.
I NSTALLING WITH PRECOMPILED BINARIES
First navigate to http://www.mongodb.org/downloads. There you'll see a grid with all
the latest downloadable MongoDB binaries. Select the download URL for the latest
stable version for your architecture. These examples use MongoDB v2.0 compiled for
a 64-bit system.
Download the archive using your web browser or the curl utility. Then expand the
archive using tar :
$ curl http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.0.0.tgz
> mongo.tg
$ tar -xzvf mongo.tgz
241
Search WWH ::




Custom Search