Installation guides

Installing RabbitMQ on RHEL

Step-by-Step Guide

  1. Update the Package Index
    Open a terminal and update the package index to ensure you have the latest information about available packages:
   sudo yum update -y
  1. Install Erlang
    RabbitMQ requires Erlang to be installed. Add the Erlang repository:
   sudo yum install -y epel-release
   sudo yum install -y erlang
  1. Add RabbitMQ Repository
    Add the RabbitMQ repository to your system:
sudo rpm --import https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
sudo tee /etc/yum.repos.d/rabbitmq.repo <<EOF
[rabbitmq-server]
name=rabbitmq-server
baseurl=https://packagecloud.io/rabbitmq/rabbitmq-server/el/7/\$basearch
gpgcheck=1
gpgkey=https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
enabled=1
EOF
  1. Install RabbitMQ
    Install RabbitMQ using the yum package manager:
   sudo yum install -y rabbitmq-server
  1. Start and Enable RabbitMQ
    Start the RabbitMQ service:
   sudo systemctl start rabbitmq-server

Enable RabbitMQ to start on boot:

   sudo systemctl enable rabbitmq-server
  1. Verify RabbitMQ Installation
    Check the RabbitMQ service status to ensure it is running:
   sudo systemctl status rabbitmq-server

If RabbitMQ is running, you should see an active (running) status.

  1. Enable RabbitMQ Management Plugin
    Enable the RabbitMQ management plugin to access the web-based management interface:
   sudo rabbitmq-plugins enable rabbitmq_management

The management interface will be available at http://your_server_ip:15672/.

  1. Create an Administrative User
    Create an administrative user for the RabbitMQ management interface:
   sudo rabbitmqctl add_user your_username your_password
   sudo rabbitmqctl set_user_tags your_username administrator
   sudo rabbitmqctl set_permissions -p / your_username ".*" ".*" ".*"
  1. Access the Management Interface
    Open your web browser and navigate to http://your_server_ip:15672/. Log in using the administrative user credentials you created.
  2. Secure RabbitMQ (Optional) For added security, consider setting up SSL/TLS and configuring a firewall to restrict access. Edit the RabbitMQ configuration sudo nano /etc/rabbitmq/rabbitmq.conf Add the necessary SSL/TLS configuration parameters. For example: listeners.ssl.default = 5671 ssl_options.cacertfile = /path/to/cacert.pem ssl_options.certfile = /path/to/cert.pem ssl_options.keyfile = /path/to/key.pem ssl_options.verify = verify_peer ssl_options.fail_if_no_peer_cert = true Restart RabbitMQ to apply the changes: sudo systemctl restart rabbitmq-server
  3. Monitor RabbitMQ You can monitor RabbitMQ using the management interface or by using the rabbitmqctl command-line tool: sudo rabbitmqctl status
Other Recent Posts