如何在mac下安装php

步骤如下:

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

#安装openssl
brew 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

#编译php
sudo make

#测试php
make test

#安装php
sudo make install

猜你喜欢

转载自www.cnblogs.com/liuzhiqaingxyz/p/9142460.html