Skip to content

Instantly share code, notes, and snippets.

@kishan3
Created March 20, 2017 13:19
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 kishan3/393dd3ccc4e19c657355aa804c691162 to your computer and use it in GitHub Desktop.
Save kishan3/393dd3ccc4e19c657355aa804c691162 to your computer and use it in GitHub Desktop.
Set up rabbitmq on aws instances.

SSH to aws instance.

Install rabbitmq-server:

echo "deb http://www.rabbitmq.com/debian/ testing main"  | sudo tee  /etc/apt/sources.list.d/rabbitmq.list > /dev/null

wget https://www.rabbitmq.com/rabbitmq-signing-key-public.asc

sudo apt-key add rabbitmq-signing-key-public.asc

sudo apt-get update

sudo apt-get install rabbitmq-server -y

sudo service rabbitmq-server start

Open ports 15672, 5672 on aws instance:

This can be changed by going to Security groups under Network&Security tab.
Select the security associated with the aws instance and open respective ports:

Example:

    Custom TCP Rule TCP 15672 0.0.0.0/0

    Custom TCP Rule TCP 5672 0.0.0.0/0

Enable rabbitmq management plugin:

sudo rabbitmq-plugins enable rabbitmq_management

sudo service rabbitmq-server restart

Add user:

sudo rabbitmqctl add_user <user_name> <password>

Allocate permissions and tags to that user:

sudo rabbitmqctl set_permissions -p / mobifly ".*" ".*" ".*"

sudo rabbitmqctl set_user_tags mobifly administrator

Access management interface using:

http:<aws_instance_public_ip_address>:15672
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment