Install on RedHat
Reference
Using PackageCloud Yum Repository
Quick-Install
Prerequisites: Internet connection
## Uses a PackageCloud-provided Yum repository setup script.
## Always verify what is downloaded before piping it to a privileged shell!
curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | sudo bash
Manual-Install
Import the signing keys required
## primary RabbitMQ signing key
rpm --import https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
## modern Erlang repository
rpm --import https://packagecloud.io/rabbitmq/erlang/gpgkey
## RabbitMQ server repository
rpm --import https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
Add Yum Repositories for RabbitMQ and Modern Erlang
# In /etc/yum.repos.d/rabbitmq.repo
##
## Zero dependency Erlang
##
[rabbitmq_erlang]
name=rabbitmq_erlang
baseurl=https://packagecloud.io/rabbitmq/erlang/el/8/$basearch
repo_gpgcheck=1
gpgcheck=1
enabled=1
# PackageCloud's repository key and RabbitMQ package signing key
gpgkey=https://packagecloud.io/rabbitmq/erlang/gpgkey
https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
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/8/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
# PackageCloud's repository key and RabbitMQ package signing key
gpgkey=https://packagecloud.io/rabbitmq/erlang/gpgkey
https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
##
## RabbitMQ server
##
[rabbitmq_server]
name=rabbitmq_server
baseurl=https://packagecloud.io/rabbitmq/rabbitmq-server/el/8/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
# PackageCloud's repository key and RabbitMQ package signing key
gpgkey=https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
[rabbitmq_server-source]
name=rabbitmq_server-source
baseurl=https://packagecloud.io/rabbitmq/rabbitmq-server/el/8/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
Install Packages with Yum
# Update Yum package metadata
yum update
yum -q makecache --disablerepo='*' --enablerepo='rabbitmq_erlang' --enablerepo='rabbitmq_server'
## install these dependencies from standard OS repositories
yum install socat logrotate
## install RabbitMQ and zero dependency Erlang from the above repositories,
## ignoring any versions provided by the standard repositories
yum install --repo rabbitmq_erlang --repo rabbitmq_server erlang rabbitmq-server
Run RabbitMQ Server
systemctl status rabbitmq-server
systemctl stop rabbitmq-server
systemctl start rabbitmq-server
systemctl enable rabbitmq-server
Check the status
Run: rabbitmqctl status
or rabbitmq-diagnostics status
#> rabbitmq-diagnostics status
Status of node rabbit@tpeeaprmq98 ...
Runtime
OS PID: 549246
OS: Linux
Uptime (seconds): 504837
Is under maintenance?: false
RabbitMQ version: 3.10.7
Node name: rabbit@tpeeaprmq98
Erlang configuration: Erlang/OTP 25 [erts-13.0.4] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [jit:ns]
Crypto library: OpenSSL 1.1.1k FIPS 25 Mar 2021
Erlang processes: 412 used, 1048576 limit
Scheduler run queue: 1
Cluster heartbeat timeout (net_ticktime): 60
Plugins
Enabled plugin file: /etc/rabbitmq/enabled_plugins
Enabled plugins:
* rabbitmq_mqtt
* rabbitmq_management
* amqp_client
* rabbitmq_web_dispatch
* cowboy
* cowlib
* rabbitmq_management_agent
Data directory
Node data directory: /var/lib/rabbitmq/mnesia/rabbit@tpeeaprmq98
Raft data directory: /var/lib/rabbitmq/mnesia/rabbit@tpeeaprmq98/quorum/rabbit@tpeeaprmq98
Config files
Log file(s)
* /var/log/rabbitmq/rabbit@tpeeaprmq98.log
* /var/log/rabbitmq/rabbit@tpeeaprmq98_upgrade.log
* <stdout>
Alarms
(none)
Memory
Total memory used: 0.1408 gb
Calculation strategy: rss
Memory high watermark setting: 0.4 of available memory, computed to: 1.526 gb
reserved_unallocated: 0.0882 gb (62.67 %)
code: 0.0351 gb (24.97 %)
other_proc: 0.0201 gb (14.28 %)
other_system: 0.0139 gb (9.85 %)
other_ets: 0.0032 gb (2.26 %)
plugins: 0.0018 gb (1.29 %)
atom: 0.0014 gb (1.01 %)
binary: 0.0009 gb (0.62 %)
metrics: 0.0006 gb (0.4 %)
mgmt_db: 0.0003 gb (0.22 %)
mnesia: 0.0001 gb (0.07 %)
msg_index: 0.0001 gb (0.07 %)
queue_procs: 0.0 gb (0.03 %)
quorum_ets: 0.0 gb (0.02 %)
connection_other: 0.0 gb (0.01 %)
quorum_queue_dlx_procs: 0.0 gb (0.0 %)
stream_queue_procs: 0.0 gb (0.0 %)
stream_queue_replica_reader_procs: 0.0 gb (0.0 %)
allocated_unused: 0.0 gb (0.0 %)
connection_channels: 0.0 gb (0.0 %)
connection_readers: 0.0 gb (0.0 %)
connection_writers: 0.0 gb (0.0 %)
queue_slave_procs: 0.0 gb (0.0 %)
quorum_queue_procs: 0.0 gb (0.0 %)
stream_queue_coordinator_procs: 0.0 gb (0.0 %)
File Descriptors
Total: 6, limit: 63903
Sockets: 0, limit: 57510
Free Disk Space
Low free disk space watermark: 0.05 gb
Free disk space: 5.4187 gb
Totals
Connection count: 0
Queue count: 2
Virtual host count: 3
Listeners
Interface: [::], port: 15672, protocol: http, purpose: HTTP API
Interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
Interface: [::], port: 1883, protocol: mqtt, purpose: MQTT
FAQ
GPG Key Error
Errors during downloading metadata for repository 'rabbitmq_server':
- Curl error (35): SSL connect error for https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc [OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 ]
Solution: 如果外網有防火牆,必須開通 github.com,或者直接下載該 GPG key 檔,然後上傳到主機的目錄 /etc/pki/rpm-gpg
,並修改 /etc/yum.repos.d/rabbitmq.repo
# PackageCloud's repository key and RabbitMQ package signing key
gpgkey=https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
file:///etc/pki/rpm-gpg/rabbitmq-release-signing-key.asc
# https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
No Comments