#启动命令 [root@yy ~]# rabbitmq-server -detached Warning: PID file not written; -detached was passed. #查看允许状态 [root@yy ~]# rabbitmqctl status Status of node rabbit@yy ... [{pid,1611},{running_applications,[{rabbit,"RabbitMQ","3.7.26"},{mnesia,"MNESIA CXC 138 12","4.15.6"},{rabbit_common,"Modules shared by rabbitmq-server and rabbitmq-erlang-client","3.7.26"},{sysmon_handler,"Rate-limiting system_monitor event handler","1.1.0"},{os_mon,"CPO CXC 138 46","2.4.7"},{observer_cli,"Visualize Erlang Nodes On The Command Line","1.5.2"},{ranch,"Socket acceptor pool for TCP protocols.","1.7.1"},{ssl,"Erlang/OTP SSL application","9.2"},{public_key,"Public key infrastructure","1.6.5"},{asn1,"The Erlang ASN1 compiler version 5.0.8","5.0.8"},{stdout_formatter,"Tools to format paragraphs, lists and tables as plain text","0.2.2"},{jsx,"a streaming, evented json parsing toolkit","2.9.0"},{recon,"Diagnostic tools for production use","2.5.0"},{credentials_obfuscation,"Helper library that obfuscates sensitive values in process state","1.1.0"},{crypto,"CRYPTO","4.4.1"},{tools,"DEVTOOLS CXC 138 16","3.1"},{inets,"INETS CXC 138 49","7.0.6"},{xmerl,"XML parser","1.3.19"},{lager,"Erlang logging framework","3.8.0"},{goldrush,"Erlang event stream processor","0.1.9"},{compiler,"ERTS CXC 138 10","7.3.2"},{syntax_tools,"Syntax tools","2.1.7"},{sasl,"SASL CXC 138 11","3.3"},{stdlib,"ERTS CXC 138 10","3.8"},{kernel,"ERTS CXC 138 10","6.3"}]},{os,{unix,linux}},{erlang_version,"Erlang/OTP 21 [erts-10.3] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:64] [hipe]\n"},{memory,[{connection_readers,0},{connection_writers,0},{connection_channels,0},{connection_other,0},{queue_procs,0},{queue_slave_procs,0},{plugins,11916},{other_proc,25381904},{metrics,195124},{mgmt_db,0},{mnesia,73008},{other_ets,2469360},{binary,443624},{msg_index,29616},{code,21577332},{atom,1131721},{other_system,9928579},{allocated_unused,10855608},{reserved_unallocated,0},{strategy,rss},{total,[{erlang,61242184},{rss,71647232},{allocated,72097792}]}]},{alarms,[]},{listeners,[{clustering,25672,"::"},{amqp,5672,"::"}]},{vm_memory_calculation_strategy,rss},{vm_memory_high_watermark,0.4},{vm_memory_limit,415647334},{disk_free_limit,50000000},{disk_free,564281344},{file_descriptors,[{total_limit,924},{total_used,2},{sockets_limit,829},{sockets_used,0}]},{processes,[{limit,1048576},{used,227}]},{run_queue,1},{uptime,97},{kernel,{net_ticktime,60}}]
第一次启动的时候报了个错(ERROR: epmd error for host 11: badarg (unknown POSIX error)),原来我的虚拟机取名11,纯数字。= =! 改成yy 重启就好了。 参考文章:rabbitmq启动时出错epmd error for host
5、停止服务
[root@yy ~]# rabbitmqctl stop
三、使用配置RabbitMQ
1、开启web管理
[root@yy ~]# rabbitmq-plugins enable rabbitmq_management Enabling plugins on node rabbit@yy: rabbitmq_management The following plugins have been configured:rabbitmq_managementrabbitmq_management_agentrabbitmq_web_dispatch Applying plugin configuration to rabbit@yy... The following plugins have been enabled:rabbitmq_managementrabbitmq_management_agentrabbitmq_web_dispatchstarted 3 plugins. [root@yy ~]#