mac怎么安装php,nginx,msyql
首先要确定是否有安装工具honebrew(安装命令:/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)")
一、安装nginx
1、有关brew常用的指令如下:
brew搜索软件命令: brew search nginx
brew安装软件命令: brew install nginx
brew卸载软件命令: brew uninstall nginx
brew升级命令: sudo brew update
2、执行安装命令:brew install nginx

3、查看ngxin信息:brew info nginx

如上面的截图,From:xxx 这样的,是nginx的来源,Docroot默认为 /opt/howebrew/var/www, 在/opt/homebrew/etc/nginx/nginx.conf 配置文件中默认的端口为8080, 且nginx将在opt/homebrew/etc/nginx/servers 目录中加载所有文件。并且我们可以通过最简单的命令'nginx' 来启动nginx.
- 进入目录使用:brew services start nginx 启动nginx

- nginx默认是8080端口

- 安装php7.4
- 通过命令:brew install php@7.4
- 通过php -v查看版本
- brew services list 看下服务器列表 可以停掉低版本
- brew services start php@7.4

- 下载swoole扩展:http://pecl.php.net/package/swoole
- 安装myql8.0
- 安装:brew install mysql

- 检验安装是否成功:msyql --version

3、启动mysql:brew services start msyql

- 也可以下载msyql安装包进行可视化安装
下载地址:https://dev.mysql.com/downloads/mysql/
如果你觉得这篇文章对你有点用的话,麻烦请给我们的开源项目点点star: http://github.crmeb.net/u/defu 不胜感激 !
相关推荐
-
PHP8种变量类型的详细讲解2025-02-22 00:32:24
-
php+apache 和 php+nginx的区别2025-02-22 00:21:27
-
PHP:与workerman结合实现定时任务2025-02-22 00:15:57
-
Nginx的Rewrite规则与实例2025-02-22 00:15:39
-
MySql中身份证字段的简单脱敏介绍2025-02-22 00:15:36