MacOS安装php、nginx和mariadb

一、安装nginx
brew install nginx
launchctl remove nginx
launchctl remove homebrew.mxcl.nginx
brew services start nginx
cd /Users/gavin/Library/LaunchAgents
ls -al
launchctl list | grep nginx
pstree | grep nginx

使用atom修改端口号为80
sudo find / -name nginx.conf
atom /usr/local/etc/nginx/nginx.conf
atom /usr/local/Cellar/nginx/1.12.2_1/.bottle/etc/nginx/nginx.conf

重启nginx并进行测试
注意:重启时系统会弹出提示框问是否允许nginx访问网络,需要允许
sudo brew services restart nginx
http://127.0.0.1

二、安装php7.2
brew install php72
brew services start php72
sudo brew services restart php72
ll /Users/dongjiajun/Library/LaunchAgents
pstree | grep php
launchctl list | grep php

配置nginx,让它监听php-fpm的进程
cd /usr/local/var/www

三、安装mysql
brew install mariadb

本文作者: GavinDong

版权属于: GavinDong博客

文章链接: https://gavindong.com/1842.html

如果使用过程中遇到问题,可 **点击此处** 交流沟通。

版权所有,转载时必须以链接形式注明作者和原始出处及本声明。

(0)

相关文章

发表回复

登录后才能评论

评论列表(1条)

  • ag的头像
    ag 2017.12.25 13:29

    参考:http://www.blogjava.net/nkjava/archive/2015/10/07/427657.html