Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installed memcached via homebrew, how to start and stop server?

I have memcached installed via homebrew.

  1. how do I start/stop the server?

  2. Any command-line tools to interact with memcached?

  3. does homebrew have a way of removing a package?

like image 941
Blankman Avatar asked Jun 06 '11 04:06

Blankman


People also ask

How do I start a memcached Server on Mac?

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.

How do I start memcached in Linux?

To start Memcached, run the following systemctl command: sudo systemctl start memcached.


2 Answers

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.

like image 119
clee Avatar answered Oct 01 '22 10:10

clee


  1. 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 
  2. Via telnet: telnet localhost 11211

    See also What are some useful tips/tools for monitoring/tuning memcached health?

  3. brew remove memcached

like image 26
dubilla Avatar answered Oct 01 '22 08:10

dubilla