Skip to content

Instantly share code, notes, and snippets.

@ismaelga
Forked from kenzie/.profile
Created July 20, 2012 18:08
Show Gist options
  • Save ismaelga/3152333 to your computer and use it in GitHub Desktop.
Save ismaelga/3152333 to your computer and use it in GitHub Desktop.
Start MongoDB and Redis daemons from the command line (OS X)
# 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
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment