Mac使用brew安装memcached

1、使用命令检查是否已安装memcached及其依赖包情况
brew info memcached

2、如上图所示,memcached的依赖包为libevent,如果未安装libevent(会打个红色的X),则需要首先查看libevent安装的依赖包,检查libevent的依赖包是否安装
brew info libevent


3、未安装的依赖会打一个红色的X,安装打X依赖

brew install doxygen
brew install libtool
....

4、依赖包安装完后

brew install libevent
brew install memcached

5、安装完成,启动服务

//启动
brew services start memcached
//停止
brew services stop memcached
//重启
brew services restart memcached
//查看所有运行的服务
brew services list

你可能感兴趣的:(Mac使用brew安装memcached)