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/
相关推荐
饶了我吧,放了我吧3 小时前
计算机网络实验——以太网安全实验
计算机网络·安全·php
wkj0014 小时前
php中调用对象的方法可以使用array($object, ‘methodName‘)?
android·开发语言·php
wkj0015 小时前
php use 命名空间与 spl_autoload_register的关系
android·php·android studio
weixin_443290695 小时前
【云服务器安全相关】堡垒机、WAF、防火墙、IDS 有什么区别?
服务器·安全·php
OKUNP15 小时前
Docker高级管理--容器通信技术与数据持久化
docker·容器·php
hunzi_115 小时前
搭建商城系统
java·uni-app·php
夏至春来-美美1 天前
微信获取access_token授权的两种不同情况
微信·php·微信公众平台
果子⌂1 天前
Docker-构建镜像并实现LNMP架构
mysql·nginx·docker·容器·架构·php
tomcsdn311 天前
SMTPman,smtp的端口号是多少全面解析配置
服务器·开发语言·php·smtp·邮件营销·域名邮箱·邮件服务器
Q_Q5110082851 天前
python的保险业务管理与数据分析系统
开发语言·spring boot·python·django·flask·node.js·php