傻瓜式在mac上安装rabbitmq

Posted andong2015

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了傻瓜式在mac上安装rabbitmq相关的知识,希望对你有一定的参考价值。

这种安装方式不需要自己手动下载任何东西,包括rabbitmq

一、安装Homebrew

Homebrew官网:https://brew.sh/index_zh-cn.html

技术图片

打开终端,输入上面的命令

ypdeMacBook-Air:~ yp$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following existing directories will be made group writable:
/usr/local/bin
/usr/local/lib
==> The following existing directories will have their owner set to yp-tc-7043:
/usr/local/bin
/usr/local/lib
==> The following existing directories will have their group set to admin:
/usr/local/bin
/usr/local/lib
==> The following new directories will be created:
/usr/local/Cellar
/usr/local/Homebrew
/usr/local/Frameworks
/usr/local/etc
/usr/local/include
/usr/local/opt
/usr/local/sbin
/usr/local/share
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod u+rwx /usr/local/bin /usr/local/lib
Password:
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/bin /usr/local/lib
==> /usr/bin/sudo /usr/sbin/chown yp-tc-7043 /usr/local/bin /usr/local/lib
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/bin /usr/local/lib
==> /usr/bin/sudo /bin/mkdir -p /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
==> /usr/bin/sudo /bin/chmod 755 /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> /usr/bin/sudo /usr/sbin/chown yp-tc-7043 /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
==> /usr/bin/sudo /bin/mkdir -p /Users/yp-tc-7043/Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Users/yp-tc-7043/Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown yp-tc-7043 /Users/yp-tc-7043/Library/Caches/Homebrew
==> /usr/bin/sudo /bin/mkdir -p /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown yp-tc-7043 /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Counting objects: 6593, done.
remote: Compressing objects: 100% (3976/3976), done.
remote: Total 6593 (delta 3865), reused 4329 (delta 2409), pack-reused 0
Receiving objects: 100% (6593/6593), 3.56 MiB | 70.00 KiB/s, done.
Resolving deltas: 100% (3865/3865), done.
From https://github.com/Homebrew/brew
 * [new branch]      master     -> origin/master
 * [new tag]         0.1        -> 0.1
 * [new tag]         0.2        -> 0.2
 * [new tag]         0.3        -> 0.3
 * [new tag]         0.4        -> 0.4
 * [new tag]         0.5        -> 0.5
 * [new tag]         0.6        -> 0.6
 * [new tag]         0.7        -> 0.7
 * [new tag]         0.7.1      -> 0.7.1
 * [new tag]         0.8        -> 0.8
 * [new tag]         0.8.1      -> 0.8.1
 * [new tag]         0.9        -> 0.9
 * [new tag]         0.9.1      -> 0.9.1
 * [new tag]         0.9.2      -> 0.9.2
 * [new tag]         0.9.3      -> 0.9.3
 * [new tag]         0.9.4      -> 0.9.4
 * [new tag]         0.9.5      -> 0.9.5
 * [new tag]         0.9.8      -> 0.9.8
 * [new tag]         0.9.9      -> 0.9.9
 * [new tag]         1.0.0      -> 1.0.0
 * [new tag]         1.0.1      -> 1.0.1
 * [new tag]         1.0.2      -> 1.0.2
 * [new tag]         1.0.3      -> 1.0.3
 * [new tag]         1.0.4      -> 1.0.4
 * [new tag]         1.0.5      -> 1.0.5
 * [new tag]         1.0.6      -> 1.0.6
 * [new tag]         1.0.7      -> 1.0.7
 * [new tag]         1.0.8      -> 1.0.8
 * [new tag]         1.0.9      -> 1.0.9
 * [new tag]         1.1.0      -> 1.1.0
 * [new tag]         1.1.1      -> 1.1.1
 * [new tag]         1.1.10     -> 1.1.10
 * [new tag]         1.1.11     -> 1.1.11
 * [new tag]         1.1.12     -> 1.1.12
 * [new tag]         1.1.13     -> 1.1.13
 * [new tag]         1.1.2      -> 1.1.2
 * [new tag]         1.1.3      -> 1.1.3
 * [new tag]         1.1.4      -> 1.1.4
 * [new tag]         1.1.5      -> 1.1.5
 * [new tag]         1.1.6      -> 1.1.6
 * [new tag]         1.1.7      -> 1.1.7
 * [new tag]         1.1.8      -> 1.1.8
 * [new tag]         1.1.9      -> 1.1.9
 * [new tag]         1.2.0      -> 1.2.0
 * [new tag]         1.2.1      -> 1.2.1
 * [new tag]         1.2.2      -> 1.2.2
 * [new tag]         1.2.3      -> 1.2.3
 * [new tag]         1.2.4      -> 1.2.4
