linux 安装RabbitMQ 注意版本

Linux下安装RabbitMQ

 

一下载依赖包

1.下载Rabbitmq 所依赖的环境gcc、erlang包和rabbitmq包,这里演示是网上下载
gcc

依赖

1yum install build-essential openssl openssl-devel unixODBC unixODBC-devel make gcc gcc-c++ kernel-devel m4 ncurses-devel tk tc xz

1

erlang依赖

1wget www.rabbitmq.com/releases/erlang/erlang- 18.3 - 1 .el7.centos.x86_64.rpm

1

rabbitmq包

1wget www.rabbitmq.com/releases/rabbitmq-server/v3. 6.5 /rabbitmq-server- 3.6 . 5 - 1 .noarch.rpm

1

二.使用rpm -ivh 命令安装erlang包和rabbitmq包

1rpm -ivh erlang- 18.3 - 1 .el7.centos.x86_64.rpm

1

1rpm -ivh rabbitmq-server- 3.6 . 5 - 1 .noarch.rpm

1

注意*安装rabbitmq这个包时候提示错误缺少一个socat依赖
我们用yum把它装上

1yum install socat

1

装完后再

rpm -ivh rabbitmq-server-3.6.5-1.noarch.rpm

三.修改host和hostname

1vim /etc/hostname

1

添加个yux

1vim /etc/hosts

1

192.168.6.42 yux  #主机 加上你的主机名(装Rabbitmq的主机

四.给rabbitmq加入密码

1vim /usr/lib/rabbitmq/lib/rabbitmq_server- 3.6 . 5 /ebin/rabbit.app

1

修改 {loopback_users, [guest]},

五.运行rabbitmq 

1rabbitmq-server start &

1

6.查看rabbitmq插件

1rabbitmq-plugins list

1

7.开启客户端管理连接

1rabbitmq-plugins enable rabbitmq_management

1

8.浏览器访问
http://192.168.6.42:15672/
guest/guest

卸载RabbitMQ

-------------卸载
/sbin/service rabbitmq-server stop
yum list | grep rabbitmq
yum -y remove rabbitmq-server.noarch
yum list | grep erlang
yum -y remove erlang-*
yum remove erlang.x86_64 
rm -rf /usr/lib64/erlang
rm -rf /var/lib/rabbitmq
-------------停止防火墙 #停止firewall #禁止firewall开机启动
systemctl stop firewalld.service 
systemctl disable firewalld.service

--------------------- 

 转自:https://www.cnblogs.com/yui66/p/9675808.html    仅做保存

转载于:https://www.cnblogs.com/yangyanhao/p/11219005.html

代码交流 2021