Install MongoDB on Ubuntu 14.04

Step 1 — Importing the Public Key

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

Step 2 — Creating a List File

echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list

Step 3 – Update the packages list

sudo apt-get update

Step 4 — Installing and Verifying MongoDB

sudo apt-get install -y mongodb-org

Step 5- Check status

service mongod status

If MongoDB is running, you’ll see an output like this(with a different process ID).
mongod start/running, process 8962

Start MongoDB

service mongod start

Stop MongoDB

service mongod stop

Restart MongoDB

sudo service mongod restart
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