Installed memcached via homebrew, how to start and stop server?
When you installed it, it put a file named homebrew.mxcl.memcached.plist
in /usr/local/Cellar/memcached/$version/
; you copy that file into ~/Library/LaunchAgents
and then tell launchd to start it with launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist
.
If you were watching the console carefully during the brew install
command, it should have said something about doing these exact steps. If you run brew info
it'll re-print this information, e.g. brew info memcached
.
You should probably read https://docs.brew.sh/Manpage -- it has more useful documentation including the brew remove
command which will remove the package if you decide you don't want it.
Brew used to have a command brew services (https://thoughtbot.com/blog/starting-and-stopping-background-services-with-homebrew), now deprecated. Instead, to get always-correct advice, run this command:
brew info memcached
Via telnet:
telnet localhost 11211
See also What are some useful tips/tools for monitoring/tuning memcached health?
brew remove memcached
Additionally you can run "brew info", if you have forgotten about the instructions.
→ brew info memcachedmemcached 1.4.7http://memcached.org/Depends on: libevent/usr/local/Cellar/memcached/1.4.6 (8 files, 156K)You can enable memcached to automatically load on login with:mkdir -p ~/Library/LaunchAgentscp /usr/local/Cellar/memcached/1.4.7/com.danga.memcached.plist ~/Library/LaunchAgents/launchctl load -w ~/Library/LaunchAgents/com.danga.memcached.plistOr start it manually: /usr/local/bin/memcachedAdd "-d" to start it as a daemon.http://github.com/mxcl/homebrew/commits/master/Library/Formula/memcached.rb