MongoDB is a popular NoSQL database system that provides scalability, high performance, and availability. In this step-by-step guide, we’ll walk through the installation process for MongoDB 4.x Community Edition on CentOS.
Prerequisites
Before you begin, ensure that you have the following prerequisites:
- A CentOS system (version 7 or 8)
- Administrative privileges (you can use
sudo
)
Installation Steps
1. Configure the Package Management System (yum)
Create a file named /etc/yum.repos.d/mongodb-org-4.4.repo
to set up the MongoDB repository for installation using yum
. You can use the following command to create the file:
sudo vi /etc/yum.repos.d/mongodb-org-4.4.repo
Add the following content to the file:
[mongodb-org-4.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
2. Install MongoDB Packages
Open a terminal and run the following command to install the latest stable version of MongoDB:
sudo yum install -y mongodb-org
Alternatively, if you want to install a specific release of MongoDB, specify each component package individually and append the version number to the package name. For example:
sudo yum install -y mongodb-org-4.4.29 mongodb-org-server-4.4.29 mongodb-org-shell-4.4.29 mongodb-org-mongos-4.4.29 mongodb-org-tools-4.4.29
3. Start MongoDB Service
After installation, start the MongoDB service using the following command:
sudo systemctl start mongod
4. Enable MongoDB to Launch on Boot
To ensure MongoDB starts automatically when your system boots up, enable it with:
sudo systemctl enable mongod
5. Access MongoDB Shell
To interact with MongoDB, open the MongoDB shell by entering:
mongo
Conclusion
You’ve successfully installed MongoDB on CentOS! Feel free to explore its features and start building your applications. Remember to check the official MongoDB documentation for any additional details or troubleshooting tips. Happy coding! 🚀🌟
Congratulations! You have successfully installed MongoDB server on your system. For practice, you may use the MongoDB browser shell.
References:
http://docs.mongodb.org/manual/installation/
13 Comments
Leave A Comment
You must be logged in to post a comment.
cheap androxal australia pharmacy
ordering androxal usa pharmacy
cheap enclomiphene cheap in canada
cheap enclomiphene generic from the uk
rifaximin the 800 number to place order
get rifaximin generic drug india
buy xifaxan american pharmacy
buy xifaxan buy in london
how to buy staxyn how to purchase viagra
discount staxyn cheap online canada
buy avodart canada suppliers
buy cheap avodart american express
ordering dutasteride uk buy over counter
online order dutasteride retail price
purchase flexeril cyclobenzaprine usa cheap
buy flexeril cyclobenzaprine generic when will be available
cheapest buy gabapentin us prices
order gabapentin buy in london
how to buy fildena usa seller
order chewable fildena
how to order itraconazole lowest price
cheapest buy itraconazole generic ingredients
kamagra žádná předpisová kanada
na dobírku online recepty kamagra
medicament kamagra pharmacie gracieux ans
kamagra avec un médecin consulter