
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:
Its even easier to setup the latest version of MongoDB Server now straight from the AWS marketplace, there is a MongoDB image available: https://aws.amazon.com/marketplace/pp/prodview-t2fk7vzqwuf2i
It fully installs on Ubuntu 20.04, Post configuration steps are on: https://cloudinfrastructureservices.co.uk/how-to-setup-mongodb-community-server-on-azure-aws/