Share & learn

Through Innovative Digital Library

How to start MongoDB on BootTime in CentOS?

Everytime I restart my machine I need to start MongoDB Explicitly, is there any way to start MongoDB on startup?
 



Answers

Posted by Nikheel on January 3rd 2018 14:29 PM

For installation of MongoDB on CentOS visit this link http://www.itsprings.co.uk/sblog/Installing-MongoDB-on-CentOS To start MongoDB with system startup we need to enable MongoDB daemon. Use following commands one by one : The following image shows the status and process of MongoDB running after rebooting system.

# /usr/sbin/chkconfig mongod on

Then start MongoDB using :
 
# systemctl enable mongod

# systemctl start mongod

Now restart the system and verify whether the process is successfully running or not using :

# ps auxw | grep -i 27017

# systemctl status mongod
Answer Question

Your email address will not be published. Required fields are marked *

  • Minimum 20 character
BW0X

related questions

Most liked questions

Most answered questions

Login
BW0X Refresh
Register
BW0X Refresh
Forgot password
Ask a Question
Minimum 20 character
Minimum 20 character
Reply
Minimum 20 character
BW0X Refresh