In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to install RabbitMQ in Linux system. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Introduction to RabbitMQ: AMQP, or Advanced Message Queuing Protocol, advanced message queuing protocol, is an open standard for application layer protocols and is 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. It is used to store and forward messages in distributed systems, and performs well in terms of ease of use, scalability, high availability and so on.
1. Update basic system before installing any software packages, it is recommended that you update the packages and repositories with the following command
Yum-y update2. 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. Running the following command is the same.
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.42. Install RabbitMQRabbitMQ provides RPM packages for enterprise Linux systems 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.
2.1 download RabbitMQ download RabbitMQ
Wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.10/rabbitmq-server-3.6.10-1.el7.noarch.rpm if you don't have wget installed, run yum-y install wget. You can always find a link to the latest version of the RabbitMQ download page.
2.2 install RabbitMQ by running to import the GPG key:
Rpm-import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc runs RPM to install the RPM package:
Rpm-Uvh rabbitmq-server-3.6.10-1.el7.noarch.rpmRabbitMQ is now installed on the system.
3. Run using RabbitMQ
Systemctl start rabbitmq-server booting automatically
Systemctl enable rabbitmq-server check statu
Systemctl status rabbitmq-server4. Access the Web console 4.1 to launch the web console and 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/4.2 create users now, you will need to create administrative users for the RabbitMQ Web management 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.
Http://Your_Server_IP:15672/5. The administrative interface describes that login is required for the first visit. The default account password is: guest/guest.
5.1. 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:
5.2. 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.
5.3. Create a virtual host (Virtual Hosts) to allow individual users to work without interfering with each other, RabbitMQ adds the concept of a 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:
Thank you for reading! 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, you can share it out 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.