mac安装memcache及memcached集群

一。安装memcache

brew info memcached
 6880  brew info libevent
 6882  brew install automake
 6885  brew install doxygen
 6886  brew install pkg-config
 6887  brew info libevent
 6888  brew install libevent
 6889  brew upgrade libevent
 6890  export PKG_CONFIG_PATH="/usr/local/opt/curl-openssl/lib/pkgconfig"
 6891  echo 'export PATH="/usr/local/opt/curl-openssl/bin:$PATH"' >> ~/.zshrc
 6892  export LDFLAGS="-L/usr/local/opt/curl-openssl/lib"\n  export CPPFLAGS="-I/usr/local/opt/curl-openssl/include"
 6893  brew info memcached
 6894  brew install  memcached
 6895  memcached -v
 6897  ps -ef|grep memcached
 6898  kill -9 45875
 6899  ps -ef|grep memcached
 6900  kil -9 64145
 6902  ps -ef|grep memcached
 6905  ps -ef|grep memcached
 6906  memcached
 6907  ps -ef|grep memcached
 6908  memcached -h
 6909  brew upgrade  memcached
 6910  memcached -h
 6911  telnet localhost 11211
 6912  brew install telnet
 6913  telnet localhost 11211  //链接memcached

二。安装php的memcachd扩展

sudo git clone -b php7 https://github.com/php-memcached-dev/php-memcached.git
 6976  ls
 6977  cd php-memcached
 6978  ls
 6979  sudo phpize
 6980  sudo ./configure --enable-memcache --with-php-config=/usr/bin/php-config
 6981  --with-libmemcached-dir
 6982  sudo make
 6983  cd ..
 6984  ls
 6989  brew install libmemcached
 6990  ls
 6991  cd php-memcached
 6993  sudo ./configure --enable-memcache --with-php-config=/usr/bin/php-config --enable-memcache
 6994  sudo make
 6995  sudo make install
 6996  cd /private/etc
 6997  ld
 6998  ls
 6999  sudo vim php.ini  //在php的配置文件中添加memcached扩展
 7000  sudo killall php-fpm
 7001  sudo php-fpm
 7016  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值