The installation of MongoDB Database is an open-source cross-platform documented-oriented database program. It stores the data in JSON like documents with the dynamic schema. Other database stores the data in table and rows. We can install MongoDB using the terminal on Linux centos.
Features of MongoDB Database: so f
- Provides high performance
- Load balancing
- Duplication of data
- Supports map-reduce and aggregation tools so f
Installation of MongoDB Database Server:
Default port number is 27017 and the main configuration file is at /etc/mangod.conf
MongoDB provides supported Packages in their own repository, so f
Mongodb-org-server = keeps mongod daemon and associated configuration files & init scripts
Mongodb-org-mongos = contains mongos daemon
Mongodb-org-shell = Contains mongo shell
Mongodb-org-tools = Contains mongodb tools like exports, dump, start, restore and more.
You will have to add MongoDB repository to your system.
You can manually download the Packages from here Download
yum install mongodb-org –y
Now start the service, so f
systemctl start mongod
Now Set The Selinux, I would recommend disabling SELinux but if you do not want to keep it enable then run below command. so f
semanage port -a -t mongod_port_t -p tcp 27017
Check MongoDB version so f
Check if it’s listening on the port. so f
netstat –antup | grep 27017
Now try to access MongoDB Server,
If you face any authorization issue, edit the file /etc/mongod.conf
Turn it from here
You can also see the default and all databases.
YouTube Link: Install MongoDB On Linux
You’re done install mongodb linux centos terminal