首页 > 代码库 > mac os重装php

mac os重装php

首先卸载自带的php

private/etc/            sudo rm -rf php-fpm.conf.default php.ini php.ini.default
/usr/bin/               sudo rm -rf php php-config phpdoc phpize
/usr/include            sudo rm -rf php
/usr/lib                sudo rm -rf php
/usr/sbin               sudo rm -rf php-fpm
/usr/share              sudo rm -rf php
/usr/share/man/man1     sudo rm -rf php-config.1 php.1 phpize.1
/usr/share/man/man8     sudo rm -rf php-fpm.8

利用brew安装php7

brew install php70

目录

/usr/local/opt/php70/bin/php -v
/usr/local/opt/php70/sbin/php-fpm -v

安装memcached扩展

memcached
brew install php70-memcached
配置文件
/usr/local/etc/php/7.0/conf.d/ext-memcached.ini

 

mac os重装php