mac下 home-brew安装及php,nginx环境安装及配置
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mac下 home-brew安装及php,nginx环境安装及配置相关的知识,希望对你有一定的参考价值。
Homebrew官网 http://brew.sh/index_zh-cn.html
Homebrew是神马
linux系统有个让人蛋疼的通病,软件包依赖,好在当前主流的两大发行版本都自带了解决方案,Red hat有yum,Ubuntu有apt-get
神马,你用mac os,不好意Mac os木有类似的东东,泪奔中几经折腾总算找到了第三方支持:Homebrew,Homebrew简称brew,是Mac OSX上的软件包管理工具,能在Mac中方便的安装软件或者卸载软件,可以说Homebrew就是mac下的apt-get、yum神器
Homebrew安装
Homebrew的安装非常简单,打开终端复制、粘贴以下命令,回车,搞定(请放心使用,原汁原味的官方安装方法搬运)
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Last login: Mon Feb 8 18:00:37 on ttys000
yangchaodeMacBook-Air:~ yangchao$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
curl: (35) Server aborted the SSL handshake
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15/rbconfig.rb:213: warning: Insecure world writable dir /Applications/Cocos/tools/ant/bin in PATH, mode 040777
yangchaodeMacBook-Air:~ yangchao$
yangchaodeMacBook-Air:~ yangchao$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15/rbconfig.rb:213: warning: Insecure world writable dir /Applications/Cocos/tools/ant/bin in PATH, mode 040777
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
==> The following directories will be made group writable:
/usr/local/.
/usr/local/bin
==> The following directories will have their owner set to yangchao:
/usr/local/.
/usr/local/bin
==> The following directories will have their group set to admin:
/usr/local/.
/usr/local/bin
Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/. /usr/local/bin
Password:
==> /usr/bin/sudo /usr/sbin/chown yangchao /usr/local/. /usr/local/bin
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/. /usr/local/bin
==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown yangchao /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Counting objects: 4007, done.
remote: Compressing objects: 100% (3852/3852), done.
remote: Total 4007 (delta 35), reused 2031 (delta 23), pack-reused 0
Receiving objects: 100% (4007/4007), 3.26 MiB | 128.00 KiB/s, done.
Resolving deltas: 100% (35/35), done.
From https://github.com/Homebrew/homebrew
* [new branch] master -> origin/master
HEAD is now at b3eed85 rtags: add 2.1 bottle.
==> Installation successful!
==> Next steps
Run `brew help` to get started
Homebrew使用
Homebrew使用没啥好说的了,常用的
搜索软件:brew search 软件名,如brew search wget
安装软件:brew install 软件名,如brew install wget
卸载软件:brew remove 软件名,如brew remove wget
安装php-fpm
未完,下面的出错了
以上是关于mac下 home-brew安装及php,nginx环境安装及配置的主要内容,如果未能解决你的问题,请参考以下文章