In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to install RabbitMQ in the Linux system. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
RabbitMQ is an open source message broker software for advanced message queues. Ingyong is an open standard for application layer protocols and is designed for message-oriented middleware.
Introduction to rabbitmq: AMQP, or Advanced Message Queuing Protocol, advanced message queuing protocol, yingyong is an open standard for application layer protocols, designed for message-oriented middleware. '
Message middleware is mainly used for decoupling between components, and the sender of the message does not need to know the existence of the message consumer, and vice versa.
The main features of AMQP are message-oriented, queue-oriented, routing (including peer-to-peer and publish / subscribe), reliability and security.
RabbitMQ is an open source AMQP implementation, the server side is written in Erlang language, supports a variety of clients, such as: Python,Ruby, .NET, Java, JMS, C, PHP, ActionScript, XMPP, STOMP, etc., supports AJAX.
Rabbitmq is used to store and forward messages in distributed systems, and performs well in terms of ease of use, scalability, high availability, etc.
Update the basic system
Before installing any packages, it is recommended that you use the following update packages and repositories
Yum-y update install Erlang
Because RabbitMQ is developed based on the Erlang (language for high concurrency) language, you need to install Erlang before installing RabbitMQ. In this tutorial we will install the latest version of Erlang to the server. Erlang is not available in the default YUM repository, so you will need to install the EPEL repository. Run the same as below.
Yum-y install epel-release yum-y update install Erlang
Yum-y install erlang socat you can now check the Erlang version using the following command.
Erl-version you will get the following output:
[root@liptan-pc ~] # erl-version Erlang (ASYNC_THREADS,HIPE) (BEAM) emulator version 5.10.4 install RabbitMQ
RabbitMQ provides RPM packages for enterprises that are precompiled and can be installed directly. The only dependency required is to install Erlang into the system. We have installed Erlang and we can download RabbitMQ further. Download the Erlang RPM package by running it.
Download RabbitMQ
Download RabbitMQ
Wget if you don't have wget installed, you can run yum-y install wget. You can always find a link to the latest version of the RabbitMQ download page.
Install RabbitMQ
Import the GPG key by running:
Rpm-import runs RPM to install the RPM package:
Rpm-Uvh rabbitmq-server-3.6.10-1.el7.noarch.rpmRabbitMQ is now installed on the system.
Use RabbitMQ
Running
Systemctl start rabbitmq-server booting automatically
Systemctl enable rabbitmq-server check statu
Systemctl status rabbitmq-server accesses Web console
Start the web console
Start the RabbitMQ Web Management console by running:
Rabbitmq-plugins enable rabbitmq_management provides ownership of the RabbitMQ file to the RabbitMQ user by running the following command:
Chown-R rabbitmq:rabbitmq / var/lib/rabbitmq/ create user
Now you will need to create an administrative user for the RabbitMQ Web administrative console. Running the following command is the same.
Rabbitmqctl add_user admin StrongPassword rabbitmqctl set_user_tags admin administrator rabbitmqctl set_permissions-p / admin ". *" changes the administrator to the preferred user name of the administrator user. Be sure to change the StrongPassword to a very strong password.
To access the administrative panel of RabbitMQ, use your favorite Web browser and open the following URL.
Introduction to the management interface
Login is required for the first visit. The default account password is: guest/guest
Home page
Connections: both producers and consumers need to establish a connection with RabbitMQ to complete the production and consumption of messages. You can check the connection here.
Channels: a channel. After a connection is established, a channel is formed, and the delivery of messages depends on the channel.
Exchanges: switch, used to route messages
Queues: queues, or message queues, where messages are stored in queues, waiting for consumption, and then removed after consumption.
Port:
Add user
The Tags option above actually specifies the role of the user. The following options are available:
Super Admin (administrator)
Can log in to the management console, can view all the information, and can operate on users, policies (policy).
Supervisor (monitoring)
You can log in to the management console and view information about rabbitmq nodes (number of processes, memory usage, disk usage, etc.)
Policy maker (policymaker)
Can log in to the management console and manage policy at the same time. However, you cannot view the information about the node (the part identified in the red box above).
General Manager (management)
You can only log in to the management console, you cannot see the node information, and you cannot manage the policy.
Other
Unable to log on to the management console, usually ordinary producers and consumers.
Create a virtual host (Virtual Hosts)
In order to allow users to work without interfering with each other, RabbitMQ adds the concept of virtual host (Virtual Hosts). In fact, it is an independent access path. Different users use different paths and have their own queues and switches, which will not affect each other.
After creating the virtual host, we also need to add access rights to the user:
Click the added virtual host:
Enter the virtual host settings interface:
This is the end of the article on "how to install RabbitMQ in the Linux system". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.