当前位置: 首页 > news >正文

mac arm 通过brew搭建 php+nginx+mysql+xdebug

1.安装nginx

brew install nginx   //安装brew services start nginx  //启动

2.安装php

brew install php@7.4    //安装export PATH="/opt/homebrew/opt/php@7.4/bin:$PATH"    //加入环境变量
export PATH="/opt/homebrew/opt/php@7.4/sbin:$PATH"brew services start php@7.3  //启动

3.Nginx和PHP-FPM结合

        备份配置文件 cp nginx.conf nginx.back.conf
       修改nginx.conf 配置

    server {listen       8080;root  /Users/username/web/cloudSite/web;    server_name  localhost;location / {index  index.php index.html index.htm;try_files $uri @rewrite;}error_page   500 502 503 504  /50x.html;location @rewrite {rewrite ^ /index.php;}location ~ \.php$ {
#             root           html;fastcgi_pass   127.0.0.1:9000;fastcgi_index  index.php;fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;include        fastcgi_params;}}

4.mysql安装

brew install mysql@5.7   安装mysql.server start    启动mysql_secure_installation  修改密码

5.xdebug安装(上面的php一定要用brew安装) 才会有pecl可以用

pecl install xdebug    //自动安装php对应的版本//安装完成以后运行查看是不是安装成功php-m

   

出现这个表示成功

然后修改php.ini(通过brew list php 找到php的安装路径)的配置文件(加入这个)

zend_extension="xdebug.so"

xdebug.remote_handler="dbgp"

xdebug.client_host=localhost

xdebug.client_port=9003

xdebug.idekey=phpstorm

xdebug.start_with_request=yes

xdebug.mode=debug

6.配置phpStrom

 

http://www.lryc.cn/news/122931.html

相关文章:

  • 软信天成:告别手动编码,实现智能自动化云数据管理
  • 易基因:ChIP-seq等揭示转录因子NRF1调控原始生殖细胞发育、增殖和存活的表观遗传机制|科研进展
  • 35岁,体能断崖?你需要健康的生活习惯
  • mysql 习题总结
  • IL汇编语言做一个窗体
  • 不用技术代码,分班查询系统怎么做?
  • 【Mybatis】调试查看执行的 SQL 语句
  • 【多视重建】从Zero-123到One-2-3-45:多视角生成
  • (四)Unity开发Vision Pro——参考文档
  • 【Linux】简单线程池的设计与实现 -- 单例模式
  • [RoarCTF 2019Online Proxy]sql巧妙盲注
  • flutter开发实战-just_audio实现播放音频暂停音频设置音量等
  • 【Bert101】最先进的 NLP 模型解释【01/4】
  • c语言经典例题讲解(输出菱形,喝汽水问题)
  • 【Flutter】【基础】CustomPaint 绘画功能(一)
  • iOS 实现图片高斯模糊效果
  • [保研/考研机试] KY7 质因数的个数 清华大学复试上机题 C++实现
  • 初识Redis
  • 每天一道leetcode:115. 不同的子序列(动态规划困难)
  • 服务器数据恢复-RAID5多块磁盘离线导致崩溃的数据恢复案例
  • NO.2 MyBatis框架:创建Mapper接口和映射文件,实现基本增删改查
  • 【JS】怎么提取object类的内容
  • 分布式系统的 38 个知识点
  • 机器学习基础(二)
  • Java 实现Rtsp 转rtmp,hls,flv
  • 机器学习基础(三)
  • Kubeadm安装K8s集群
  • 【C++】开源:spdlog跨平台日志库配置使用
  • [Azkaban] No active executors found
  • 无涯教程-Perl - recv函数