标签:dispatch 支持 download ror agent rsa setting available dep
1、查看系统版本, 升级系统基本lib库
[root@test ~]# cat /etc/redhat-release
CentOS release 6.5 (Final)
[root@test ~]# yum install ncurses ncurses-base ncurses-devel ncurses-libs ncurses-static ncurses-term ocaml-curses ocaml-curses-devel openssl-devel zlib-devel
2、安装erlang语言环境
下载erlang
[root@test ~]# wget https://github.com/rabbitmq/erlang-rpm/releases/download/v21.1.1/erlang-21.1.1-1.el6.x86_64.rpm
[root@test ~]# rpm -ivh erlang-21.1.1-1.el6.x86_64.rpm
warning: erlang-21.1.1-1.el6.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 6026dfca: NOKEY
Preparing... ########################################### [100%]
1:erlang ########################################### [100%]
3、下载rabbitmq
[root@test ~]# wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.9/rabbitmq-server-3.7.9-1.el6.noarch.rpm
[root@test ~]# rpm -ivh rabbitmq-server-3.7.9-1.el6.noarch.rpm
warning: rabbitmq-server-3.7.9-1.el6.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 6026dfca: NOKEY
error: Failed dependencies:
socat is needed by rabbitmq-server-3.7.9-1.el6.noarch
//报错提示缺少socat 包支持
[root@test ~]# yum install socat
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirror.vpshosting.com.hk
* extras: mirror.vpshosting.com.hk
* updates: mirror.vpshosting.com.hk
Setting up Install Process
No package socat available.
此时会报错没有socat包或是找不到socat包,解决方法安装centos的epel的扩展源
[root@test ~]# yum -y install epel-release
[root@test ~]# rpm -ivh rabbitmq-server-3.7.9-1.el6.noarch.rpm
warning: rabbitmq-server-3.7.9-1.el6.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 6026dfca: NOKEY
Preparing... ########################################### [100%]
1:rabbitmq-server ########################################### [100%]
[root@test ~]#
4、生产配置文件
[root@test ~]# cp /usr/share/doc/rabbitmq-server-3.7.9/rabbitmq.config.example /etc/rabbitmq/rabbitmq.config
// 可以自定修改端口,默认端口是5672和25672
5、启动rabbitMQ
[root@test ~]# /etc/init.d/rabbitmq-server start
Starting rabbitmq-server: SUCCESS
rabbitmq-server.
[root@test ~]# netstat -nlpt //查看是否有5672和25672端口
6、开启管理页面插件
rabbitmq-plugins enable rabbitmq_management //管理页面默认端口是15672
[root@test ~]# rabbitmq-plugins enable rabbitmq_management
The following plugins have been configured:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
Applying plugin configuration to rabbit@test...
The following plugins have been enabled:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
started 3 plugins.
[root@test ~]#
7、添加管理员账号
rabbitmqctl add_user rabbitadmin 123456
[root@test ~]# rabbitmqctl add_user rabbitadmin 123456
Adding user "rabbitadmin" ...
分配用户标签
rabbitmqctl set_user_tags rabbitadmin administrator
[root@test ~]# rabbitmqctl set_user_tags rabbitadmin administrator
Setting tags for user "rabbitadmin" to [administrator] ...
创建和赋角色完成后查看并确认
[root@test ~]# rabbitmqctl list_users
Listing users ...
user tags
rabbitadmin [administrator]
guest [administrator]
删除guest帐号
[root@test ~]# rabbitmqctl delete_user guest
Deleting user "guest" ...
[root@test ~]# rabbitmqctl list_users
Listing users ...
user tags
rabbitadmin [administrator]
rabbitmqctl 详细命令使用
[root@test ~]# rabbitmqctl --help
登录rabbitmq管理界面
浏览器输入地址:http://服务器IP地址:15672/
用户名密码:rabbitadmin/123456
标签:dispatch 支持 download ror agent rsa setting available dep
原文地址:https://www.cnblogs.com/gaibianziji/p/10219159.html