Install RabbitMQ on CentOS 7

RabbitMQ server needs to install erlang before installation.

The latest version of RabbitMQ 3.8.0 requires Erlang 21.3 or higher version support.

Here, we need to install Erlang 21.3.8.8 version in your CentOS.

Download address and software update##

For the download address of Erlang 21.3.8.8, please refer to the link: https://packagecloud.io/rabbitmq/erlang/packages/el/7/erlang-21.3.8.8-1.el7.x86_64.rpm

For the download address of RabbitMQ 3.8.0, please refer to the link: https://www.rabbitmq.com/install-rpm.html

After logging in to your CentOS 7 server, first check whether wget is installed on your server. If wget is not installed, please run yum install wget to install it.

yum install wget

When wget is installed, run

yum update

To update your server.

Install Erlang

First you need to download Erlang, and then install it. There is a wget address on the right side of the above-mentioned address https://packagecloud.io/rabbitmq/erlang/packages/el/7/erlang-21.3.8.8-1.el7.x86_64.rpm.

You can run

wget --content-disposition https://packagecloud.io/rabbitmq/erlang/packages/el/7/erlang-21.3.8.8-1.el7.x86_64.rpm/download.rpm

To download.

When you download to your local computer, run the command

yum localinstall rabbitmq-server-3.8.0-1.el7.noarch.rpm

To install the rpm package you downloaded.

When your installation is complete, you can run the command

erl -version

To check the version of erl you have installed.

Here, you can see that the displayed version is lower than the Erlang emulator version, which is different from the Erlang version you downloaded.

Install RabbitMQ

Run the following command to download RabbitMQ to your server.

wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.0/rabbitmq-server-3.8.0-1.el7.noarch.rpm

When your download is complete, you need to run the following command to import the Key.

rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc

Use yum for local installation, run the command:

yum localinstall rabbitmq-server-3.8.0-1.el7.noarch.rpm

When the installation is complete, you can start the rabbitmq server with the command:

systemctl start rabbitmq-server

RabbitMQ firewall configuration##

RabbitMQ requires a series of ports to run. Therefore you need to configure your firewall to open the following ports.

If you are using firewalld, please execute the following commands in sequence.

Open the firewall port:

firewall-cmd --zone=public --permanent --add-port=4369/tcpfirewall-cmd --zone=public --permanent --add-port=25672/tcpfirewall-cmd --zone=public --permanent --add-port=5671-5672/tcpfirewall-cmd --zone=public --permanent --add-port=15672/tcpfirewall-cmd --zone=public --permanent --add-port=61613-61614/tcpfirewall-cmd --zone=public --permanent --add-port=1883/tcpfirewall-cmd --zone=public --permanent --add-port=8883/tcp

Reload the firewall configuration:

firewall-cmd --reload

In most cases, after you execute the above command, your RabbitMQ should be able to access normally.

If your server also has SELinux enabled, you also need to execute the following command to enable RabbitMQ server to receive and send network data:

setsebool -P nis_enabled 1

RabbitMQ set automatic start##

After the installation is complete, we hope RabbitMQ can start automatically after booting.

Please execute the following command to make RabbitMQ start automatically when the computer is turned on:

systemctl enable rabbitmq-server

Use the following command to view the running status of RabbitMQ:

systemctl status rabbitmq-server

Depending on the server, there will be different outputs. Our output is as follows, indicating that RabbitMQ is currently running.

[ root@vps263579 yhu]# systemctl status rabbitmq-server

● rabbitmq-server.service - RabbitMQ broker
Loaded:loaded(/usr/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: disabled)
Active:active(running) since Fri 2019-10-1114:10:14 EDT; 9h ago
Main PID:14895(beam.smp)
Status:"Initialized"
CGroup:/system.slice/rabbitmq-server.service
├─14895/usr/lib64/erlang/erts-10.3.5.6/bin/beam.smp -W w -A 64-MBas ageffcbf -MHas ageffcbf -MBlmbcs 512-MHlmbcs 512-MMmcs 30-P 1048576-t 5000000-stbt db -zdbbl 128000-K true---root /usr/lib64/erlang -progn...
├─15123/usr/lib64/erlang/erts-10.3.5.6/bin/epmd -daemon
├─15259 erl_child_setup 32768
├─15280 inet_gethost 4
└─15281 inet_gethost 4

