MongoDB is a document-oriented cross-platform, widely used leading NoSQL database program. NoSQL means no-schema, no concept of relationship and not only SQL. There won’t be a rows and columns kind of things.
MongoDB stores data in key-value pairs. MongoDB provides agility, scalability, performance and high availability. MongoDB Community Edition is freely available for download on 64bit platform only. Let’s see the MongoDB Community Edition installation steps by steps.
Requirements:
1. Running Instance of CentOS/RedHat Linux
2. Internet Access to Download Packages
3. root or sudo access
Also Read: CentOS Linux 8 Installation with Screenshots
Also Read: Red Hat Enterprise Linux 8.1 Installation with Screenshots
Some of the important features are:
- Support ad hoc queries
- Indexing
- Replication
- Data Duplication
- Load balancing
- Support MatReduce
- Javascript in place of procedures.
- Support JSON data model
Step 1: Download MongoDB from here
# dnf install -y mongodb-org-4.2.2 mongodb-org-server-4.2.2 mongodb-org-shell-4.2.2 mongodb-org-mongos-4.2.2 mongodb-org-tools-4.2.2
/var/log/mongodb/ (the log directory)
/etc/mongod.conf (Config file)
or
# ss -antp | grep 27017
Note: Port 27017 need to be open in firewall / security devices if it’s blocked.
————– FirewallD Access ————–
# firewall-cmd –zone=public –add-port=27017/tcp –permanent
# firewall-cmd –reload
Step 5: Start MongoDB service and check the running status.
# systemctl status mongod
# systemctl start mongod
# systemctl status mongod
Step 6: Login into MongoDB console and Start using with mongo command. This command will connect to MongoDB console.
# mongo