Mac M2芯片配置PHP环境

Mac M2芯片配置PHP环境

1. XAMPP

官网地址 https://www.apachefriends.org/



安装

安装完成

web server打开后,在打开localhost 成功!

2. PHPBrew(PHP版本管理)

官方文档 https://github.com/phpbrew/phpbrew/blob/master/README.cn.md

HomeBrew关于 PHPBrew的文档 https://formulae.brew.sh/formula/phpbrew

安装
这里我们通过homebrew安装

powershell 复制代码
brew install phpbrew


init

powershell 复制代码
Using root: /Users/fanzhen/.phpbrew
Initialization successfully finished!
<=====================================================>
Phpbrew environment is initialized, required directories are created under

    /Users/fanzhen/.phpbrew

Paste the following line(s) to the end of your ~/.bashrc and start a
new shell, phpbrew should be up and fully functional from there:

    source /Users/fanzhen/.phpbrew/bashrc

To enable PHP version info in your shell prompt, please set PHPBREW_SET_PROMPT=1
in your `~/.bashrc` before you source `~/.phpbrew/bashrc`

    export PHPBREW_SET_PROMPT=1

To enable .phpbrewrc file searching, please export the following variable:

    export PHPBREW_RC_ENABLE=1


For further instructions, simply run `phpbrew` to see the help message.

Enjoy phpbrew at $HOME!!

<=====================================================>
powershell 复制代码
# phpbrew
source /Users/fanzhen/.phpbrew/bashrc
export PHPBREW_SET_PROMPT=1
export PHPBREW_RC_ENABLE=1

之后就可以正常使用了

安装php7.4.33版本

powershell 复制代码
phpbrew install 7.4.33 +default


但是这里下载的速度太慢了需要解决!!!

参考

  1. PHPBrew 使用指南 https://www.jianshu.com/p/d5b0d40e56ee
  2. phpbrew set mirror(加速)https://minbaby.github.io/post/2018-11/phpbrew-set-mirror/
相关推荐
q***718523 分钟前
QoS质量配置
开发语言·智能路由器·php
tang777892 小时前
如何保护网络隐私?从理解代理IP开始
网络·tcp/ip·php
dreamtm1237 小时前
通俗理解 TCP 拥塞控制:像 “快递员看路况调速”,避免网络 “堵车”
网络·tcp/ip·php
李纲明10 小时前
WordPress外贸成品网站的免费获取渠道
vue·php
泡沫·1 天前
1.DHCP服务
开发语言·php
JaguarJack1 天前
PHP FFI 完整指南
php·服务端
YUJIANYUE1 天前
查立得PHP+mysql个人微博系统V1.0支持图文视频音频文件
mysql·php·音视频
PyHaVolask1 天前
PHP数据库操作实战
数据库·oracle·php
q***78781 天前
PHP操作redis
开发语言·redis·php
i***48611 天前
【漏洞复现】CVE-2019-11043(PHP远程代码执行漏洞)信息安全论文_含漏洞复现完整过程_含Linux环境go语言编译环境安装
linux·golang·php