Skip to content

Instantly share code, notes, and snippets.

@masroorhussainv
Last active May 12, 2022 14:35
Show Gist options
  • Save masroorhussainv/9fed81c3e0b07feac705b3bf937f10cd to your computer and use it in GitHub Desktop.
Save masroorhussainv/9fed81c3e0b07feac705b3bf937f10cd to your computer and use it in GitHub Desktop.

Services

MAC OS

Redis

  • install
brew update
brew install redis
  • start
brew services start redis
  • stop
brew services stop redis
  • Test if Redis server is running.
redis-cli ping

If it replies “PONG”, then it’s good to go!

  • Location of Redis configuration file.
/usr/local/etc/redis.conf
  • Uninstall Redis and its files.
brew uninstall redis
rm ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

Postgres

  • check info brew info postgres

  • Start manually

brew services start postgresql

or

pg_ctl -D /usr/local/var/postgres start

for specific version

brew services start postgresql@10
  • Stop manually
brew services stop postgresql

or

pg_ctl -D /usr/local/var/postgres stop
  • Start automatically "To have launchd start postgresql now and restart at login:"
brew services start postgresql

Aside

Check the output of the following commands to determine which package manager it(the package) was installed with:

brew && brew list|grep postgres
fink && fink list|grep postgres
port && port installed|grep postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment