mac osX安装memcached

1.安装memcached依赖库libevent

运行如下代码

ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)” < /dev/null 2> /dev/null

然后

brew install libevent

libevent 安装完成

2.安装memcached

①查看memcached可用版本信息及当前系统环境

brew info memcached

memcached: stable 1.4.24 (bottled)

High performance, distributed memory object caching system

http://memcached.org/Conflicts with: mysql-clusterNot installed

From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/memcached.rb==> Dependencies

Required: libevent ✔==> Options–with-sasl    Enable SASL support — disables ASCII protocol!–with-sasl-pwdb    Enable SASL with memcached’s own plain text password db support — disables ASCII protocol!

==> Caveats

To have launchd start memcached at login:

  ln -sfv /usr/local/opt/memcached/*.plist ~/Library/LaunchAgents

Then to load memcached now:

  launchctl load ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist

Or, if you don’t want/need launchctl, you can just run:

  /usr/local/opt/memcached/bin/memcached

②安装memcached

 brew install memcached

==> Downloading https://homebrew.bintray.com/bottles/memcached-1.4.24.mavericks.bottle.tar.gz######################################################################## 100.0%

==> Pouring memcached-1.4.24.mavericks.bottle.tar.gz==> Caveats

To have launchd start memcached at login:

  ln -sfv /usr/local/opt/memcached/*.plist ~/Library/LaunchAgents

Then to load memcached now:

  launchctl load ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist

Or, if you don’t want/need launchctl, you can just run:

  /usr/local/opt/memcached/bin/memcached

==> Summary

��  /usr/local/Cellar/memcached/1.4.24: 10 files, 161.1K

3.启动memcached:

输入命令: 

memcached -d -p 11211 -u nobody -c 1024 -m 64

参考:

Install libevent on Mac OSX

https://blog.csdn.net/whereismatrix/article/details/50485570

    原文作者:半夏半暖半倾城灬
    原文地址: https://www.jianshu.com/p/724c76e63edc
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