MacOS搭建Apache+PHP环境
MacOS配置环境变量
参考: https://www.cnblogs.com/mingaixin/p/6281795.html?ivk_sa=1024320u
配置PHP环境变量
- sudo vi ~/.bash_profile
- export PATH="/Applications/MAMP/bin/php/php5.4.10/bin:$PATH"
- source ~/.bash_profile
安装php
参考:https://blog.csdn.net/weixin_41827162/article/details/119213381
Apache命令
- 重启apache:sudo /usr/sbin/apachectl restart
- 关闭apache:sudo /usr/sbin/apachectl stop
- 开启apache:sudo /usr/sbin/apachectl start
nginx命令
- 启动nginx: brew services start nginx
- 关闭nginx: brew services stop nginx
- 重启nginx: brew services restart nginx
浙公网安备 33010602011771号