CentOS 7 yum安装 RabbitMQ
tom马 2019-07-11 16:41:24 1929 收藏 4
展开
1、下载erlang
wget http://www.rabbitmq.com/releases/erlang/erlang-19.0.4-1.el7.centos.x86_64.rpm
2、安装erlang
rpm -ivh erlang-19.0.4-1.el7.centos.x86_64.rpm
测试erlang
[root@centos7 src]# erl
Erlang/OTP 19 [erts-8.0.3] [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V8.0.3 (abort with ^G)
1>
3、下载rabbitmq
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-3.6.6-1.el7.noarch.rpm
4、安装rabbitmq
rpm -ivh rabbitmq-server-3.6.6-1.el7.noarch.rpm
#错误:依赖检测失败:socat 被 rabbitmq-server-3.6.6-1.el7.noarch 需要
yum install socat -y
5、启动
systemctl start rabbitmq-server #启动
systemctl status rabbitmq-server #状态
systemctl stop rabbitmq-server #关闭
6、配置网页插件(从网页登陆端口号:15672)
rabbitmq-plugins enable rabbitmq_management #启用插件
配置防火墙
vi /etc/sysconfig/iptables #添加端口
-A INPUT -p tcp -m state --state NEW -m tcp --dport 15672 -j ACCEPT
systemctl restart iptables #重启生效
配置访问账号密码和权限
rabbitmqctl add_user mq mq123 #添加用户mq,密码mq123
rabbitmqctl set_permissions -p / mq ".*" ".*" ".*" #添加权限
rabbitmqctl set_user_tags mq administrator #修改用户角色
#其它操作
rabbitmqctl delete_user Username #删除一个用户
rabbitmqctl change_password Username Newpassword #修改用户密码
rabbitmqctl list_users #查看当前用户列表
登陆
http://192.168.1.72:15672 地址:http://ip:15672
————————————————
版权声明:本文为CSDN博主「tom马」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/mshxuyi/java/article/details/95490923
来源:oschina
链接:https://my.oschina.net/u/4267539/blog/4304726