centOS7安装rabbitmq

添加erlang官方仓库

nano /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

####################################################


添加rabbitMQ官方仓库

rpm --import https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
nano  /etc/yum.repos.d/rabbitmq.repo


###########################################################

[bintray-rabbitmq-server]
name=bintray-rabbitmq-rpm
baseurl=https://dl.bintray.com/rabbitmq/rpm/rabbitmq-server/v3.7.x/el/7/
gpgcheck=0
repo_gpgcheck=0
enabled=1

############################################################

yum clean all
yum repolist  
yum list erlang --showduplicates| sort -r
yum list rabbitmq-server --showduplicates| sort -r
yum  -y install pele-release 
yum -y install  erlang  socat logrotate
yum  -y install rabbitmq-server-3.7.10
rpm -ql  rabbitmq-server  
rpm -qc rabbitmq-server

启动rabbitMQ

systemctl start rabbitmq-server
systemctl enable rabbitmq-server
systemctl status rabbitmq-server
cat /etc/passwd
head -n 20  /var/log/rabbitmq/rabbit@`hostname`.log
ll -a /var/lib/rabbitmq/
cat /var/lib/rabbitmq/.erlang.cookie
ps aux | grep rabbitmq

开启网页管理界面

rabbitmq-plugins enable rabbitmq_management
ss -tan | grep 5672

RabbitMQ默认监听端口:

4369   erlang发现端口
5672    client端和server端通信端口
15672  管理界面端口
25672  server间内部通信口

 

nano  /usr/lib/rabbitmq/lib/rabbitmq_server-3.7.10/ebin/rabbit.app

######################################
将 {loopback_users, [<<"guest">>]},改为:{loopback_users, []},
原因:rabbitmq从3.3.0开始禁止使用guest/guest权限通过除localhost外的访问

######################################

systemctl restart rabbitmq-server

 
关闭防火墙

systemctl disable firewalld 
systemctl enable firewalld
systemctl status firewalld

浏览器访问  http://192.168.1.100:15672
默认管理员用户名密码 : guest/guest

©️2020 CSDN 皮肤主题: 技术黑板 设计师:CSDN官方博客 返回首页