标签:let 图片 linux command roo csdn logs locking 问题
环境: CentOS7.8.2003 (x86 / 64bit)
版本: RabbitMQ 3.6.15 (Erlang 19.3)
安装方式: 二进制源码压缩安装
step1 查询mq的进程
ps -ef | grep rabbitmq
step2 杀掉mq进程
ps -ef | grep rabbitmq | grep -v grep | awk ‘{print $2}‘ | xargs kill -9
step3 启动mq
rabbitmq-server -detached
Warning: PID file not written; -detached was passed.
step4 在查询mq的状态
rabbitmqctl status
查询erlang与rabbitmq的版本兼容性地址: https://www.rabbitmq.com/which-erlang.html
1 安装方式:
Linux中,rabbitmq安装方式主要有两种:RPM安装 和 二进制安装(编译安装/压缩包安装)
2 .erlang.cookie是什么?
.erlang.cookie是erlang实现分布式的必要文件;
erlang分布式的每一个节点上要保持相同的.erlang.cookie文件,同时该文件的权限至少应为400。
3 .erlang.cookie文件路径?
4 可通过rabbitmq的启动日志,查看rabbitmq的home目录以及.erlang.cookie文件的位置等信息。
=INFO REPORT==== 20-Jul-2018::13:34:56 ===
node : rabbit@he10
home dir : /root (我是用root用户启动的)
config file(s) : /home/rabbitmq_server-3.6.1/etc/rabbitmq/rabbitmq.config (not found)
cookie hash : 063Gh+RyPjHRzyuSPf9wWA==
...
rabbit@localhost:
* connected to epmd (port 4369) on localhost
* epmd reports: node ‘rabbit‘ not running at all
other nodes on localhost: [‘rabbitmq-cli-17‘]
* suggestion: start the node
current node details:
- node name: ‘rabbitmq-cli-17@Hydrant‘
- home dir: /root
- cookie hash: 063Gh+RyPjHRzyuSPf9wWA==
代价最高
RabbitMQ相关的命令
[rabbitmq-server]
[service] rabbitmq-server stop #[service] : 表示中括号内的service命令可加可不加,下同
[service] rabbitmq-server start #前台启动rabbitmq服务
[service] rabbitmq-server restart
[service] rabbitmq-service remove
[service] rabbitmq-server -detached #后台启动rabbitmq服务
[rabbitmqctl]
rabbitmqctl status
rabbitmqctl stop
Stops the Erlang node on which RabbitMQ is running. To restart the node follow the instructions for Running the Server in the installation guide[1].
rabbitmqctl start_app
rabbitmqctl stop_app
rabbitmqctl shutdown
Shuts down the Erlang process on which RabbitMQ is running. The command is blocking and will return after the Erlang process exits. If RabbitMQ fails to stop, it will return a non-zero exit code.
rabbitmqctl change_password {username} {password}
rabbitmqctl list_users #查看监听用户
rabbitmqctl add_user {username} {password}
rabbitmqctl set_user_tags {username} {tag ...}
rabbitmqctl set_user_tags admin administrator
rabbitmqctl set_permissions [-p vhost] {user} {conf} {write} {read}
rabbitmqctl set_permissions -p "/" admin ".*" ".*" ".*"
rabbitmqctl delete_user {username}
[rabbitmq-plugins]
rabbitmq-plugins enable/disable rabbitmq_management #开启/禁用 rabbitmq的web管理插件
rabbitmq-plugins enable/disable rabbitmq_web_stomp
rabbitmq-plugins enable/disable rabbitmq_tracing #开启/禁用 rabbitmq_tracing能跟踪RabbitMQ中消息的流入流出情况
[Linux]RabbitMQ - 解决Error: unable to connect to node rabbit@localhost: nodedown
标签:let 图片 linux command roo csdn logs locking 问题
原文地址:https://www.cnblogs.com/johnnyzen/p/13161848.html