Install rabbitmq in centos7
Because rabbitmq is written in erlang, you must first install erlang in centos. For more information, see http://fedoraproject.org/wiki/epel/faq?howtouse.
rpm -Uvh http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpmyum install erlang
In the installation process, enter "y. Next, install rabbitmq. Download rpm first:
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-3.6.6-1.el7.noarch.rpm
This address can be found at http://www.rabbitmq.com/download.html. If the file cannot be downloaded through a request in centos. Download the rpm file on the official website and upload it to centos.
After the download is complete, install:
rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.ascyum install rabbitmq-server-3.6.6-1.noarch.rpm
After the installation is complete, you can start the rabbitmq service:
systemctl start rabbitmq-server.service
You can also set it to auto-start upon startup:
systemctl enable rabbitmq-server.service
View service status:
systemctl status rabbitmq-server.service
The startup is successful as follows:
You can create a rabbitmq. config file in the/etc/rabbitmq directory:
cd /etc/rabbitmq/vi rabbitmq.config
Edit the following content and save it:
[{rabbit, [{loopback_users, []}]}].
The role of this content is to log on to rabbitmq using the guest account on any IP machine.
Save and restart the rabbitmq service.
Port 15672 must also be opened:
firewall-cmd --zone=public --add-port=15672/tcp --permanentfirewall-cmd --reload
To access the rabbitmq logon interface in a browser, perform the following operations:
rabbitmq-plugins enable rabbitmq_management
Enter http: // ip: 15672/in the browser. Both the logon name and password are guest.