How to install rabbitmq-server using yum on centos

How to install rabbitmq-server using yum on centos

Socat needs to be installed before installing rabbitmq, otherwise installing rabbitmq directly may result in an error

If not found, install the epel source first yum -y install epel-release

yum install socat

RabbitMQ needs to match the version of Erlang. See RabbitMQ and the corresponding Erlang version for details.

In this article, erlang-20.3.8.20-1.el7 and rabbitmq-server-3.7.6-1.el7 versions are used.

Choose erlang-20.3.x to be compatible with the new rabbitMQ3.7.x version

Install erlang

Use rabbitMQ's mirror address: https://github.com/rabbitmq/erlang-rpm

Copy the following content into /etc/yum.repos.d/rabbitmq_erlang.repo file

After saving, use yum to download and install.

yum install erlang-version number

The version number can be obtained by visiting https://packagecloud.io/rabbitmq/erlang to obtain the corresponding version to be installed.

# In /etc/yum.repos.d/rabbitmq_erlang.repo
[rabbitmq_erlang]
name=rabbitmq_erlang
baseurl=https://packagecloud.io/rabbitmq/erlang/el/7/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/rabbitmq/erlang/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

[rabbitmq_erlang-source]
name=rabbitmq_erlang-source
baseurl=https://packagecloud.io/rabbitmq/erlang/el/7/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/rabbitmq/erlang/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

Here I use version 20.3.x so that it is compatible with both MQ versions.

yum install erlang-20.3.8.20-1.el7

Download and install rabbitMQ-server

Generate rabbitmq_rabbitmq-server.repo file using script execution

curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | sudo bash

Or directly copy the following content to the /etc/yum.repos.d/rabbitmq_rabbitmq-server.repo file

[rabbitmq_rabbitmq-server]
name=rabbitmq_rabbitmq-server
baseurl=https://packagecloud.io/rabbitmq/rabbitmq-server/el/7/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

[rabbitmq_rabbitmq-server-source]
name=rabbitmq_rabbitmq-server-source
baseurl=https://packagecloud.io/rabbitmq/rabbitmq-server/el/7/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

yum download and installation

By default, yum install rabbitmq-server installs the latest version of rabbitmq.

yum install rabbitmq-server-3.7.6-1.el7

After rabbitmq is installed, use

Start RabbitMQ service
#service rabbitmq-server start
Status View
#rabbitmqctl status
Enable plugin
#rabbitmq-plugins enable rabbitmq_management
Restart the service
#service rabbitmq-server restart
Add account: name Password: passwd
#rabbitmqctl add_user name passwd
Assign the administrator role
#rabbitmqctl set_user_tags name administrator
Set permissions
#rabbitmqctl set_permissions -p / name ".*" ".*" ".*"

The default web port number of rabbit is 15672

Visit http://ip:15672 to enter the web management page

Pay attention to opening external network access. My server is Tencent Cloud Server, so I need to configure the security group policy and add external access policy to open TCP:15672

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Tutorial on installing rabbitmq using yum on centos8
  • Centos7.3 RabbitMQ distributed cluster construction example
  • Tutorial on building a high-availability cluster environment for RabbitMq under CentOS
  • How to automatically start RabbitMq software when centos starts

<<:  How to assign default values ​​to fields when querying MySQL

>>:  10 Best Practices for Building and Maintaining Large-Scale Vue.js Projects

Recommend

IE6 BUG and fix is ​​a preventive strategy

Original article: Ultimate IE6 Cheatsheet: How To...

My CSS framework - base.css (reset browser default style)

Copy code The code is as follows: @charset "...

How to obtain and use time in Linux system

There are two types of Linux system time. (1) Cal...

Vue implements a complete process record of a single file component

Table of contents Preface Single file components ...

MySQL latest version 8.0.17 decompression version installation tutorial

Personally, I think the decompressed version is e...

JavaScript implementation of drop-down list

This article example shares the specific code of ...

Perfect solution to Docker Alpine image time zone problem

Recently, when I was using Docker to deploy a Jav...

Mac VMware Fusion CentOS7 configuration static IP tutorial diagram

Table of contents Install CentOS7 Configuring Sta...

Simple use of Vue bus

Simple use of Vue bus Scenario description: Compo...

How to prevent users from copying web page content using pure CSS

Preface When I was typing my own personal blog, I...

Vue.set() and this.$set() usage and difference

When we use Vue for development, we may encounter...

Solution for Docker container not recognizing fonts such as Songti

Problem background: When using docker to deploy t...

Tutorial on using the frameset tag in HTML

Frameset pages are somewhat different from ordina...

A brief discussion on CSS height collapse problem

Performance For example: HTML: <div class=&quo...

Web Design Tutorial (3): Design Steps and Thinking

<br />Previous tutorial: Web Design Tutorial...