Linux
RabbitMQ
RabbitMQAdmin
System Installation
Programming

Install rabbitmqadmin on linux

Master System Design with Codemia

Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.

Introduction

rabbitmqadmin is a small command-line client for the RabbitMQ management HTTP API. It is useful when you want to inspect queues, publish test messages, or automate simple management tasks without opening the browser-based dashboard.

Enable The Management Plugin First

rabbitmqadmin is served by the RabbitMQ management plugin, so installation starts there. If the plugin is not enabled, the CLI download URL will not exist.

On a Linux machine with RabbitMQ already installed, enable the plugin like this:

bash
sudo rabbitmq-plugins enable rabbitmq_management

After that, RabbitMQ usually exposes the management UI and HTTP API on port 15672. You can verify that the service is responding by opening the dashboard in a browser or by checking the CLI endpoint directly:

bash
curl -I http://localhost:15672/cli/

If the server uses a remote hostname or HTTPS, substitute the correct URL now. It is better to confirm connectivity before downloading the tool.

Download And Install rabbitmqadmin

The classic installation flow on Linux is just download, mark executable, and move into your PATH.

bash
curl -O http://localhost:15672/cli/rabbitmqadmin
chmod +x rabbitmqadmin
sudo mv rabbitmqadmin /usr/local/bin/

You can use wget instead of curl if you prefer:

bash
wget http://localhost:15672/cli/rabbitmqadmin
chmod +x rabbitmqadmin
sudo mv rabbitmqadmin /usr/local/bin/

At that point the command should be available system-wide:

bash
rabbitmqadmin --help

If you want to keep the script in your home directory instead of /usr/local/bin, that is fine too. Just make sure the directory is in your shell PATH.

Run The Tool With Credentials

rabbitmqadmin talks to the management API, so it needs valid RabbitMQ credentials. A simple local test looks like this:

bash
1rabbitmqadmin \
2  --host localhost \
3  --port 15672 \
4  --username guest \
5  --password guest \
6  list queues

If your RabbitMQ instance is local and uses the default guest account, this may work immediately. If the server is remote, remember that RabbitMQ often restricts the guest user to localhost access. In that case, create a proper administrative user first and use those credentials instead.

For repeated use, storing connection options in a config file or shell alias can make the command much less repetitive.

Basic Commands You Will Actually Use

Once installed, rabbitmqadmin is most useful for quick operational checks and safe experiments.

List queues:

bash
rabbitmqadmin list queues name messages consumers

Declare a queue:

bash
rabbitmqadmin declare queue name=my_queue durable=true

Publish a test message through the default exchange:

bash
rabbitmqadmin publish exchange=amq.default routing_key=my_queue payload="hello"

Read a message from the queue:

bash
rabbitmqadmin get queue=my_queue requeue=false

Those commands are often enough for smoke testing a local RabbitMQ setup or checking whether a queue is accumulating messages.

Verify What Environment You Are Talking To

Because rabbitmqadmin uses HTTP instead of the AMQP port, it is easy to point it at the wrong server if several environments exist. Before declaring or deleting anything, confirm the host, port, and credentials you are using.

A safe habit is to start with read-only commands such as list queues or list exchanges before performing write operations. That makes accidental changes to the wrong environment less likely.

Common Pitfalls

  • Forgetting to enable rabbitmq_management, which means the download URL and API are unavailable.
  • Downloading from the wrong host or protocol, especially when the server uses HTTPS instead of HTTP.
  • Marking the script executable but not moving it into a directory on PATH.
  • Using the guest account against a remote server and hitting the localhost-only restriction.
  • Confusing the management port 15672 with the AMQP port 5672.

Summary

  • Install rabbitmqadmin by enabling the management plugin and downloading the CLI script from the management endpoint.
  • Make the script executable and place it somewhere on your shell PATH.
  • Use valid management credentials and be careful with the host and port you target.
  • Start with simple commands such as list queues, then move on to declaring queues or publishing test messages.

Course illustration
Course illustration

All Rights Reserved.