Install MongoDB CentOS Linux or RedHat Enterprise Linux with step by step process. How to Install MongoDB 3.2 in CentOS 6.5 Linux or Redhat Enterprise Linux?
Installation of MongoDB 3.2 in CentOS Linux is very easy by the steps given in this post. First of all, you make sure your platform architecture is 32 bit or 64 bit, basis on that you can proceed.
Your installation platform i.e. Linux CentOS or RedHat Linux is on 32 bit or 64 bit OS, it is important to know before installation.
You can vist my post How-to know 64-bit or 32-bit OS of Window
https://www.mysoftkey.com/mongodb/how-to-install-mongodb-4-4-on-ubuntu-18/
1. Configure yum package to install mongodb centos
logged in into linux system using putty or another one. and create a file with folliwing command
vi /etc/yum.repos.d/mongodb-org-3.2.repo
Paste following in the file.
[mongodb-org-3.2] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/ gpgcheck=0 enabled=1
2. Install MongoDB packages and it’s associated tools
run following command
sudo yum install -y mongodb-org
3. Start MongoDB process
You can start the mongod process by issuing the following command:
sudo service mongod start
4. Verify mongod process
ps -ef | grep mongod
or You can verify that mongod process has started successfully by checking the contents of the log file at /var/log/mongodb/mongod.log
or run following command.
tail -100f /var/log/mongodb/mongod.log
5. Stop MongoDB
You can stop the mongod process by issuing following command:
sudo service mongod stop
6. Restart MongoDB
In restart, if running mongod process then first stop and then start.
sudo service mongod restart
7. Run Mongo client
[root@ranjeet ~]# mongo MongoDB shell version: 3.0.7 connecting to: test Server has startup warnings: 2015-10-30T19:07:08.570+0530 I CONTROL [initandlisten] 2015-10-30T19:07:08.571+0530 I CONTROL [initandlisten]
if connecting to: test display in above it mean mongoDB 3.2 successfully installed. 🙂
8. References
Your comment is welcome to improve this post about how to install mongodb on centos linux 64 bit. Happy Learning! 🙂
Pingback: sk