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/
相关推荐
Cyber4K5 小时前
【Python专项】进阶语法-系统资源监控与数据采集(1)
开发语言·python·php
Le_ee5 小时前
ctfweb:php/php短标签/.haccess+图片马/XXE
开发语言·前端·php
Johnstons11 小时前
Wireshark 和 tcpdump 到底怎么选?网络故障排查实战中的边界、判断标准与落地清单
wireshark·php·es·tcpdump·抓包分析·抓包与协议分析工具选型
暮雨疏桐12 小时前
阿里云从 OSS 将 CSV 推送至内网机器方案
阿里云·云计算·php
laomocoder14 小时前
Project-Nexus-WAN-跨公网Agent对话
开发语言·php
d111111111d16 小时前
MQTT+STM32+ESP8266网络程序分层+韦老师
笔记·stm32·单片机·嵌入式硬件·学习·php
听海边涛声1 天前
phpStudy的下载、安装
php·phpstudy
知识领航员1 天前
2026年推荐6个AI音乐工具
java·人工智能·python·eclipse·django·php·pygame
m0_738120722 天前
渗透测试——Djinn1靶场详细渗透提权过程讲解(绕过黑名单限制,命令执行反弹shell,pyc反编译,代码白盒分析,python沙盒逃逸)
开发语言·python·php
vx-程序开发2 天前
PHP书店网站-计算机毕业设计源码05274
开发语言·php·课程设计