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
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.