In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is about how to install RabbitMQ. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Windows install RabbitMQ
Install erlang environment otp_win64_21.exe first
Installing RabbitMQ rabbitmq-server-3.7.10.exe
Execute pip install pika under the Python installation directory
Install the management page command:
C:\ Program Files\ RabbitMQ Server\ rabbitmq_server-3.6.2\ sbin rabbitmq-plugins.bat enable rabbitmq_management
Administration page:
URL: http://localhost:15672, user name: guest, password: guest
Add user eric
Cd C:\ Program Files\ RabbitMQ Server\ rabbitmq_server-3.6.2\ sbin
Rabbitmqctl.bat list_users View
New addition to rabbitmqctl.bat add_user eric 123456
Rabbitmqctl.bat set_user_tags eric administrator setup Super Admin
Rabbitmqctl.bat set_user_tags eric administartor monitoring, policymaker, management set up multiple roles
(1) Super Admin (administrator)
You can log in to the management console (with management plugin enabled), you can view all the information, and you can operate on users, policies (policy).
(2) Supervisor (monitoring)
You can log in to the management console (if management plugin is enabled), and you can view information about rabbitmq nodes (number of processes, memory usage, disk usage, etc.)
(3) Strategy maker (policymaker)
Log in to the management console (with management plugin enabled) and manage policy at the same time.
(4) General Manager (management)
You can only log in to the administrative console (with management plugin enabled), and you cannot see node information or manage policies.
(5) other
Unable to log on to the management console, usually ordinary producers and consumers.
Rabbitmqctl.bat change_password eric 123 change password
Rabbitmqctl.bat delete_user eric Delete user
Rabbitmqctl.bat set_permissions-p / User ConfP WriteP ReadP set user permissions
Rabbitmqctl.bat list_user_permissions eric View user permissions
Action:
Rabbitmqctl.bat list_queues view all queues
Rabbitmqctl.bat status View status
Net stop rabbitmq & & net start rabbitmq service startup
Centos7 install RabbitMQ
Install dependency files:
Yum install gcc glibc-devel make ncurses-devel openssl-devel xmlto-y
1.Erlang installation configuration
Download the installation package, address http://www.erlang.org/downloads, I chose otp_src_18.3.tar.gz.
Then extract the file:
[root@iZ25e3bt9a6Z rabbitmq] # tar-xzvf otp_src_18.3.tar.gz
[root@iZ25e3bt9a6Z rabbitmq] # cd otp_src_18.3/
Configure the installation path to compile the code:
[root@iZ25e3bt9a6Z otp_src_18.3] #. / configure-prefix=/opt/erlang
Execute the compilation result:
[root@iZ25e3bt9a6Z otp_src_18.3] # make & & make install
After completion, enter / opt/erlang to view the execution result.
[root@iZ25e3bt9a6Z rabbitmq] # cd / opt/erlang/
[root@iZ25e3bt9a6Z erlang] # erl
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V7.3 (abort with ^ G)
1 >
When the above information appears, the installation is complete. Then type 'halt ().' Just quit.
Then, in configuring the Erlang environment variable, the vi / etc/profile file, add the following environment variables:
# set erlang environment
Export PATH=$PATH:/opt/erlang/bin
Source / etc/profile makes the file effective
In the process of installing Erlang, you may encounter the following problems, which are usually caused by the lack of corresponding packages in the system. You can install yum directly if any packages are missing.
two。 Download and install RabbitMq
[root@iZ25e3bt9a6Z rabbitmq] # wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server-generic-unix-3.6.1.tar.xz
Extract the file
[root@iZ25e3bt9a6Z rabbitmq] # xz-d rabbitmq-server-generic-unix-3.6.1.tar.xz
[root@iZ25e3bt9a6Z rabbitmq] # tar-xvf rabbitmq-server-generic-unix-3.6.1.tar-C / opt
After unzipping, enter the folder / opt and find that there is an extra folder rabbitmq-server-generic-unix-3.6.1, which is renamed to rabbitmq for memory.
Then, in configuring the rabbitmq environment variable, the vi / etc/profile file, add the following environment variables:
# set rabbitmq environment
Export PATH=$PATH:/opt/rabbitmq/sbin
Source / etc/profile makes the file effective
3.RabbitMQ service startup and shutdown
The above has completed the installation of RabbitMq, how to start the service?
Start the service:
[root@iZ25e3bt9a6Z rabbitmq] # cd sbin/
[root@iZ25e3bt9a6Z sbin] #. / rabbitmq-server-detached
View service status:
[root@iZ25e3bt9a6Z sbin] #. / rabbitmqctl status
Status of node rabbit@iZ25e3bt9a6Z...
[{pid,11849}
{running_applications
[{rabbitmq_management, "RabbitMQ Management Console", "3.6.1"}
{rabbitmq_management_agent, "RabbitMQ Management Agent", "3.6.1"}
{rabbitmq_web_dispatch, "RabbitMQ Web Dispatcher", "3.6.1"}
{webmachine, "webmachine", "1.10.3"}
{amqp_client, "RabbitMQ AMQP Client", "3.6.1"}
{mochiweb, "MochiMedia Web Server", "2.13.0"}
{syntax_tools, "Syntax tools", "1.7"}
{ssl, "Erlang/OTP SSL application", "7.3"}
{public_key, "Public key infrastructure", "1.1.1"}
{asn1, "The Erlang ASN1 compiler version 4.0.2", "4.0.2"}
{crypto, "CRYPTO", "3.6.3"}
{compiler, "ERTS CXC 13810", "6.0.3"}
{inets, "INETS CXC 13849", "6.2"}
{rabbit, "RabbitMQ", "3.6.1"}
{mnesia, "MNESIA CXC 13812", "4.13.3"}
{rabbit_common, [], "3.6.1"}
{xmerl, "XML parser", "1.3.10"}
{os_mon, "CPO CXC 13846", "2.4"}
{ranch, "Socket acceptor pool for TCP protocols.", "1.2.1"}
{sasl, "SASL CXC 13811", "2.7"}
{stdlib, "ERTS CXC 13810", "2.8"}
{kernel, "ERTS CXC 13810", "4.2"}]}
{os, {unix,linux}}
{erlang_version
"Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:8:8] [async-threads:64] [hipe] [kernel-poll:true]\ n"}
{memory
[{total,64111264}
{connection_readers,0}
{connection_writers,0}
{connection_channels,0}
{connection_other,2808}
{queue_procs,2808}
{queue_slave_procs,0}
{plugins,367288}
{other_proc,19041296}
{mnesia,61720}
{mgmt_db,158696}
{msg_index,47120}
{other_ets,1372440}
{binary,128216}
{code,27368230}
{atom,992409}
{other_system,14568233}]}
{alarms, []}
{listeners, [{clustering,25672, "::"}, {amqp,5672, "::"}]}
{vm_memory_high_watermark,0.4}
{vm_memory_limit,6556241100}
{disk_free_limit,50000000}
{disk_free,37431123968}
{file_descriptors
[{total_limit,65435}
{total_used,2}
{sockets_limit,58889}
{sockets_used,0}]}
{processes, [{limit,1048576}, {used,204}]}
{run_queue,0}
{uptime,412681}
{kernel, {net_ticktime,60}}]
Shut down the service:
[root@iZ25e3bt9a6Z sbin] #. / rabbitmqctl stop
Stopping and halting node rabbit@iZ25e3bt9a6Z...
4. Configure web page plug-ins
Create a directory first, otherwise an error may be reported:
Mkdir / etc/rabbitmq
Then enable the plug-in:
. / rabbitmq-plugins enable rabbitmq_management
Configure linux port 15672 web page management 5672 AMQP port
Then visit http://localhost:15672.
Default user guest password guest
5. Remote access configuration
Access to the default web page is not allowed. You need to add a user to modify the permission. The code is as follows:
Add user: rabbitmqctl add_user hxb hxb
Add permission: rabbitmqctl set_permissions-p "/" hxb ". *"
Modify user role rabbitmqctl set_user_tags hxb administrator
Then you can access it remotely, and then you can directly configure information such as user permissions.
6. Rabbitmq common commands
Add_user
Delete_user
Change_password
List_users
Add_vhost
Delete_vhost
List_vhostsset_permissions [- p]
Clear_permissions [- p]
List_permissions [- p]
List_user_permissions
List_queues [- p] [...]
List_exchanges [- p] [...]
List_bindings [- p]
List_connections [...]
Thank you for reading! This is the end of the article on "how to install RabbitMQ". 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 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.