一、安装Erlang
1. 下载rpm包
wget https://bintray.com/rabbitmq/rpm/download_file?file_path=erlang%2F20%2Fel%2F7%2Fx86_64%2Ferlang-20.3-1.el7.centos.x86_64.rpm
2. 安装软件包
yum install download_file\?file_path\=erlang%2F20%2Fel%2F7%2Fx86_64%2Ferlang-20.3-1.el7.centos.x86_64.rpm
3.测试erl
erl -versionErlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 9.3
二、安装RabbitMQ
1. 下载软件
wget https://dl.bintray.com/rabbitmq/all/rabbitmq-server/3.7.7/rabbitmq-server-3.7.7-1.el7.noarch.rpm
2. 安装软件
yum localinstall rabbitmq-server-3.7.7-1.el7.noarch.rpm
3. 启动测试
直接通过前台的方式启动rabbitmq
/usr/sbin/rabbitmq-server ## ## ## ## RabbitMQ 3.7.7. Copyright (C) 2007-2018 Pivotal Software, Inc. ########## Licensed under the MPL. See http://www.rabbitmq.com/ ###### ## ########## Logs: /var/log/rabbitmq/rabbit@fsl_mongodb_103.log /var/log/rabbitmq/rabbit@fsl_mongodb_103_upgrade.log Starting broker... completed with 6 plugins
此时,可以通过浏览器访问ip:15672,查看页面是否正常。由于没有管理员用户,因此此时无法登陆
4. 配置用户并安装插件
#添加admin用户,密码为admin/usr/sbin/rabbitmqctl add_user admin admin#设置admin用户为管理员/usr/sbin/rabbitmqctl set_user_tags admin administrator#安装web管理插件/usr/sbin/rabbitmq-plugins enable rabbitmq_management#安装mqtt/usr/sbin/rabbitmq-plugins enable rabbitmq_mqtt#安装websocket/usr/sbin/rabbitmq-plugins enable rabbitmq_web_stomp
查看已安装的插件
/usr/sbi/rabbitmq-plugins list Configured: E = explicitly enabled; e = implicitly enabled | Status: * = running on rabbit@fsl-test-master |/[ ] rabbitmq_amqp1_0 3.7.7[ ] rabbitmq_auth_backend_cache 3.7.7[ ] rabbitmq_auth_backend_http 3.7.7[ ] rabbitmq_auth_backend_ldap 3.7.7[ ] rabbitmq_auth_mechanism_ssl 3.7.7[ ] rabbitmq_consistent_hash_exchange 3.7.7[ ] rabbitmq_event_exchange 3.7.7[ ] rabbitmq_federation 3.7.7[ ] rabbitmq_federation_management 3.7.7[ ] rabbitmq_jms_topic_exchange 3.7.7[E*] rabbitmq_management 3.7.7[e*] rabbitmq_management_agent 3.7.7[E*] rabbitmq_mqtt 3.7.7[ ] rabbitmq_peer_discovery_aws 3.7.7[ ] rabbitmq_peer_discovery_common 3.7.7[ ] rabbitmq_peer_discovery_consul 3.7.7[ ] rabbitmq_peer_discovery_etcd 3.7.7[ ] rabbitmq_peer_discovery_k8s 3.7.7[ ] rabbitmq_random_exchange 3.7.7[ ] rabbitmq_recent_history_exchange 3.7.7[ ] rabbitmq_sharding 3.7.7[ ] rabbitmq_shovel 3.7.7[ ] rabbitmq_shovel_management 3.7.7[e*] rabbitmq_stomp 3.7.7[ ] rabbitmq_top 3.7.7[ ] rabbitmq_tracing 3.7.7[ ] rabbitmq_trust_store 3.7.7[e*] rabbitmq_web_dispatch 3.7.7[ ] rabbitmq_web_mqtt 3.7.7[ ] rabbitmq_web_mqtt_examples 3.7.7[E*] rabbitmq_web_stomp 3.7.7[ ] rabbitmq_web_stomp_examples 3.7.7
4. 重启测试
/usr/sbin/rabbitmqctl stop/usr/sbin/rabbitmq-server -detached
浏览器输入地址:IP:15672,打开如下页面,输入用户名和密码
然后跳入到了系统界面 至此,基本的安装配置已完成。