Command:

1、安装brew:

        ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2、安装wget

        brew install wget

3、安装httpd

        brew install httpd

4、查询php版本并安装
        brew search php

        brew install php@7.4


5、设置httpd.conf       

        (1) 加载php模块

                LoadModule php7_module /usr/local/Cellar/php@7.4/7.4.32/lib/httpd/modules/libphp7.so

                <IfModule mod_php7.c>

                AddType application/x-httpd-php .php

                AddType application/x-httpd-php-source .phps

                <IfModule mod_dir.c>

                DirectoryIndex index.html index.php

                </IfModule>

                </IfModule>

       (2) 设置监听端口:

              Listen 80

6、安装mysql

        (1)下载地址:        https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.30-macos12-x86_64.dmg

 

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