步骤如下:
1.下载php源码并解压
2.进入php源码并configure
3.安装openssl
4.sudo make及make test
5.sudo make install
具体命令如下:
#下载php源代码,为php-5.6.32.tar#解压php源代码tar -zxvf php-5.6.32.tar#进入php源码目录cd php-5.6.32#安装opensslbrew install openssl#找到openssl的安装路径,这里为/usr/local/Celler/openssl/1.0.2n/#配置php./configure --with-openssl=/usr/local/Celler/openssl/1.0.2n/ --with-php-config=/usr/bin/php-config#编译phpsudo make#测试phpmake test#安装phpsudo make install
如何在mac下安装php
原文地址:https://www.cnblogs.com/liuzhiqaingxyz/p/9142460.html