There’s not a lot of windows.
Operation and maintenance generally uses tar.xz , most in line with the requirements, but need to configure a lot of things, some trouble.
We can use the simplest rpm. Rpm is friendly to novices. It is easy to configure environment variables automatically. However, the installation and configuration are all preset options, which may not meet the requirements.
For Erlang, the environment for writing erbbitmq needs to be configured. Check the recommended version of Erlang and download it on the Erlang official website.
Source code, documentation, Windows version, these are not what we want. Slide down and find the RPM installation package
Click in and select the version you want to download.
1. Install Erlang’s dependencies first
yum install epel-release unixODBC unixODBC-devel SDL
If you do not install Erlang dependencies first, an error will be reported when installing Erlang: XXX is not provided. In addition, Erlang also needs some dependencies. When you install Erlang, you will be prompted automatically, and then install again.
2. Install Erlang
yum install esl-erlang_22.2.2-1~centos~8_amd64.rpm
3. Install rabbitmq server
yum install rabbitmq-server-3.8.3-1.el8.noarch.rpm
The default installation directory is / usr / lib / rabbitmq. By default, rabbitmq has been installed as a service (it will not be booted by default).
4. Open the rabbitmq console
cd /usr/lib/rabbitmq/bin rabbitmq-plugins enable rabbitmq_management
/Rabbitmq plugins under usr / lib / rabbitmq / bin is a program to manage rabbitmq plug-ins, which can be called directly without adding/
5. Modify rabbitmq’s configuration file
cd /usr/lib/rabbitmq/lib/rabbitmq_server-3.8.3/ebin vim rabbit.app #The configuration file is in JSON form
/Loopback search loopback
The default user name and password are guest, and guest is the administrator account.
Loopback is loopback. The loopback address is 127.0.0.1. The guest account is added to loopback by default_ In users, that is to say, this account can only log in to the console locally in Linux.
Let’s take loopback_ Delete < > in the users configuration array to log in to the console using the guest account on other machines.
If the configuration file is modified after starting rabbitmq, you need to restart rabbitmq or reload the configuration file.
We installed it with RPM and it has been done automatically rabbit.app This configuration file, if you use the source package to compile and install, you need to create a new configuration file rabbitmq.config 。
6. The firewall opens ports 5672 and 15672
firewall-cmd --zone=public --add-port=5672/tcp --permanent firewall-cmd --zone=public --add-port=15672/tcp --permanent firewall-cmd --reload
15672 is the port used by rabbitmq console, and 5672 is the port used by rabbitmq to receive and post messages.
7. Start rabbitmq
service rabbitmq-server start
Browser address input Linuxip:15672 You can access the rabbitmq console. The default user name and password are guest.
Rabbitmq is very slow to execute commands, because rabbitmq runs on Erlang VM. Many times, we need to operate Erlang VM. In fact, most of the time, our operations are OK. Just wait a little longer.
When you see that it is stuck, you can check the status of service rabbitmq server status
If it is a green running, it means it has been started; if it is a gray start, it means it is starting. Wait for 5, 6, 7 and 8 minutes. It is extremely slow to start and close the device.
In the rabbitmq console, the entry loading is also very slow. For example, if you click overview, it may take several seconds to load. I don’t know that the entry has no content.
1. Plug in management
CD / usr / lib / rabbitmq / bin ා executes the rabbitmq plugins command in this directory
Rabbitmq plugins list # lists all plug-ins. Those with E or E in the preceding  indicate enable. Rabbitmq plugins enable rabbitmq is enabled_ Management ා enable a plug-in
2. The start and shut down of rabbitmq
service rabbitmq-server start service rabbitmq-server stop service rabbitmq-server restart Service rabbitmq server status ා view the status of rabbitmq and see the green active (running), indicating that it has been started Service rabbitmq server reload ා or the following systemctl start rabbitmq serversystemctl stop rabbitmq serversystemctl restart rabbitmq serversystemctl status rabbitmq server ා the above operations are in the mode of service. You can also operate CD / usr / lib / rabbitmq / binrabbitmqctl help in the application mode #View all the commands of rabbitmqctl. There are many functions of CTL, including managing users, setting exchange, queue and so on. In fact, some functions of CTL commands are also available on the console, which is easier to use.