memcache的安装
下载地址:https://github.com/websupport-sk/pecl-memcache/archive/php7.zip
wget https://github.com/websupport-sk/pecl-memcache/archive/php7.zip
如提示:
-bash: wget: command not found
需要先安装wget
brew install wget
压缩包重命名:
mv php7.zip php7_memcache.zip
编译安装:
unzip php7_memcache.zip cd pecl-memcache-php7/ /Applications/MxSrvs/bin/php/bin/phpize ./configure --with-php-config=/Applications/MxSrvs/bin/php/bin/php-config make && make install
安装完成后回提示扩展安装的目录,phpini加载此目录的扩展即可
Installing shared extensions: /Applications/MxSrvs/bin/php/lib/php/extensions/no-debug-non-zts-20170718/
修改php.ini,加载memcache
extension=/Applications/MxSrvs/bin/php/lib/php/extensions/no-debug-non-zts-20170718/memcache.so
重启php 查看php扩展