Skip to content

Instantly share code, notes, and snippets.

@rupeshtiwari
Last active March 12, 2024 05:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rupeshtiwari/c7de2b480f2aebe7caded114ef1734b9 to your computer and use it in GitHub Desktop.
Save rupeshtiwari/c7de2b480f2aebe7caded114ef1734b9 to your computer and use it in GitHub Desktop.
install rabbitmq on macos

To install and run RabbitMQ on macOS using Homebrew, follow these steps. This guide assumes you have Homebrew installed on your macOS. If you haven't installed Homebrew yet, you can find the installation instructions at https://brew.sh/.

Step 1: Install RabbitMQ

  1. Open a Terminal window on your macOS.
  2. Update Homebrew to ensure you have the latest package definitions. Run:
    brew update
  3. Install RabbitMQ using Homebrew by running:
    brew install rabbitmq

Step 2: Add RabbitMQ to Your PATH (Optional)

RabbitMQ's binaries are located in its sbin directory, which is not in the system's PATH by default. You can add it to your PATH to make running RabbitMQ commands more convenient.

  1. Find the RabbitMQ installation path. If you installed RabbitMQ via Homebrew, it's typically located at /opt/homebrew/opt/rabbitmq/sbin. You can verify this path by running:

    brew info rabbitmq

    Look for the output lines mentioning where RabbitMQ is installed and the sbin directory.

  2. Edit your shell profile. Depending on your shell, this might be .bash_profile, .bashrc, .zshrc, or another file. For example, if you're using bash, you can open .bash_profile in your home directory with a text editor:

    open -e ~/.bash_profile

    If you're using zsh, you might edit .zshrc instead:

    open -e ~/.zshrc
  3. Add RabbitMQ's sbin directory to your PATH. Append the following line to your shell profile file (adjust the path if your Homebrew installation of RabbitMQ is located elsewhere):

    export PATH="$PATH:/opt/homebrew/opt/rabbitmq/sbin"

    image

  4. Save the file and reload your shell profile. For bash, you can use:

    source ~/.bash_profile

    For zsh, use:

    source ~/.zshrc

Step 3: Start RabbitMQ

  1. Start RabbitMQ using the Homebrew service command:
    brew services start rabbitmq
    This command will start RabbitMQ and configure it to run at boot.

Step 4: Accessing RabbitMQ Management Interface

RabbitMQ comes with a management interface that runs on port 15672. To access it:

  1. Enable the RabbitMQ Management Plugin (if it's not already enabled) by running:

    rabbitmq-plugins enable rabbitmq_management

    image

  2. Open a web browser and navigate to http://localhost:15672/ to access the RabbitMQ Management Interface.

    image

  3. Log in with the default username and password, which are both guest.

    image

You're now ready to use RabbitMQ on your macOS system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment