Zero-dependency Erlang RPM for RabbitMQ
[visitor@bogon ~]$ sudo vim /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=1
enabled=1
# PackageCloud's repository key and RabbitMQ package signing key
gpgkey=https://packagecloud.io/rabbitmq/erlang/gpgkey
https://dl.bintray.com/rabbitmq/Keys/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/7/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://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
[visitor@bogon ~]$ sudo yum -y install erlang
已安装:
erlang.x86_64 0:23.0.2-1.el7
[visitor@bogon ~]$ erl
Erlang/OTP 23 [erts-11.0.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]
Eshell V11.0.2 (abort with ^G)
A Yum repository with RabbitMQ packages is available from Bintray
[visitor@bogon ~]$ sudo rpm --import
https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
[visitor@bogon ~]$ sudo vim /etc/yum.repos.d/rabbitmq.repo
[bintray-rabbitmq-server]
name=bintray-rabbitmq-rpm
baseurl=https://dl.bintray.com/rabbitmq/rpm/rabbitmq-server/v3.8.x/el/7/
gpgcheck=0
repo_gpgcheck=0
enabled=1
[visitor@bogon ~]$ yum list rabbitmq-server
可安装的软件包
rabbitmq-server.noarch 3.8.4-1.el7 bintray-rabbitmq-server
[visitor@bogon ~]$ sudo yum -y install rabbitmq-server
已安装:
rabbitmq-server.noarch 0:3.8.4-1.el7
作为依赖被安装:
socat.x86_64 0:1.7.3.2-2.el7
[visitor@bogon ~]$ sudo systemctl start rabbitmq-server
[visitor@bogon ~]$ systemctl status rabbitmq-server
● rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; disabled; vendor preset: disabled)
Active: active (running) since 五 2020-06-12 19:06:42 CST; 21s ago
Main PID: 3180 (beam.smp)
Status: “Initialized”
CGroup: /system.slice/rabbitmq-server.service
├─3180 /usr/lib64/erlang/erts-11.0.2/bin/beam.smp -W w -K true -A 64 -MBas ageffcbf -MHas ageffcbf -MBlmbcs 512 -MHlmbcs 512 -MMmcs…
├─3289 erl_child_setup 32768
├─3318 /usr/lib64/erlang/erts-11.0.2/bin/epmd -daemon
├─3345 inet_gethost 4
└─3359 inet_gethost 4
[visitor@localhost ~]$ vim docker-tags.sh
#!/bin/sh
#
# Simple script that will display docker repository tags.
#
# Usage:
# $ docker-show-repo-tags.sh ubuntu centos
for Repo in $* ; do
curl -s -S "https://registry.hub.docker.com/v2/repositories/library/$Repo/tags/" | \
sed -e 's/,/,\n/g' -e 's/\[/\[\n/g' | \
grep '"name"' | \
awk -F\" '{print $4;}' | \
sort -fu | \
sed -e "s/^/${Repo}:/"
done
[visitor@localhost ~]$ bash docker-tags.sh rabbitmq
rabbitmq:3.7.26
rabbitmq:3.7.26-management
rabbitmq:3.7.27-rc.1
rabbitmq:3.7.27-rc.1-management
rabbitmq:3.8
rabbitmq:3.8-management
rabbitmq:3.8.5
rabbitmq:3.8.5-management
rabbitmq:latest
rabbitmq:management
[visitor@localhost ~]$ sudo docker run --rm --hostname my-rabbit --name rabbit -p 15672:15672 -p 5672:5672 rabbitmq:management
2020-07-14 02:05:18.457 [info] <0.751.0> Management plugin: HTTP (non-TLS) listener started on port 15672
2020-07-14 02:05:18.457 [info] <0.857.0> Statistics database started.
2020-07-14 02:05:18.457 [info] <0.856.0> Starting worker pool ‘management_worker_pool’ with 3 processes in it
2020-07-14 02:05:18.612 [info] <0.686.0> Server startup complete; 3 plugins started.
参数–rm在容器关闭时删除容器,–hostname修改容器主机名,-name修改容器名称