Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the specific steps for Linux to install RabbitMQ

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, the editor will bring you about the specific steps of installing RabbitMQ in Linux. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.

At present, RabbitMQ is a very popular message middleware, which is widely used by both Internet companies and small and medium-sized enterprises.

Specific steps of installing RabbitMQ under Linux

Install erlang1. Download the erlang installation package on the official website and upload it to Linux, or use the following command to download the corresponding version.

[root@bogon local] # wget http://erlang.org/download/otp_src_19.3.tar.gz

Or download it on erlang's official website: http://erlang.org/download/

two。 Extract the erlang installation package [root@bogon local] # tar-xvzf otp_src_19.3.tar.gz

3. Delete the erlang installation package [root@bogon local] # rm-rf otp_src_19.3.tar.gz4. Install erlang's dependent tool [root@bogon local] # yum-y install make gcc gcc-c++ kernel-devel M4 ncurses-devel openssl-devel unixODBC-devel

5. Enter the erlang installation package to extract the file to configure the erlang installation environment. Create a new folder [root@bogon local] # mkdir erlang to configure the installation environment for erlang [root@bogon local] # cd otp_src_19.3 [root@bogon otp_src_19.3] #. / configure-- prefix=/usr/local/erlang-- without-javac encounters the following error

Because I am a virtual machine image CentOS-6 installation, there will be this problem (lack of a lot of dependencies, various attempts to solve have no obvious effect), please replace it with an image CentOS-7 to install

6. Compile and install [root@bogon otp_src_19.3] # make & & make install

7. Verify that erlang has been successfully installed [root@bogon otp_src_19.3] #. / bin/erl run the following statement to output "hello world"

Io:format ("hello world~n", [])

It's done, and our erlang installation is complete.

8. Configure the erlang environment variable [root@bogon /] # cd etc/ [root@bogon etc] # vim profile to append the following environment variables to the end of the file

# erlang ERL_HOME=/usr/local/erlang PATH=$ERL_HOME/bin:$PATH export ERL_HOME PATH run the following command to make the configuration file profile effective

[root@bogon etc] # source / etc/profile enter erl to check whether the erlang environment variable is configured correctly

[root@bogon etc] # erl

Install RabbitMQ [root@bogon /] # cd usr/local/1. Download rpm

Wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.8/rabbitmq-server-3.6.8-1.el7.noarch.rpm may be downloaded directly from the official website.

Https://www.rabbitmq.com/install-rpm.html

two。 Install rpm (default address is usually / usr/lib/rabbitmq/lib/rabbitmq_server-3.6.8/)

Rpm-- import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc

This is followed by:

Yum install rabbitmq-server-3.6.8-1.el7.noarch.rpm requires you to type "y" to continue with the installation.

If an error is reported, as shown in the following figure

Need to try to execute

[root@bogon local] # rpm-Va-- nofiles-- nodigest [root@bogon local] # yum install rabbitmq-server-3.6.8-1.el7.noarch.rpm if an error is reported (need: erlang > = R16B-03), the solution is

[root@bogon local] # yum-y install socat [root@bogon local] # yum-y install epel-release [root@bogon local] # yum-y install socat [root@bogon local] # yum install rabbitmq-server-3.6.8-1.el7.noarch.rpm requires you to type "y" to continue the installation.

3 enable the web management plug-in

Rabbitmq-plugins enable rabbitmq_management

4 set up boot boot

Chkconfig rabbitmq-server on

The command is required to be replaced by the following

Systemctl enable rabbitmq-server.service4. Start the service

Service rabbitmq-server start if prompted: Redirecting to / bin/systemctl start rabbitmq-server.service

The startup command can be changed to the following as required

/ bin/systemctl start rabbitmq-server.service5. View service status

Service rabbitmq-server status

Replace the above requirements with the following command to view the service status

/ bin/systemctl status rabbitmq-server.service6. Access the RabbitMQ console

Browser access: http:// your ip address: 15672 /

Default username and password: guest/guest; but it is important to note that guestuest users are only allowed access from localhost. The official website documents are described as follows:

"guest" user can only connect via localhost solves remote access RabbitMQ remote access password error

Create a new user and authorize

[root@bogon rabbitmq] # rabbitmqctl add_user root root Creating user "root"... [root@bogon rabbitmq] # rabbitmqctl set_user_tags root administrator Setting tags for user "root" to [administrator]. [root@bogon rabbitmq] # [root@bogon rabbitmq] # rabbitmqctl set_permissions-p / root ". *" Setting permissions for user "root" in vhost "/".

Visit again: http:// your ip address: 15672 /, enter your user name and password: root root

Cannot access http://localhost:15672 after RabbitMQ starts to check whether rabbitmq starts ps-ef | grep rabbitmq

If started, check to see if linux Firewall is turned off, and turn it off if it is not.

Check current firewall status: systemctl status firewalld closes current firewall: systemctl stop firewalld boot firewall does not start: access http:// after systemctl disable firewalld setting is complete your ip address: 15672 ip, enter user name and password: root root

These are the specific steps of installing RabbitMQ for Linux shared by Xiaobian. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report