一、卸载
[root@zabbix_server lib]# rpm -qa|grep rabbitmq
rabbitmq-server-3.6.-.noarch
[root@zabbix_server lib]# rpm -e --nodeps rabbitmq-server
二、此时注意一定要手工删除rabbitmq目录
rm -rf /etc/rabbitmq
rm -rf /usr/lib/rabbitmq
不然,重装后启动节点会报如下错误:
[root@zabbix_server src]# rabbitmq-server start &
[]
[root@zabbix_server src]# BOOT FAILED
=========== Error description:
"Found lock file at ~s.\n Either previous upgrade is in progress or has failed.\n Database backup path: ~s" Log files (may contain more information):
/var/log/rabbitmq/rabbit@zabbix_server.log
/var/log/rabbitmq/rabbit@zabbix_server-sasl.log Stack trace:
[{rabbit_upgrade,ensure_backup_taken,
["/var/lib/rabbitmq/mnesia/rabbit@zabbix_server/schema_upgrade_lock",
"/var/lib/rabbitmq/mnesia/rabbit@zabbix_server-upgrade-backup"],
[{file,"src/rabbit_upgrade.erl"},{line,}]},
{rabbit_upgrade,maybe_upgrade_mnesia,,
[{file,"src/rabbit_upgrade.erl"},{line,}]},
{rabbit,'-boot/0-fun-0-',,[{file,"src/rabbit.erl"},{line,}]},
{rabbit,start_it,,[{file,"src/rabbit.erl"},{line,}]},
{init,start_it,,[]},
{init,start_em,,[]}] {"init terminating in do_boot","Found lock file at ~s.\n Either previous upgrade is in progress or has failed.\n Database backup path: ~s"}
/usr/lib/rabbitmq/bin/rabbitmq-server: line : 用户定义信号 start_rabbitmq_server "$@"
如果出现以上错误,请停掉新安装的rabbitmq,卸载后,手工删除相关目录,再重新安装
[root@zabbix_server src]# rpm -ivh rabbitmq-server-3.6.-.noarch.rpm
warning: rabbitmq-server-3.6.-.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 6026dfca: NOKEY
Preparing... ########################################### [%]
:rabbitmq-server ########################################### [%]
启动节点正常
[root@zabbix_server src]# rabbitmq-server start &
[]
[root@zabbix_server src]#
RabbitMQ 3.6.. Copyright (C) - Pivotal Software, Inc.
## ## Licensed under the MPL. See http://www.rabbitmq.com/
## ##
########## Logs: /var/log/rabbitmq/rabbit@zabbix_server.log
###### ## /var/log/rabbitmq/rabbit@zabbix_server-sasl.log
##########
Starting broker...
completed with plugins.