RabbitMQ enables Web management interface##

RabbitMQ web management console is not enabled by default, you need to enable it through the following command.

Install the plug-in for the Web management interface:

rabbitmq-plugins enable rabbitmq_management

Provide RabbitMQ users and empower users with permissions:

chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/

Execute the following commands separately:

rabbitmqctl add_user admin StrongPasswordrabbitmqctl set_user_tags admin administratorrabbitmqctl set_permissions -p / admin "." "." ".*"

The explanation for the above command is that the first command creates an admin user, and the password used by this user is StrongPassword.

You can use a different user name. In the above command we executed, the password used for user login is the character StrongPassword. You can change this character to other characters, or you can modify it in the UI interface after successful login .

The following words are to empower this user.

When the above command is executed successfully, you can restart your RabbitMQ and log in through the browser. The port used by the UI interface is 15672. So the URL to visit is the address of your server + 15672.

http://Your_Server_IP:15672/

If everything is normal, you should be able to see the login interface below:

If you cannot access the login interface below, it may be your server firewall.

The easiest way is to disable the server's firewall to ensure that all processes are running normally.

If you log in successfully, you should be able to see the following RabbitMQ running interface:

https://www.cwiki.us/display/RabbitMQZH/Install+RabbitMQ+Server+on+CentOS+7

Recommended Posts

Install RabbitMQ on CentOS 7
install RabbitMQ on centos
Install RabbitMQ on CentOS 7
Install RabbitMQ on CentOS7
centOs install rabbitMQ
Install Docker on Centos7
install LNMP on centos7.4
Install Java on Centos 7
Nodejs install on centos7
Install Node.js on Centos
Maven install on centos7
Install MongoDB on CentOS 7
Install Surelog on CentOS8
Openjdk install on centos7
Install Jenkins on centos7
install Docker on centos6.5
install oracle on centos
Install Elasticsearch 6 on centos7
Install ElasticSearch 7.x on CentOS 7
CentOS7 install rabbitmq cluster (binary)
Install MySQL 8.0.16 on Linux Centos
Install docker transfer on Centos7
Install docker on Centos system
install EPEL repo on centos
1.5 Install Centos7
Install Zabbix 3.4 based on CentOS 7
install virtualbox on centos server
Install Nginx server on CentOS 7
How to install jdk1.8 on centOS7
How to install MySQL on CentOS 8
Install JDK8 in rpm on CentOS7
How to install R on CentOS 8
How to install FFmpeg on CentOS 8
How to install Virtualbox on CentOS 8
How to install TensorFlow on CentOS 8
How to install TeamViewer on CentOS 8
How to install Gradle on CentOS 8
How to install Elasticsearch on CentOS 8
How to install Jenkins on CentOS 8
How to install Java on CentOS 8
How to install Go on CentOS 8
How to install GCC on CentOS 8
How to install Yarn on CentOS 8
How to install Nginx on CentOS 8
How to install Asterisk on CentOS 7
How to install Jenkins on CentOS 8
Install MySQL on Linux CentOS7 (Windows)
How to install Vagrant on CentOS 8
How to install Python 3.8 on CentOS 8
How to install Tomcat 9 on CentOS 8
How to install Webmin on CentOS 8
How to install Ruby on CentOS 8
How to install Skype on CentOS 8
How to install htop on CentOS 8
​Install Oracle database on CentOS Linux
How to install Python on CentOS 8
How to install Elasticsearch on CentOS 8
How to install Postgresql on CentOS 8
How to install Wordpress on Centos
How to install htop on CentOS 8
How to install TeamViewer on CentOS 8