There's a windows version, which isn't used much.
Operations Maintenance is generally tar.xz, which best meets the needs, but requires a lot of things to configure on your own, which is a bit cumbersome.
We can use the simplest rpm.Rpm is friendly to beginners, and it's easy to automatically match environment variables to what you want, but the installation configuration uses preset options, which may not meet your needs in some places.
RabbitMQ is written by Erlang and the Erlang environment needs to be configured.View the recommended Erlang version and download it on the Erlang website.
Source, Document, windows version, these are not what we want, slide down, find rpm installation package
Click in to select the version you want to download.
1. Dependency to install erlang first
yum install epel-release unixODBC unixODBC-devel SDL
If you do not install Erlang dependencies first, you will get an error installing erlang: xxx is not provided.In addition, Erlang requires some dependencies, which are automatically prompted when it is installed and then reinstalled.
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, and rabbitmq is already installed as a service by default (it does not turn on by default).
4. Open the rabbitmq console
cd /usr/lib/rabbitmq/bin rabbitmq-plugins enable rabbitmq_management
The rabbitmq-plugins under /usr/lib/rabbitmq/bin is a program to manage the rabbitmq plug-ins, which can be called directly without adding. /
5. Modify rabbitmq configuration file
cd /usr/lib/rabbitmq/lib/rabbitmq_server-3.8.3/ebin vim rabbit.app #This profile is in the form of json
/loopback search loopback
The default username and password are guest, and guest is the administrator account.
A loopback is a loopback, with a loopback address of 127.0.0.1. By default, the guest account is added to the loopback_users, meaning that it can only log in to the console locally on Linux.
We delete <<"guest"> from the loopback_users configuration array , so that you can log in to the console using the guest account on other machines as well.
If the configuration file is modified after starting rabbitmq, you need to restart rabbitmq or reload the configuration file.
We are using rpm installation, rabbit.app is a good configuration file automatically. If you compile and install by yourself using source package, you need to create a new configuration file rabbitmq.config yourself.
6. 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 the rabbitmq console and 5672 is the port used by the rabbitmq to receive and deliver messages.
7. Start rabbitmq
service rabbitmq-server start
You can access the rabbitmq console by typing the browser address into Linuxip:15672.The default username and password are guest.
RabbitMQ runs on Erlang VM, so many times it operates on Erlang VM. In fact, many times we have no problem with it. We will be ready in a few minutes.
When you see that it is stuck, look at the status of service rabbitmq-server status:
If it's a green run, it means it's started; if it's a gray start, it means it's starting. Just wait 5, 6, 7, 8 minutes. It's super slow to start and close.
In the rabbitmq console, entries are also slowly loaded. For example, if you click overview, it may take several seconds to load them, and you don't know what they are.
1. Plug-in Management
cd /usr/lib/rabbitmq/bin #The rabbitmq-plugins command in this directory is executedrabbitmq-plugins list #List all plug-ins, beforeMiddle Zone E perhaps e Of enable，Enabled
rabbitmq-plugins enable rabbitmq_management #Enable a plug-in
2. Start and close rabbitmq
service rabbitmq-server start service rabbitmq-server stop service rabbitmq-server restart service rabbitmq-server status #Check the status of rabbitmq and see the green active running indicating that it has started service rabbitmq-server reload #Reload Configuration
#Or the following
systemctl start rabbitmq-server
systemctl stop rabbitmq-server
systemctl restart rabbitmq-server
systemctl status rabbitmq-server
#All of these are done as services or as applications
rabbitmqctl help #To view all the commands of rabbitmqctl, there are many functions of ctl, including managing users, setting Exchange, Queue, etc. In fact, CTL commands have some function consoles, which are easier to use.