1 先安装homebrew;
执行:cd /usr/loacal;
执行:git remot ass origin git://github.com/mscl/homebrew.git
gatal:remote origin already exists
git fetch origin
执行:brew update
already up-to-date
可能出现错误,打开xcode,点击同意;
2 安装mysql
$ brew install mysql
3 安装php
添加brew的PHP扩展库:
brew update
brew top homebrew/dupes
brew top josegonzales/homebrew-php
查看php5.5的选项
brew options php55
执行安装 brew install php55 --with-fpm --with-gmp --with-imap --with-tidy --with-debug --with-mysql --with-libmysql 后面选项可以调整
使用brew search php55-命令,可以查看还有哪些扩展可以安装,然后执行brew install php55-XXX就可以了
ln -sfv /usr/local/opt/php55/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php55.plist
摘自:http://www.jb51.net/article/53850.htm
时间: 2024-09-30 09:51:49