赞
踩
1、下载esl-erlang_21.0-1~centos~7_amd64.rpm
wget https://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/esl-erlang_21.0-1~centos~7_amd64.rpm
2、安装
rpm -ivh esl-erlang_21.0-1~centos~7_amd64.rpm --force --nodeps
3、查看安装
[root@localhost opt]# yum list|grep erlang esl-erlang.x86_64 21.0-1 installed
1、下载rabbitmq-server-3.7.7-1
wget https://dl.bintray.com/rabbitmq/all/rabbitmq-server/3.7.7/rabbitmq-server-3.7.7-1.el7.noarch.rpm
2、安装
rpm -ivh rabbitmq-server-3.7.7-1.el7.noarch.rpm --force --nodeps
3、查看安装
[root@localhost opt]# yum list|grep rabbit
rabbitmq-server.noarch 3.7.7-1.el7 installed
librabbitmq.i686 0.8.0-2.el7 base
librabbitmq.x86_64 0.8.0-2.el7 base
librabbitmq-devel.i686 0.8.0-2.el7 base
librabbitmq-devel.x86_64 0.8.0-2.el7 base
librabbitmq-examples.x86_64 0.8.0-2.el7 base 21.0-1 installed
1、新建配置文件
vi /etc/rabbitmq/rabbitmq.conf
#默认用户名 default_user = guest #默认密码 default_pass = guest #远程用户访问 loopback_users = none
2、启动rabbitmq服务
/sbin/service rabbitmq-server start
3、查看运行
[root@localhost opt]# /sbin/service rabbitmq-server status
Redirecting to /bin/systemctl status rabbitmq-server.service
● rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: disabled)
Active: activating (start) since Fri 2018-07-06 01:06:31 EDT; 1min 15s ago
Main PID: 2948 (beam.smp)
CGroup: /system.slice/rabbitmq-server.service
├─2948 /usr/lib/erlang/erts-10.0/bin/beam.smp -W w -A 64 -MBas ageffcbf -MHas ageffcbf -MBlmbcs 512 -MHlmbcs...
├─3121 /usr/lib/erlang/erts-10.0/bin/epmd -daemon
├─3259 erl_child_setup 1024
├─3296 inet_gethost 4
└─3297 inet_gethost 4
Jul 06 01:06:36 localhost.localdomain rabbitmq-server[2948]: ## ## RabbitMQ 3.7.7. Copyright (C) 2007-2018 Pi...Inc.
Jul 06 01:06:36 localhost.localdomain rabbitmq-server[2948]: ########## Licensed under the MPL. See http://www.ra...com/
Jul 06 01:06:36 localhost.localdomain rabbitmq-server[2948]: ###### ##
Jul 06 01:06:36 localhost.localdomain rabbitmq-server[2948]: ########## Logs: /var/log/rabbitmq/rabbit@localhost.log
Jul 06 01:06:36 localhost.localdomain rabbitmq-server[2948]: /var/log/rabbitmq/rabbit@localhost_upgrade.log
Jul 06 01:06:36 localhost.localdomain rabbitmq-server[2948]: Starting broker...
Jul 06 01:06:36 localhost.localdomain rabbitmq-server[2948]: systemd unit for activation check: "rabbitmq-server.service"
Jul 06 01:06:36 localhost.localdomain rabbitmq-server[2948]: Failed to start socat error:enoent
Jul 06 01:06:36 localhost.localdomain rabbitmq-server[2948]: systemd READY notification failed, beware of timeouts
Jul 06 01:06:36 localhost.localdomain rabbitmq-server[2948]: completed with 0 plugins.
Hint: Some lines were ellipsized, use -l to show in full.
4、开启RabbitMQ web访问
rabbitmq-plugins enable rabbitmq_management /sbin/service rabbitmq-server stop /sbin/service rabbitmq-server start
5、开启端口15672,5672
[root@localhost opt]# firewall-cmd --permanent --add-port=15672/tcp
success
[root@localhost opt]# firewall-cmd --permanent --add-port=5672/tcp
success
[root@localhost opt]# service network restart
Restarting network (via systemctl): [ OK ]
[root@localhost opt]#
6、设置开机启动
chkconfig rabbitmq-server on
7、添加admin,并赋予administrator权限
添加admin用户,密码设置为admin。
sudo rabbitmqctl add_user admin admin
赋予权限
sudo rabbitmqctl set_user_tags admin administrator
赋予virtual host中所有资源的配置、写、读权限以便管理其中的资源
sudo rabbitmqctl set_permissions -p / admin '.*' '.*' '.*'
浏览器输入
192.168.x.x:15672
默认账号密码
guest
guest
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。