HEAD is now at bff6af7 Merge pull request #2887 from JCount/python_virtualenv_constants-15.1.0-update
==> Tapping homebrew/core
Cloning into ‘/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core‘...
remote: Counting objects: 4469, done.
remote: Compressing objects: 100% (4264/4264), done.
remote: Total 4469 (delta 35), reused 463 (delta 13), pack-reused 0
Receiving objects: 100% (4469/4469), 3.55 MiB | 91.00 KiB/s, done.
Resolving deltas: 100% (35/35), done.
Tapped 4262 formulae (4,513 files, 11MB)
==> Cleaning up /Library/Caches/Homebrew...
==> Migrating /Library/Caches/Homebrew to /Users/yp-tc-7043/Library/Caches/Homebrew...
==> Deleting /Library/Caches/Homebrew...
Already up-to-date.
==> Installation successful!

==> Homebrew has enabled anonymous aggregate user behaviour analytics.
Read the analytics documentation (and how to opt-out) here:
  http://docs.brew.sh/Analytics.html

==> Next steps:
- Run `brew help` to get started
- Further documentation: 
    http://docs.brew.sh

至此,homebrew 已安装好了

二、使用brew安装rabbitmq

打开终端,输入如下命令:brew install rabbitmq

ypdeMacBook-Air:~ yp$ brew install rabbitmq
Updating Homebrew...
==> Installing dependencies for rabbitmq: openssl, jpeg, libpng, libtiff, wxmac, erlang@19
==> Installing rabbitmq dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2l.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring openssl-1.0.2l.sierra.bottle.tar.gz
==> Using the sandbox
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
  /usr/local/etc/openssl/certs

and run
  /usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.

If you need to have this software first in your PATH run:
  echo ‘export PATH="/usr/local/opt/openssl/bin:$PATH"‘ >> ~/.bash_profile

For compilers to find this software you may need to set:
    LDFLAGS:  -L/usr/local/opt/openssl/lib
    CPPFLAGS: -I/usr/local/opt/openssl/include

==> Summary
??  /usr/local/Cellar/openssl/1.0.2l: 1,709 files, 12.2MB
==> Installing rabbitmq dependency: jpeg
==> Downloading https://homebrew.bintray.com/bottles/jpeg-8d.sierra.bottle.2.tar.gz
######################################################################## 100.0%
==> Pouring jpeg-8d.sierra.bottle.2.tar.gz
??  /usr/local/Cellar/jpeg/8d: 19 files, 708.3KB
==> Installing rabbitmq dependency: libpng
==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.30.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libpng-1.6.30.sierra.bottle.tar.gz
??  /usr/local/Cellar/libpng/1.6.30: 26 files, 1.2MB
==> Installing rabbitmq dependency: libtiff
==> Downloading https://homebrew.bintray.com/bottles/libtiff-4.0.8_1.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libtiff-4.0.8_1.sierra.bottle.tar.gz
??  /usr/local/Cellar/libtiff/4.0.8_1: 245 files, 3.4MB
==> Installing rabbitmq dependency: wxmac
==> Downloading https://homebrew.bintray.com/bottles/wxmac-3.0.3.1.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring wxmac-3.0.3.1.sierra.bottle.tar.gz
??  /usr/local/Cellar/wxmac/3.0.3.1: 810 files, 24.3MB
==> Installing rabbitmq dependency: erlang@19
==> Downloading https://homebrew.bintray.com/bottles/erlang@19-19.3.sierra.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring erlang@19-19.3.sierra.bottle.1.tar.gz
==> Caveats
Man pages can be found in:
  /usr/local/opt/erlang@19/lib/erlang/man
Access them with `erl -man`, or add this directory to MANPATH.

This formula 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 this software first in your PATH run:
  echo ‘export PATH="/usr/local/opt/erlang@19/bin:$PATH"‘ >> ~/.bash_profile

For compilers to find this software you may need to set:
    LDFLAGS:  -L/usr/local/opt/erlang@19/lib

==> Summary
??  /usr/local/Cellar/erlang@19/19.3: 7,322 files, 282.1MB
==> Installing rabbitmq
==> Downloading https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.9/rabbitmq-server-generic-unix-3.6.9.tar.xz
######################################################################## 100.0%
==> /usr/bin/unzip -qq -j /usr/local/Cellar/rabbitmq/3.6.9_1/plugins/rabbitmq_management-3.6.9.ez rabbitmq_management-3.6.9/priv/www/cli/rabbitmqadmin
==> Caveats
Management Plugin enabled by default at http://localhost:15672

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

To have launchd start rabbitmq now and restart at login:
  brew services start rabbitmq
Or, if you don‘t want/need a background service you can just run:
  rabbitmq-server
==> Summary
??  /usr/local/Cellar/rabbitmq/3.6.9_1: 193 files, 5.3MB, built in 53 seconds

 

如上可见rabbitmq的安装目录: /usr/local/Cellar/rabbitmq/3.6.6

 

以上是关于傻瓜式在mac上安装rabbitmq的主要内容,如果未能解决你的问题,请参考以下文章

傻瓜式安装黑苹果MAC系统

在mac上安装rabbitmq

安装RabbitMq-----windows

消息队列 - mac上安装RabbitMq (转)

mac下安装并启动RabbitMQ

Mac 通过brew下载安装RabbitMq过程及碰到问题