How to Install MongoDB on Amazon Linux 2

You are currently viewing How to Install MongoDB on Amazon Linux 2
How to Install MongDB on Amazon Linux 2

Steps to follow

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

Then paste this content into that file

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

After that, run this

sudo yum install -y mongodb-org

Start MongoDB server by running this command.

sudo systemctl start mongod

Check status by running this command

sudo systemctl status mongod

Everything that is mentioned above is also displayed in this video as well. I hope this will help you to setup MongoDB on your AWS account.

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 2 Comments

  1. Juvette Munji

    thanks for the installation. I am currently studying mongodb database

Leave a Reply