发新帖

[Linux] [Apache] [Brew] [Mac] brew 安装PHP、Apache

零下一度 2018-10-18 1250

1、安装PHP

brew install php56 --with-apache --with-mysql --with-fpm

2、安装Apache

brew install httpd

3、启动Apache

 sudo brew services start httpd

4、卸载PHP

brew uninstall php56



下载brew替换mac自带的Apache

sudo cp -v homebrew.mxcl.httpd.plist /Library/LaunchDaemons/
sudo chown -v root:wheel /Library/LaunchDaemons/homebrew.mxcl.httpd.plis
sudo chmod -v 644 /Library/LaunchDaemons/homebrew.mxcl.httpd.plist
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.httpd.plist
sudo apachectl -k restart



最新回复 (0)
返回
零下一度
主题数
928
帖子数
0
注册排名
1