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
- Log in to the AWS console, provision an EC2 instance with Amazon AMI.
- Update the yum.repo.d/mongoDB-v4.0.repo file for download the v4.0 in MongoDB.
- To update update yum repo in the servers issue the following command.
- 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
- Issue the following command to start the mongoDB service once you are done with the installation.
sudo service mongod start
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 127.0.0.1:27017
If you see the mongoDB console, then you are done successfully. Enjoy 🙂