当前位置:   article > 正文

RabbitMQ的删除重装及初始化(手把手)_rabbitmq删除集群重建

rabbitmq删除集群重建

删除重装

首先先彻底卸载erlang和RabbitMQ

卸载erlang

yum list | grep erlang
yum -y remove erlang-*
rm -rf /usr/lib64/erlang

卸载RabbitMQ

yum list | grep rabbitmq
yum -y remove rabbitmq-server.noarch
find / -name rabbit*
rm -rf 依次删除

按照以上卸载可将erlang和RabbitMQ彻底卸载,不留一点痕迹。

开始重装:

1、将Erlang Solutions存储库(包括用于验证已签名包的公钥)添加到系统

wget https://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm

rpm -Uvh erlang-solutions-1.0-1.noarch.rpm

在安装时出现问题,需要安装依赖后再
rpm -Uvh erlang-solutions-1.0-1.noarch.rpm

yum install epel-release #安装依赖
rpm -Uvh erlang-solutions-1.0-1.noarch.rpm #重新安装

2、下载erlangrabbitMQ
https://blog.csdn.net/qq_49896962/article/details/118423415

3、启动rabbitMQ

配置随系统启动
chkconfig rabbitmq-server on
运行结果
注意:正在将请求转发到“systemctl enable rabbitmq-server.service”。
Created symlink from /etc/systemd/system/multi-user.target.wants/rabbitmq-server.service to /usr/lib/systemd/system/rabbitmq-server.service.

启动服务
/sbin/service rabbitmq-server start
运行结果
Redirecting to /bin/systemctl start rabbitmq-server.service

查看进程确定是否启动成功
ps aux|grep rabbitmq

4、rabbitMQ管理界面插件安装
rabbitmq-plugins enable rabbitmq_management
运行结果
Enabling plugins on node rabbit@localhost:
rabbitmq_management
The following plugins have been configured:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
Applying plugin configuration to rabbit@localhost…
The following plugins have been enabled:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
started 3 plugins.

5、rabbitMQ设置远程IP登录

创建帐号
[root@localhost rabbitmq]# rabbitmqctl add_user sl 123456
Adding user “sl” …

设置角色
[root@localhost rabbitmq]# rabbitmqctl set_user_tags sl administrator
Setting tags for user “sl” to [administrator] …

设置用户组权限
[root@localhost rabbitmq]# rabbitmqctl set_permissions sl “." ".” “.*”
Setting permissions for user “sl” in vhost “/” …

查看用户
[root@localhost rabbitmq]# rabbitmqctl list_users
Listing users …
user tags
guest [administrator]
sl [administrator]

6、访问服务地址:service_ip:15672 ,OK到这里就可以输入用户名和密码登录到管理后台啦

至此,卸载和重装就完成啦

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/490843
推荐阅读
相关标签
  

闽ICP备14008679号