Install MongoDB on Amazon Linux | MongoDB

MongoDB is an open-source, cross platform, highly scalable and flexible database. The main key feature is on the MongoDB which goes with NoSQL, therefore the data can be stored as documents or the collections, Those collections can be restored as JSON format as well. Therefore MongoDB is a using mostly in enterprise level environments.
Installation of MongoDB is straight forward, and this tutorial describes about the

  1. Log in to the AWS console, provision an EC2 instance with Amazon AMI.
  2. Update the yum.repo.d/mongoDB-v4.0.repo file for download the v4.0 in MongoDB.
    name=MongoDB Repository
  3. To update update yum repo in the servers issue the following command.yum update
  4. Once you are done with the repo update, issue the yum install for install the MongoDB server. Once you issue this commands, it automatically install the all packages relate to MongoDB server.
    sudo yum install -y mongodb-org
  5. Issue the following command to start the mongoDB service once you are done with the installation.
    sudo service mongod start
  6. Configure mongoDB service to start it automatically at the reboot.
    sudo chkconfig mongod on

Installation is now completed, user can log in to the MongoDB. Since we don’t have configured mongoDB for authentication, we can directly log in to the mongoDB using following command.
mongo --host

If you see the mongoDB console, then you are done successfully. Enjoy 🙂



Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s