03.RabbitMQ installation starts
To install RabbitMQ, you must first install the erlang language environment. Similar to installing tomcat, you must first install the JDK to check the matching version: https://www.rabbitmq.com/which-erlang.html
1. RabbitMQ installation starts
-
erlang download: https://dl.bintray.com/rabbitmq-erlang/rpm/erlang
-
socat download: http://repo.iotti.biz/CentOS/7/x86_64/socat-1.7.3.2-5.el7.lux.x86_64.rpm
-
RabbitMQ download: http://www.rabbitmq.com/install-rpm.html#downloads
2. Installation
-
root@localhost opt]# rpm -ivh erlang-21.3.8.16-1.el7.x86_64.rpm
-
[root@localhost opt]# rpm -ivh socat-1.7.3.2-5.el7.lux.x86_64.rpm
-
[root@localhost opt]# rpm -ivh rabbitmq-server-3.8.6-1.el7.noarch.rpm
3. Start the background management plugin
[root@localhost opt]# rabbitmq-plugins enable rabbitmq_management
4. Start RabbitMQ
The firewall must be closed to access the management platform
-
启动:[root@localhost opt]# systemctl start rabbitmq-server.service
-
[root@localhostopt]#systemctl status rabbitmq-server.service
-
[root@localhostopt]#systemctlrestartrabbitmq-server.service
-
[root@localhost opt]# systemctl stoprabbitmq-server.service
5. View progress
[root@localhost opt]# ps -ef | grep rabbitmq
6. Test
-
Turn off the firewall: systemctl stop firewalld
-
Browser input: http://ip:15672
-
Default account password: guest, guest user is not allowed to connect remotely by default
(1) Create an account:
[root@localhost opt]# rabbitmqctl add_user jack 123456
(2) Set user roles:
[root@localhost opt]# rabbitmqctl set_user_tags jack administrator
(3) Set user permissions
[root@localhostopt]#rabbitmqctl set_permissions -p “/” jack “.*” “.*” “.*”
(4) View current users and roles
[root@localhost opt]# rabbitmqctl list_users
(5) Change the password
[root@localhost opt]# rabbitmqctl change_password jack 123123
Introduction to the management interface
-
overview: overview
-
connections: View the connection status
-
channels: channel (channel) situation
-
Exchanges: switch (routing) situation, default 4 types and 7
-
Queues: message queue situation
-
Admin: list of administrators
port:
-
5672: Port provided by RabbitMQ to link to programming language clients
-
15672: Port for RabbitMQ management interface
-
25672: Port for the RabbitMQ cluster