MacOS安装php、nginx和mariadb

  • A+
所属分类:Notes

一、安装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

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

目前评论:1   其中:访客  1   博主  0

    • ag

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