Run Mongo as a service – detaching from terminal

You might start mongo demon as

mongod

but, as you close the terminal this will terminate your session.

So, to start it as a service so that it would continue running

mongod --fork --logpath /path/to/log/file

You can specify the log file as you wish

Leave a Reply

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

*
*