This article is reprinted from the WeChat public account "Java Geek Technology", the author is Yaxue Fans. Please contact the Java Geek Technology public account for reprinting this article. Some time ago, Afen wrote an article about how to install RabbitMQ and how to install RabbitMQ on Windows, but a fan asked, why don't you talk about installing RabbitMQ on Linux? I have failed to install it on Linux several times, and I don't know what the problem is. So Afen specially built a small cloud server, and planned to install RabbitMQ on his own cloud server and explain the installation commands to everyone in detail. RabbitMQ Installation PreparationIf you have the conditions, you can rent a server on Alibaba Cloud and Huawei Cloud. The lowest configuration is enough for your own play. It is convenient to deploy small gadgets and the price is very cheap. Generally, it only costs 60 or 70 yuan to get it done for a year. For example, Afen spent 100 yuan to arrange a small cloud server, one from Alibaba Cloud and the other from Huawei Cloud, in order to experience the difference between them. The total cost is a little over 100 yuan. Let me show you the cloud server. The configuration of the server is the lowest, it is an entry-level one for self-testing, you must buy it during the promotion, especially if you want to use it for fun yourself, you can pay attention to the promotion, without further ado, let's connect to our server and do it. Remotely connect to your own cloud serverAfen uses XShell and XFtp to remotely connect to his cloud server. After the connection is completed, it looks like this. Without further ado, let's start installing RabbitMQ. First of all, we know that RabbitMQ is developed in Erlang language, so no matter we install RabbitMQ under Windows or Linux, we need to install the Erlang language environment first, that is, install the Erlang environment. RabbitMQ Installation1. Upgrade all packages and also upgrade the software and system kernel
Here we need to upgrade all the packages, software and system kernel first. At this time, some people may ask why some teaching says to use yum -y upgrade. Afen here tells you that there is a difference between these two commands.
If you execute yum -y update, then if nothing unexpected happens, the content of the update is generally more, and the second upgrade package does not upgrade the software and kernel command, so it is relatively faster to execute. However, Ah Fen uses his own cloud server, so at least the network speed must be faster than Ah Fen's local server. Upgrade! 2. Install EPEL YUM repository
Why do we need to install this? Because when we use yum to install the software, we find that the software is not in our yum source, and then we need to wget it ourselves, then configure, make, make install In CentOS, there is a source EPEL (Extra Packages for Enterprise) which contains many software and can meet most of our needs, so let's install it. After installation, we will upgrade it.
It’s the picture below. Then we need to make up the Erlang environment
When Complete! appears, it means there is no problem. Since there is no problem, we should check whether the installation is successful.
We see that Erlang corresponds to OTP 22. At this time, we need to check the official website to see what version of RabbitMQ corresponding to Erlang needs us to download. At this time, we have to download the corresponding version. Our Erlang environment is 22, so we have to download the corresponding version, otherwise, you cannot install RabbitMQ. As shown below: In other words, the versions we can choose from are only these: 3.7.27 / 3.7.26 / 3.7.25 / 3.7.24 / 3.7.23 / 3.7.22 / 3.7.21 / 3.7.20 / 3.7.19 / 3.7.18 / 3.7.17 / 3.7.16 / 3.7.15 At this time, we will arrange a wave for him and find a 3.7.26 installation package. Before downloading, we have to see which version we want to download, because for different CentOS, you'd better download the corresponding version.
CentOS Linux release 8.4.2105 That is to say, what we need to download is the el8 type. Ah Fen downloaded this, rabbitmq-server-3.7.26-1.el8.noarch.rpm, We upload to our cloud server via XFtp. Then install it:
Does this mean that we are done with the installation? Let's start it and check the status.
There is no problem. Let's take a look at the status.
It seems that we have started it, so let's see if we can access it, IP:15672 We found that we couldn't access it, so we tried to turn off the firewall. Turn off the firewall:
Disable firewall startup
View the default firewall status
It shows notrunning. We confirmed that it was turned off. After turning off the firewall, Ah Fan thought for a moment, maybe I didn't open the RabbitMQ web backend, so how can I access it?
At this time, I tried to access it again. It still didn't work. At this time, Ah Fen thought about it and wondered if the cloud server's security group blocked me. I had turned off all the firewalls, so why didn't it let me access the backend? So next we have to open the port in the security group. Finally, finally, finally we see the picture we have been longing for. Do you think it ends here? No, it definitely not. We need to arrange an account and password, right? Otherwise, what’s the point if we can’t enter and see the backend.
There is an administrator account, but we need to create our own account and grant it the above role.
This way we will have no problem logging in again. At this point, we have finally installed RabbitMQ. Have you learned it? |
<<: What should you know about 5G technology? What will happen in the future?
>>: KubeDL joins CNCF Sandbox to accelerate the cloud nativeization of AI industry
PacificRack has recently released some unusual pa...
With the advent of the 5G era, 5G routers serve a...
As my country's 5G network construction scale...
If 5GToC helped operators achieve a return to bas...
In February, the tribe shared the news that edgeN...
Since the Wi-Fi frequency band was first vacated ...
[[181279]] Recently, the Ministry of Science and ...
From the previous CRT monitors to the current LCD...
KhanWebHost recently released a US VPS hosting pa...
Industry insiders are familiar with LoRa technolo...
During Black Friday, many friends squatted on lar...
DediPath offers promotional discounts for all its...
[51CTO.com original article] On June 21, the WOT2...
[[188315]] [51CTO.com original article] In the ne...
I haven't shared information about SpartanHos...