rabbitmq的安装部署
Posted w787815
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了rabbitmq的安装部署相关的知识,希望对你有一定的参考价值。
[[email protected] tools]#mkdir rabbitmq && cd rabbitmq/ #创建并进入目录 [[email protected] rabbitmq]# ls epel-release-6-8.noarch.rpm [[email protected] rabbitmq]# rpm -ivh epel-release-6-8.noarch.rpm #安装epel源 [[email protected] rabbitmq]# yum install rabbitmq-server -y 查看插件 [[email protected] ~]# /usr/lib/rabbitmq/bin/rabbitmq-plugins list [ ] amqp_client 3.1.5 [ ] cowboy 0.5.0-rmq3.1.5-git4b93c2d [ ] eldap 3.1.5-gite309de4 [ ] mochiweb 2.7.0-rmq3.1.5-git680dba8 [ ] rabbitmq_amqp1_0 3.1.5 [ ] rabbitmq_auth_backend_ldap 3.1.5 [ ] rabbitmq_auth_mechanism_ssl 3.1.5 [ ] rabbitmq_consistent_hash_exchange 3.1.5 [ ] rabbitmq_federation 3.1.5 [ ] rabbitmq_federation_management 3.1.5 [ ] rabbitmq_jsonrpc 3.1.5 [ ] rabbitmq_jsonrpc_channel 3.1.5 #主要看这个 ,下面是一些监控 [ ] rabbitmq_jsonrpc_channel_examples 3.1.5 [ ] rabbitmq_management 3.1.5 [ ] rabbitmq_management_agent 3.1.5 [ ] rabbitmq_management_visualiser 3.1.5 [ ] rabbitmq_mqtt 3.1.5 [ ] rabbitmq_shovel 3.1.5 [ ] rabbitmq_shovel_management 3.1.5 [ ] rabbitmq_stomp 3.1.5 [ ] rabbitmq_tracing 3.1.5 [ ] rabbitmq_web_dispatch 3.1.5 [ ] rabbitmq_web_stomp 3.1.5 [ ] rabbitmq_web_stomp_examples 3.1.5 [ ] rfc4627_jsonrpc 3.1.5-git5e67120 [ ] sockjs 0.3.4-rmq3.1.5-git3132eb9 [ ] webmachine 1.10.3-rmq3.1.5-gite9359c7 [[email protected] rabbitmq]# /usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_management #开启管理界面 The following plugins have been enabled: mochiweb webmachine rabbitmq_web_dispatch amqp_client rabbitmq_management_agent rabbitmq_management Plugin configuration has changed. Restart RabbitMQ for changes to take effect. [[email protected] rabbitmq]# /etc/init.d/rabbitmq-server start Starting rabbitmq-server: SUCCESS rabbitmq-server. [[email protected] rabbitmq]# rabbitmqctl list_queues #出现如下这个表示安装成功 Listing queues ... ...done. [[email protected] rabbitmq]# rabbitmqctl add_vhost zsq #创建Vhost Creating vhost "zsq" ... ...done. [[email protected] rabbitmq]# rabbitmqctl list_vhosts #遍历所有虚拟主机信息 Listing vhosts ... / #这个是默认的 zsq ...done. [[email protected] rabbitmq]# rabbitmqctl add_user zsq 13456 #创建用户跟密码 Creating user "zsq" ... ...done. [[email protected] rabbitmq]# rabbitmqctl list_users #查看用户信息 Listing users ... guest [administrator] #默认 zsq [] #自己创建的 ...done. [[email protected] rabbitmq]# rabbitmqctl set_permissions -p zsq zsq ".*" ".*" ".*" #vhost跟用户绑定 Setting permissions for user "zsq" in vhost "zsq" ... ...done. 其它命令 rabbitmqctl list_queues #显示队列 rabbitmqctl delete_vhost vhostname #删除Vhost 其它的由开发程序来实现,创建的vhost 用户 密码 IP等信息给开发
rabbitmq配置
一般情况下,RabbitMQ的默认配置就足够了。如果希望特殊设置的话,有两个途径:
一个是环境变量的配置文件 /etc/rabbitmq/rabbitmq-env.conf ;
一个是配置信息的配置文件 /etc/rabbitmq/rabbitmq.conf;
注意,这两个文件默认是没有的,如果需要必须自己创建。
管理web界面登陆
在浏览器中输入http://127.0.0.1:15672/
输入用户名和密码(默认为guest)
以上是关于rabbitmq的安装部署的主要内容,如果未能解决你的问题,请参考以下文章