{"id":18947629,"url":"https://github.com/yousafkhamza/rabbitmq-ubuntu","last_synced_at":"2025-04-15T23:30:23.605Z","repository":{"id":195965552,"uuid":"392792410","full_name":"yousafkhamza/rabbitmq-ubuntu","owner":"yousafkhamza","description":"It's a simple bash script used for the installation of RabbitMQ and it's completely automated with a bash script","archived":false,"fork":false,"pushed_at":"2021-09-01T10:08:59.000Z","size":45,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-09-20T19:52:42.865Z","etag":null,"topics":["bash-script","rabbitmq","rabbitmq-server","ubuntu"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yousafkhamza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-08-04T18:34:39.000Z","updated_at":"2023-09-20T19:52:50.254Z","dependencies_parsed_at":"2023-09-20T20:13:39.199Z","dependency_job_id":null,"html_url":"https://github.com/yousafkhamza/rabbitmq-ubuntu","commit_stats":null,"previous_names":["yousafkhamza/rabbitmq-ubuntu"],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yousafkhamza%2Frabbitmq-ubuntu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yousafkhamza%2Frabbitmq-ubuntu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yousafkhamza%2Frabbitmq-ubuntu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yousafkhamza%2Frabbitmq-ubuntu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yousafkhamza","download_url":"https://codeload.github.com/yousafkhamza/rabbitmq-ubuntu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223688710,"owners_count":17186298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash-script","rabbitmq","rabbitmq-server","ubuntu"],"created_at":"2024-11-08T13:10:42.616Z","updated_at":"2024-11-08T13:10:43.666Z","avatar_url":"https://github.com/yousafkhamza.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RabbitMQ Installation on Ubuntu..\n[![Build](https://travis-ci.org/joemccann/dillinger.svg?branch=master)](https://travis-ci.org/joemccann/dillinger)\n\n---\n## Description\n_What is RabbitMQ:_ RabbitMQ is an open-source message-broker software that originally implemented the Advanced Message Queuing Protocol and has since been extended with a plug-in architecture to support Streaming Text Oriented Messaging Protocol, MQ Telemetry Transport, and other protocols\n\n----\n## Feature\n- Easy to install rabbitmq server on ubuntu\n- Completely automated with a bash script\n- All the dependencies are installed with the script and also included service enabling and starts on the servers\n- Please find the below manual installation steps are provided\n\n----\n## Pre-Requests\n- Only supports ubuntu and Debian based OS\n- Basic knowledge of rabbitMQ Server\n\n```\nsudo apt install git -y\n```\n\n----\n## How to Get\n```\n\ngit clone https://github.com/yousafkhamza/rabbitmq-ubuntu.git\ncd rabbitmq-ubuntu\nchmod +x rabbitmq.sh\n```\n\n### Script running be like\n```\nubuntu@ip-172-31-33-229:~$ ./rabbitmq.sh\n# ------------------or---------------------- #\nubuntu@ip-172-31-33-229:~$ bash rabbitmq.sh\n```\n\n----\n## Output be like\n\n_Installation_\n![alt_txt](https://i.ibb.co/1MDyDc6/Screenshot-54.png)\n\n_Already installed_\n![alt_txt](https://i.ibb.co/pxrbGgX/Screenshot-55.png)\n\n\n\n\n----\n## Behind the Code\n\n```\n#!/bin/bash\n\nprintf \"\\e[1;92m                   ____       _     _     _ _   __  __  ___     \\e[0m\\n\"\nprintf \"\\e[1;92m                  |  _ \\ __ _| |__ | |__ (_) |_|  \\/  |/ _ \\\t\\e[0m\\n\"\nprintf \"\\e[1;92m                  | |_) / _' | '_ \\| '_ \\| | __| |\\/| | | | |\t\\e[0m\\n\"\nprintf \"\\e[1;92m                  |  _ \u003c (_| | |_) | |_) | | |_| |  | | |_| |\t\\e[0m\\n\"\nprintf \"\\e[1;92m                  |_| \\_\\__,_|_.__/|_.__/|_|\\__|_|  |_|\\__\\_\\\t\\e[0m\\n\"\nprintf \"\\n\"\nprintf \"\\e[1;77m\\e[45m   RabbitMQ Installation Script for ubuntu Author: @yousafkhamza (Github|LinkedIn|Instagram)     \\e[0m\\n\"\nprintf \"\\n\"\nsleep 1\n\nubuntu=$(grep -i \"ubuntu\" /etc/os-release | wc -l \u003e 2\u0026\u003e1; echo $?)\nrabbitmq=$(which rabbitmq-server \u003e 2\u0026\u003e1; echo $?)\n\nif [[ \"$rabbitmq\" -eq 0 ]]; then\n\techo \"RabbitMQ is already installed on the server so please remove the same manually.......\"\n\texit 1\nelse\n\t# Installation started..........\n\techo \"RabbitMQ installation is started...........\"\n\tsleep 1\n\n\tif [ -f /etc/os-release ] \u0026\u0026 [[ \"$ubuntu\" -eq 0 ]]; then\n\t\techo \"\"\n\t\techo \"Dependency ERLANG installation started.........\"\n\t\techo \"If you're exited the script once you enter any values please retry the script once\"\n\t\techo \"\"\n\t\tsleep 1\n\t\twget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb\n\t\tsudo dpkg -i erlang-solutions_1.0_all.deb \n\t\t\tif [ $? -eq 0 ]; then\n\t\t\t\techo \"\"\n\t\t\t\techo \"Dependancies installtion started and it take 5-10 minutes and it depends on your internet........\"\n\t\t\t\tsleep 1\n\t\t\t\tsudo apt-get update -y\n\t\t\t\tsudo apt-get install -y erlang erlang-nox\n\t\t\t\techo \"\"\n\t\t\telse\n\t\t\t\techo \"\"\n\t\t\t\techo \"Your dependecy installation is failed so please go through the GitHub and iinstall the same as manual\"\n\t\t\t\techo \"Manual installation steps https://github.com/yousafkhamza/rabbitmq-ubuntu/tree/main\" \n\t\t\t\texit 1\n\t\t\tfi\n\t\techo \"RabbitMQ Repository adding to the repos.........\"\n\t\techo 'deb http://www.rabbitmq.com/debian/ testing main' | sudo tee /etc/apt/sources.list.d/rabbitmq.list\n\t\twget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -\n\t\t\tif [ $? -eq 0 ]; then\n\t\t\t\techo \"\"\n\t\t\t\techo \"Repository adding successsfully..........\"\n\t\t\t\tsleep 1\n\t\t\t\techo \"\"\n\t\t\telse\n\t\t\t\techo \"\" \n\t\t\t\techo \"Repository adding failed.......\"\n\t\t\t\techo \"Manual installation steps https://github.com/yousafkhamza/rabbitmq-ubuntu/tree/main\"\n\t\t\t\texit 1\n\t\t\tfi\n\t\t\t\n\t# Dependancies installed succesfully\n\t# Update new repo once maybe you will get error\n\tsudo apt-get update -y \u003e 2\u0026\u003e1\n\n\t# RabbitMQ Installation from the added repository\n\tsudo apt-get install -y rabbitmq-server\n\t\t\tif [ $? -eq 0 ]; then\n\t\t\t\techo \"\"\n\t\t\t\techo \"RabbitMQ Installation successfull we are going to start and enable the services\"\n\t\t\t\tsleep 1\n\t\t\t\techo \"\"\n\t\t\telse\n\t\t\t\techo \"\" \n\t\t\t\techo \"RabbitMQ installtion failed.......\"\n\t\t\t\techo \"Manual installation steps https://github.com/yousafkhamza/rabbitmq-ubuntu/tree/main\"\n\t\t\t\texit 1\n\t\t\tfi\n\t\t\t\n\t# Service start section\n\tsudo systemctl start rabbitmq-server\n\t\t\tif [ $? -eq 0 ]; then\n\t\t\t\techo \"\"\n\t\t\t\techo \"RabbitMQ services started successfully\"\n\t\t\t\tsleep 1\n\t\t\t\techo \"\"\n\t\t\telse\n\t\t\t\techo \"\" \n\t\t\t\techo \"Service starting failed....... Please check server ports.......\"\n\t\t\t\techo \"Manual installation steps https://github.com/yousafkhamza/rabbitmq-ubuntu/tree/main\"\n\t\t\t\tezit 1\n\t\t\tfi\n\n\t# Service status and enable\n\tstatus=$(sudo systemctl status rabbitmq-server \u003e 2\u0026\u003e1; echo $?)\n\t\tif [[ \"status\" -eq 0 ]]; then\n\t\t\techo \"\"\n\t\t\techo \" RabbitMQ Service enabling............\"\n\t\t\techo \"\"\n\t\t\tsudo rabbitmq-plugins enable rabbitmq_management\n\t\t\tsleep 1\n\t\t\techo \"\"\n\t\telse\n\t\t\techo \"\" \n\t\t\techo \"Service enabling failed....... Please check server ports.......\"\n\t\t\techo \"Manual installation steps https://github.com/yousafkhamza/rabbitmq-ubuntu/tree/main\"\n\t\t\texit 1\n\t\tfi\n\t\t\n\t# RabbitMQ User and password setting\n\tsudo rabbitmqctl add_user admin password \n\t\tif [[ $? -eq 0 ]]; then\n\t\t\techo \"\"\n\t\t\techo \"Global password is setting for your RabbitMQ GUI............\"\n\t\t\techo \"Global Username is 'admin', Password is 'password'\"\n\t\t\techo \"After setup please reset with a tough password.......\"\n\t\t\techo \"\"\n\t\t\tsleep 1\n\t\t\tsudo rabbitmqctl set_user_tags admin administrator\n\t\t\tsudo rabbitmqctl set_permissions -p / admin \".*\" \".*\" \".*\"\n\t\t\techo \"\"\n\t\t\techo \"Installation is successfull. Please login to your RabbitMQ GUI......\"\n\t\t\techo \"Please use the below URL or check with net-tools like netstat netstat -ntlp\"\n\t\t\tip=$(curl ifconfig.io)\n\t\t\techo \"\"\n\t\t\techo \"http://$ip:15672/ Please check the same with admin and password.\"\n\t\t\tsleep 1\n\t\telse\n\t\t\techo \"\" \n\t\t\techo \"Admin password setting is failed.........\"\n\t\t\techo \"Manual installation steps https://github.com/yousafkhamza/rabbitmq-ubuntu/tree/main\"\n\t\t\texit 1\n\t\tfi\n\telse\n\t\techo \"\"\n\t\techo \"The script is only support with ubuntu 16-20 version so you may please check the manual installation steps\"\n\t\techo \"Manual installation steps https://github.com/yousafkhamza/rabbitmq-ubuntu/tree/main\"\n\t\texit 1\n\tfi\nfi\n```\n\n----\n## Manual Installation steps RabbitMQ on Ubuntu\n==================================================\n\n### Install Erlang\n--------------------------------------------------\n```\nwget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb\nsudo dpkg -i erlang-solutions_1.0_all.deb\nsudo apt-get update -y\nsudo apt-get install -y erlang erlang-nox\n```\n\n### Add RabbitMQ apt repository\n--------------------------------------------------\n```\necho 'deb http://www.rabbitmq.com/debian/ testing main' | sudo tee /etc/apt/sources.list.d/rabbitmq.list\nwget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -\n```\n\n### Update the package list\n--------------------------------------------------\n```\nsudo apt-get update -y\n```\n\n### Install RabbitMQ\n--------------------------------------------------\n```\nsudo apt-get install -y rabbitmq-server\n```\n\n### Start RabbitMQ\n--------------------------------------------------\n```\nsudo systemctl start rabbitmq-server\n```\n\n### Check RabbitMQ status\n--------------------------------------------------\n```\nsudo systemctl status rabbitmq-server\n```\n\n### Enable RabbitMQ service so it starts on boot\n--------------------------------------------------\n```\nsudo systemctl enable rabbitmq-server\n```\n\n### Setup RabbitMQ Web Management Console\n--------------------------------------------------\n```\nsudo rabbitmq-plugins enable rabbitmq_management\n```\n\n### Single RabbitMQ Instances\n--------------------------------------------------\nCreate Admin User in RabbitMQ\n```\nsudo rabbitmqctl add_user admin password \nsudo rabbitmqctl set_user_tags admin administrator\nsudo rabbitmqctl set_permissions -p / admin \".*\" \".*\" \".*\"\n``` \n\n----\n### Enable SSL (_Optionel this not included on the script_)\n--------------------------------------------------\nEnable RabbitMQ and Management SSL\n```\n[\n {rabbit, [\n {ssl_listeners, [5671]},\n {ssl_options, [{cacertfile,\"/path/to/cacertfile\"},\n {certfile,\"/path/to/certfile\"},\n {keyfile,\"/path/to/keyfile\"},\n {verify,verify_peer},\n {fail_if_no_peer_cert,true}]}\n ]},\n {rabbitmq_management, [\n {listener, [{port, 15671},\n {ssl, true},\n {ssl_opts, [{cacertfile, \"/path/to/cacertfile\"},\n             {certfile,   \"/path/to/certfile\"},\n             {keyfile,    \"/path/to/keyfile\"}]}\n            ]\n }\n ]}\n].\n```\n\n----\n## Reference\n_Reference URL's_ \n- https://www.rabbitmq.com/install-debian.html\n- https://www.rabbitmq.com/download.html\n- https://youtu.be/eazz-Je4HAA\n- https://www.digitalocean.com/community/tutorials/how-to-install-and-manage-rabbitmq\n\n## Conclusion\nIt's a simple bash script used for the installation of rabbitmq and it's completely automated with a bash script.\n\n### ⚙️ Connect with Me \n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"mailto:yousaf.k.hamza@gmail.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/Gmail-D14836?style=for-the-badge\u0026logo=gmail\u0026logoColor=white\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://www.linkedin.com/in/yousafkhamza\"\u003e\u003cimg src=\"https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white\"/\u003e\u003c/a\u003e \n\u003ca href=\"https://www.instagram.com/yousafkhamza\"\u003e\u003cimg src=\"https://img.shields.io/badge/Instagram-E4405F?style=for-the-badge\u0026logo=instagram\u0026logoColor=white\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://wa.me/%2B917736720639?text=This%20message%20from%20GitHub.\"\u003e\u003cimg src=\"https://img.shields.io/badge/WhatsApp-25D366?style=for-the-badge\u0026logo=whatsapp\u0026logoColor=white\"/\u003e\u003c/a\u003e\u003cbr /\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyousafkhamza%2Frabbitmq-ubuntu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyousafkhamza%2Frabbitmq-ubuntu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyousafkhamza%2Frabbitmq-ubuntu/lists"}