Installing MongoDB

The first step in getting MongoDB implemented in your Node.js environment is to install the MongoDB server. There is a version of MongoDB for each of the major platforms: Linux, Windows, Solaris, and OS X. There is also an enterprise version available for the Red Hat, SuSE, Ubuntu, and Amazon Linux distributions. The enterprise version of MongoDB is subscription based and provides enhanced security, management, and integration support.


Note

The examples in the book are based on MongoDB version 2.4. You should install that version when working with these examples.


For the purposes of this book and learning MongoDB, the standard edition of MongoDB is perfect. Before continuing on with this chapter, you should go to http://docs.mongodb.org/manual/installation/ and follow the instructions to download and install MongoDB in your environment. Here are the steps you need to follow:

1. Download and extract the MongoDB files.

2. Add <mongo_install_location>/bin to your system path.

3. Create the data files directory <mongo_data_location>/data/db.

4. Start MongoDB, using the following from the console prompt:

mongod –dbpath <mongo_data_location>/data/db

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.219.78