MAC常用命令 及环境搭建
brew 安装 及更新 https://segmentfault.com/a/1190000000606752
1. 查看端口占用:
lsof -i :9000
2. 查看进程
ps -ef|grep php-fpm
3. php 扩展包管理器 pecl
http://www.jianshu.com/p/598c0fd84719
4.用pecl 来安装php扩展
http://www.xitongzhijia.net/xtjc/20150526/49276.html
5. cp 文件出现错误 Operation not permitted
http://www.jianshu.com/p/22b89f19afd6
6.php.ini 所在目录 /etc/php.ini
自带php扩展目录 /usr/lib/php/extensions/no-debug-non-zts-20131226/redis.so
pecl安装的扩展目录 /usr/local/Cellar/php56/5.6.30_6/lib/php/extensions/no-debug-non-zts-20131226/redis.so
7. memcache
brew install memcached
pecl install memcache
启动 telnet localhost 11211
8.mcrypt 安装以及扩展安装
brew install mcrypt
brew install josegonzalez/php/php56-mcrypt
cp /usr/local/Cellar/php56-mcrypt/5.6.30_4/mcrypt.so /usr/lib/php/extensions/no-debug-non-zts-20131226/mcrypt.so
9. 关于配置mcrypt出现mcrypt: Unable to initialize module问题
运行brew reinstall -v homebrew/php/php56-mcrypt --build-from-source这条命令就能解决