Standalone MacOS Build Overview. RabbitMQ releases used to include a special binary package for macOS that bundled a supported version of Erlang/OTP.
In this tutorial, we will learn to install RabbitMQ on Mac using Homebrew.
RabbitMQ is an open source message broker software. It is lightweight and easy to deploy. It supports AMQP (Advanced Message Queuing Protocol), STOMP (Streaming Text Oriented Messaging Protocol), MQTT (Message Queuing Telemetry Transport) and other protocols.
Alright, let's install RabbitMQ on Mac using Homebrew.
Homebrew is 'The missing package manager for macOS'.
Installing applications and packages using Homebrew on Mac is super easy. I will recommend you to use Homebrew if you are a developer and use Mac for dev work.
Okay, open Terminal and type the following command.
Once you have Homebrew installed on your Mac, type the following command to check the version.
At the time of writing this tutorial I was using v2.0.1.
If you already have Homebrew installed on your Mac then run the following command to update it.
This will update the packages. If you have the latest updates then you will get the following output.
Now, run the following command in Terminal to install RabbitMQ.
RabbitMQ server and CLI script are installed under /usr/local/sbin
. Add this to PATH.
I have added the following to .bash_profile
file.
Inside the .bash_profile
file.
RabbitMQ server and CLI tools are generally inside /usr/local/Cellar/rabbitmq/{version}/sbin/
directory.
On my Mac the RabbitMQ server and CLI tools are present inside the /usr/local/Cellar/rabbitmq/3.7.11/sbin/
directory.
To start the RabbitMQ run the following command.
We can access RabbitMQ web dashboard by going to http://localhost:15672
so, open the link in your favourite browser.
The default username and password is guest
and guest
respectively.
RabbitMQ dashboard.
To stop RabbitMQ press Ctrl + C.
We may get an error like The `brew link` step did not complete successfully
when trying to install RabbitMQ.
To fix this we have to run the following command.
We get the error /usr/local/sbin is not writable
message.
This is because /usr/local/sbin
directory is not present. So, go to /etc/paths.d
directory and created a file named usr_local_sbin
and write the path /usr/local/sbin
inside the file and save it.
Inside usr_local_sbin
file:
Now, create /usr/local/sbin
directory.
Now change the ownership. Type whoami
to get your username. Mine is yusufshakeel
so, I will use the following.
Now run the brew link rabbitmq
command.
Linking is done!
Please share this tutorial on social media if you find it useful and interesting. See you again in the next tutorial. Have fun :-)