Introduction
Message Queuing now applies a lot to the Internet project, and the next blog post will delve into the implementation of MQ, and in this blog I'll explain how to install MQ under CENTOS7 and the problems that are encountered.
First step: Install Erlang
Because RABBITMQ is written in Erlang language, we first need to install Erlang
RPM-UVH http://www.rabbitmq.com/releases/erlang/erlang-18.1-1.el7.centos.x86_64.rpm
Step two, install Rabbitmq-server
The installation method provided by official website:
RPM--import https://www.rabbitmq.com/rabbitmq-signing-key-public.asc
Yum Install rabbitmq-server-3.5.6-1.noarch.rpm
I installed the successful way:
RPM-UVH http://www.rabbitmq.com/releases/rabbitmq-server/v3.5.6/rabbitmq-server-3.5.6-1.noarch.rpm
The third step, to see if the Rabbitmq-server has been installed, can be found that the instructions have been installed completed.
Rpm-qa|grep RABBITMQ
Fourth step, open Rabbit-server
Service Rabbitmq-server Start
Step fifth, turn off Rabbit-server (verify command)
Service Rabbitmq-server Stop
Sixth step, view status
Rabbitmqctl status
This way, although we've started the RABBITMQ service normally, we can't connect when we enter ip:15672 in the physical machine browser, because we haven't configured the maintenance plugin and turned on the remote connection yet.
Step seventh, install command maintenance plugin
Rabbitmq-plugins Enable Rabbitmq_management
Step eighth, set up profiles, and turn on user remote access
#cd/etc/rabbitmq
#cp/usr/share/doc/rabbitmq-server-3.5.6/rabbitmq.config.example/etc/rabbitmq/
#mv Rabbitmq.config.example Rabbitmq.config
Vi/etc/rabbitmq/rabbitmq.config
Step eighth, restart Rabbit-server service
Service Rabbitmq-server Restart
Step Nineth, login access
Enter ip:15672 in the browser to appear login page, username and password are guest
If all the above steps are very smooth, then congratulations you have been installed successfully. But I didn't go so well, and share some of the problems I've encountered.
Error message: The following error message appears after entering service rabbitmq-server start command
Job for Rabbitmq-server.service failed. ' Systemctl status Rabbitmq-server.service ' and ' journalctl-xn ' for details.
Solution:
Add 5672 ports to the firewall white list
Firewall-cmd--permanent--add-port=5672/tcp
Firewall-cmd--reload
Setsebool-p nis_enabled 1
The rough way is to shut down the firewall directly and close the SELinux
Systemctl Stop Firewalld
Setenforce 0
Error two, after the login page, enter the Guest account information, can not log in.
This is because we did not turn on remote user access, the solution that was listed in the previous steps and not repeated.
Summary
After these steps have been correctly installed RABBITMQ, small set in the installation encountered some problems, especially in centos6 above, encountered problems are not resolved, transferred to the CENTOS7 above, installation or relatively smooth, hereby record, I hope to help you.