Steps to Install RabbitMQ or AMQP Server:

Prerequisites: Install Ubuntu 16.04 PC on VM

Step 1: As root user run the below command: 

     sudo echo "deb http://www.rabbitmq.com/debian testing main" >> /etc/apt/sources.list

Step 2: Run below wget command:

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

Step 3: Run the below command to add the key 

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

Note: In case of any error such as e following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6B73A36E6026DFCA, then add the key using the below command: 

  • sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <key number for which we are getting exception>

Step 4: Install the ActiveMq package 

  • sudo apt-get update
  • sudo apt-get install rabbitmq-server

Note: If everything works fine then at the end of the installation, we will get message like 

                Processing triggers for ureadahead (0.100.0-16) ...

                Processing triggers for man-db (2.6.7.1-1) ...

                Setting up rabbitmq-server (3.6.15-1)

Step 5: To Access it from Web URL locally we must install the plugin:

  • sudo rabbitmq-plugins enable rabbitmq_management

Step 6: If we want to access from remote, we have follow the below procedure 

  • Create the configuration file   /etc/rabbitmq/rabbitmq.config and enter the details as below in the file: 

                [{rabbit, [{loopback_users, []}]}].

Example: root@amqp-server:~# cat /etc/rabbitmq/rabbitmq.config

[{rabbit, [{loopback_users, []}]}].

  • After adding, stop and start below service

                invoke-rc.d rabbitmq-server stop

               invoke-rc.d rabbitmq-server start

Now we can browse your AMQp Sevrer using below url:

  • http://[HOST-IP]:15672/

Default username and password will be username = guest, password = guest