1、准备,安装运行环境:
yum install build-essential openssl openssl-devel unixODBC unixODBC-devel make gcc gcc-c++ kernel-devel m4 ncurses-devel tk tc xz
2、下载一下安装包
wget https://www.rabbitmq.com/releases/erlang/erlang-18.3-1.el7.centos.x86_64.rpm
wget http://repo.iotti.biz/CentOS/7/x86_64/socat-1.7.3.2-5.el7.lux.x86_64.rpm
wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.5/rabbitmq-server-3.6.5-1.noarch.rpm
依次安裝rpm -ivh rmp文件
3、配置:集群配置需要
vim /etc/hosts 以及 /etc/hostname
4、配置文件:
vim /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.5/ebin/rabbit.app
比如修改密码、配置等等,例如:loopback_users 中的<<"guest">>,只保留guest
服务启动与停止:
启动 rabbitmq-server start &
停止 rabbitmqctl app_stop
4 管理插件:rabbitmq-plugins enable rabbitmq_management
5 访问地址:http://127.0.0.1:15672/ 账户:guest 密码:guest
开启端口:firewall-cmd --zone=public --add-port=15672/tcp --permanent
firewall-cmd --reload 刷新防火墙