Created
June 6, 2012 13:14
-
-
Save kenzie/2881769 to your computer and use it in GitHub Desktop.
Start MongoDB and Redis daemons from the command line (OS X)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add these aliases to your BASH profile ~/.profile | |
alias mongodb-start="mongod run --config /usr/local/etc/mongod.conf" | |
alias redis-start="redis-server /usr/local/etc/redis.conf" | |
# TODO add stop commands |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add the following to the bottom of /usr/local/etc/mongod.conf | |
# fork process | |
fork = true | |
# log to dev/null | |
logpath = /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit this line in /usr/local/etc/redis.conf | |
# By default Redis does not run as a daemon. Use 'yes' if you need it. | |
# Note that Redis will write a pid file in /usr/local/var/run/redis.pid when daemonized. | |
daemonize yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I did a fork of your work and made stop commands, however (bad news) stop command for mongodb doesn't work in MacOsX !! hope you'd help me to find a solution, check it out,
https://gist.github.com/alexserver/07911af7c012d5e50658
regards !!