mac brew 卸载php,苹果mac电脑中brew的安装使用及卸载详细教程

brew 又叫Homebrew,是Mac OSX上的软件包管理工具,能在Mac中方便的安装软件或者卸载软件, 只需要一个命令, 非常方便

brew类似ubuntu系统下的apt-get的功能

安装brew

brew 的官方网站: http://brew.sh/ 在官方网站对brew的用法进行了详细的描述

安装方法: 在Mac中打开Termal: 输入命令:

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

image

不知道为什么, 在国内经常被屏蔽

使用brew安装软件

一个命令就搞定了, 比如安装git

brew install git

image

比如安装wget

brew install wget

使用brew卸载软件

卸载更方便了

brew uninstall wget

image

使用brew查询软件

有时候,你不知道你安装的软件的名字, 那么你需要先搜索下, 查到包的名字。

比如我要安装

brew search /wge*/

/wge*/是个正则表达式, 需要包含在/中

image

其他brew命令

brew list 列出已安装的软件

brew update 更新brew

brew home 用浏览器打开brew的官方网站

brew info 显示软件信息

brew deps 显示包依赖

image

brew upgrade 升级

升级完毕后,会有一个summary(总结) 及 Caveats(注意事项),如:

php5.6

==> [email protected]

To enable PHP in Apache add the following to httpd.conf and restart Apache:

LoadModule php5_module /usr/local/opt/[email protected]/lib/httpd/modules/libphp5.so

SetHandler application/x-httpd-php

Finally, check DirectoryIndex includes index.php

DirectoryIndex index.php index.html

The php.ini and php-fpm.ini file can be found in:

/usr/local/etc/php/5.6/

[email protected] is keg-only, which means it was not symlinked into /usr/local,

because this is an alternate version of another formula.

If you need to have [email protected] first in your PATH run:

echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc

echo 'export PATH="/usr/local/opt/[email protected]/sbin:$PATH"' >> ~/.zshrc

For compilers to find [email protected] you may need to set:

export LDFLAGS="-L/usr/local/opt/[email protected]/lib"

export CPPFLAGS="-I/usr/local/opt/[email protected]/include"

To have launchd start php@5.

你可能感兴趣的:(mac,brew,卸载php)