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/
相关推荐
pps-key11 小时前
网络攻防入门:从“黑客梦”到合法实操(生存篇)
开发语言·web安全·php
驭渊的小故事14 小时前
订单服务如何调用商品服务?一次 RestTemplate 跨服务调用入门
java·开发语言·php
Risehuxyc21 小时前
来自PHP项目devnexen的回信
开发语言·php
饿了吃洗衣凝珠1 天前
SELinux
服务器·开发语言·php
普通人61 天前
PHP多维数组排序完全指南
开发语言·php·1024程序员节
码农小河662 天前
基于PHP的电商后台蜜罐系统
开发语言·php
阿洛学长2 天前
PHP开发框架对比:Laravel、Yii、Tp、Yaf、Swoole
php·laravel·swoole
Risehuxyc2 天前
GetCpolar留V3版去掉V2版
php
FYKJ_20102 天前
springboot同人周边订单管理系统48955-计算机毕业设计、课程设计
java·javascript·vue.js·spring boot·django·php·课程设计
火云代理3 天前
更换网络后为什么会退出登录?分清 IP、Cookie 与会话的关系
服务器·网络·网络协议·tcp/ip·php·ip