How to Setup MongoDB server in AWS

how to setup mongodb

In this article, I will cover what is MongoDB, and how you can install MongoDB on AWS EC2 instance, so that you have your NoSQL database ready in no time. 

What is actually Mongodb

According to Wikipedia, MongoDB is a cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and licensed under the Server Side Public License. 

Why we need to install MongoDB

MongoDB is one the most popular NoSQL database which is widely used in many applications everywhere. 

Command to run to setup a mongodb server

sudo vi /etc/yum.repos.d/mongodb-org-4.2.repo

[mongodb-org-4.2]
name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/4.2/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc 

After that, please run the following commands on terminal.  

sudo yum install -y mongodb-org
sudo chkconfig mongod on
sudo service mongod start

Below is a video uploaded, which shows how you can install MongoDB in AWS.

Check my other articles related to: 

Atiqur Rahman

I am MD. Atiqur Rahman graduated from BUET and is an AWS-certified solutions architect. I have successfully achieved 6 certifications from AWS including Cloud Practitioner, Solutions Architect, SysOps Administrator, and Developer Associate. I have more than 8 years of working experience as a DevOps engineer designing complex SAAS applications.

This Post Has One Comment

Leave a Reply