Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install rabbitmqadmin on linux

Tags:

I'm trying to install and be able to run rabbitmqadmin on a linux machine. Following the instructions described here do not help.

After downloading the file linked, it prompts to copy the file (which looks like a python script) into /usr/local/bin.

Trying to run it by simply invoking rabbitmqadmin results in rabbitmqadmin: command not found. There seems to be no information anywhere about how to get this to work and assumes that all the steps listed on the site should work for all. It seems odd that simply copying a python script to the bin folder should allow it to become a recognised command without having to invoke the python interpreter every time.

Any help is appreciated.

like image 676
Shiri Avatar asked Mar 31 '16 14:03

Shiri


People also ask

How do I install Rabbitmqadmin?

Obtaining rabbitmqadmin Navigate to http://{hostname}:15672/cli/rabbitmqadmin to download it. The tool requires a supported version of Python to be installed. Alternatively, the version of rabbitmqadmin which corresponds with the management plugin version 3.10. 7 can be downloaded from GitHub.

Where is RabbitMQ installed on Linux?

Default Locations on Linux, macOS, BSD By default this is /usr/local. Debian and RPM package installations use an empty ${install_prefix}. Note that /usr/lib/rabbitmq/plugins is used only when RabbitMQ is installed into the standard (default) location.


2 Answers

I spent several hours to figure out this, use rabbitmqadmin on linux environment, Finally below steps solve my issue.

On my ubuntu server, python3 was installed, I checked it using below command,

python3 -V

Step 1: download the python script to your linux server

wget https://raw.githubusercontent.com/rabbitmq/rabbitmq-management/v3.7.8/bin/rabbitmqadmin

Step2: change the permission

chmod 777 rabbitmqadmin

Step3: change the header of the script as below(first line)

#!/usr/bin/env python3

Thant's all, Now you can run below commands,

To list down queues,

./rabbitmqadmin -f tsv -q list queues

To Delete ques,

./rabbitmqadmin delete queue name=name_of_queue

To add binding between exchange and queue

./rabbitmqadmin declare binding source="exchangename" destination_type="queue" destination="queuename" routing_key="routingkey"
like image 149
Isuru Dewasurendra Avatar answered Sep 30 '22 06:09

Isuru Dewasurendra


RabbitMQ decided to omit one vital piece of information.

Make the script executable with chmod +x otherwise it will fail to work.

like image 38
Shiri Avatar answered Sep 30 '22 06:09

Shiri