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/
相关推荐
魔众14 小时前
ModStartCMS v9.7.0 组件升级优化,模块升级提醒,访问明细导出
php·cms
一人の梅雨17 小时前
京东商品详情深度解析:从接口调用到商业价值挖掘的技术实现
服务器·数据库·php
帅帅梓17 小时前
docker网络
网络·docker·php
吃鱼吃鱼吃不动了19 小时前
什么是负载均衡?
开发语言·php
BingoGo21 小时前
PHP 开发者应该理解的 Linux 入门权限指南
后端·php
苏琢玉1 天前
再也不用翻一堆日志!一键部署轻量级错误监控系统,帮你统一管理 PHP 报错
go·github·php
JaguarJack1 天前
PHP 开发者应该理解的 Linux 入门权限指南
后端·php
2301_793167991 天前
网络管理部分
linux·运维·服务器·网络·php
李白你好1 天前
一款基于 PHP 的轻量级Webshell管理工具
php
星光一影2 天前
【OA办公系统】神点企业OA办公助手/全开源
mysql·nginx·开源·php·源代码管理