Skip to content

Instantly share code, notes, and snippets.

@alexserver
Forked from kenzie/.profile
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save alexserver/07911af7c012d5e50658 to your computer and use it in GitHub Desktop.
Save alexserver/07911af7c012d5e50658 to your computer and use it in GitHub Desktop.
# 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"
alias mongodb-stop="mongod --shutdown"
alias redis-stop="redis-cli shutdown"
# TODO fix mongod shutdown
# Add the following to the bottom of /usr/local/etc/mongod.conf
# fork process
fork = true
# log to dev/null
logpath = /dev/null
# 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
@alexserver
Copy link
Author

I have been searching a solution for mongo stop, in macosx calling mongod --shutdown doesn't work, which is a shame because it's the most clean elegant way to do it (if it would work).

a workaround is to call:

mongo --eval "db.getSiblingDB('admin').shutdownServer()"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment