I recently updated mongodb
, and I run Linux Mint (an Ubuntu based system) and every time I start it up, i cannot use Robomongo because the service mongod
is not automatically started; every time I need to open up a terminal and use
sudo service mongod start
Is there a way to start mongod
automatically at system start?
Open up your command prompt and type mongod to start the MongoDB server.
Use the following command to autostart mongodb when system start.
systemctl enable mongod.service
You can either put the command in your /etc/bashrc script under and if condition i.e. if the mongod process is not already running, then start it.
Other way is to modify your /etc/rc.local and add the command to start mongod in that file. It will start at bootup.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With