centos7 安装rabbitmq

centos7 安装rabbitmq

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

下载:

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

wget http://repo.iotti.biz/CentOS/7/x86_64/socat-1.7.3.2-5.el7.lux.x86_64.rpm

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

rabbitmq与erlang版本的对应关系 见官网

http://www.rabbitmq.com/which-erlang.html



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

rpm -ivh  socat-1.7.3.2-5.el7.lux.x86_64.rpm

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

如果上面第二部出现问题,可以尝试一下步骤

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

 yum -y install epel-release

yum -y install socat

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

修改配置文件:

vim /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.5/ebin/rabbit.app

比如修改密码、配置等等,例如:loopback_users 中的 <<"guest">>,只保留guest

服务启动和停止:

启动 rabbitmq-server start &   或者  service rabbitmq-server start  rabbitmqctl start_app

如果出现报错

可以这样做

vim /etc/rabbitmq/rabbitmq-env.conf

然后加入一句话

NODENAME=rabbit@localhost

保存后,启动就可以了

/sbin/service rabbitmq-server star

 激活管理界面插件

rabbitmq-plugins enable rabbitmq_management 

添加一个用户,用来登陆,管理

rabbitmqctl add_user weianlai weianlai

rabbitmqctl set_permissions -p /weianlai".*" ".*" ".*"

rabbitmqctl set_user_tags weianlai administrator

登陆后的样纸

 

©️2020 CSDN 皮肤主题: 书香水墨 设计师:CSDN官方博客 返回首页