Install MongoDB

1. Configure Package Management System (APT)

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

2. Create a /etc/apt/sources.list.d/mongodb.list file using the following command.

echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update

3. Install Packages
Issue the following command to install the latest stable version of MongoDB:

sudo apt-get install mongodb-org

4. Run MongoDB
You can start the mongod process by issuing the following command:

sudo service mongodb start

5. Stop MongoDB
you may stop the mongod process by issuing the following command:

sudo service mongodb stop

6. Restart MongoDB
You may restart the mongod process by issuing the following command:

sudo service mongodb restart

Ref : http://docs.mongodb.org/manual/installation/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s