How to launch MongoDB while our MAC OSX starts

  • How to launch MongoDB while our Mac OSX starts

Launching MongoDB while our MAC starts

Once MongoDB is installed in our MAC OSX, the most useful is to launch the mongod service automatically when our computer is starting.

Steps to follow

These are the steps to follow:

  • Step 1: We must create the file org.mongodb.mongod.plist at the directory /Library/LaunchDaemons, with this content (lines related to the mongodb.conf file are optional):

  • Step 2: Now we load the service to execute it when the computer starts

Starting MongoDB manually

If we need to start, or stop, manually the daemon this would be the way:

Creating the alias

Even, we can use aliases by editing the ~/.bash_profile file by this manner:

Interesting links

These are the urls I have read for extracting the information above.

I hope you find this post useful and easy to understand!

Juan Roy

MongoDB Fan & Financial Software Developer

You may also like...

Leave a Reply