Mac上升级php7.0
2017-09-01 本文已影响89人
louduanxiong
看到网上五花八门的文章,我也是醉了,基本上都是粘贴复制,很是尴尬,所以今天就开了一篇文章.
如果你是一个新mac本,首先恭喜你一下,O(∩_∩)O哈哈~
首先安装一下 homebrew ,怎么安装我这边就不啰嗦了,基本网上百度一下就能找到答案.
安装完brew后,检查brew环境是否可以用,重启一个终端

然后安装zsh,我建议安装这个,超级好用.
Mac上自带apache,php,mysql.但是mac自带的都是缩减版的,现在我们开始装php70
brew install php70 --with-httpd24
安装完成之后
brew link php70
php -v
出现

现在修改apache配置文件
用brew安装的软件配置文件在/usr/local/ect/下面.
切记不要修改mac自带的apache配置文件(/etc/apache/httpd.conf)
sudo vim /usr/local/etc/apache2/2.4/httpd.conf
修改监听端口我习惯用80

查看php70信息
brew info php70
找重点apache配置信息

继续修改apache配置文件httpd.conf

继续修改





到此为止你的apache配置完成了!
赶快试一下吧!!!!!!