安装并启用rabbitmq服务器
1.确保Erlang已经安装
2.安装rabbitmq服务器
[root@bogon yum.repos.d]# rpm --import https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc [root@bogon yum.repos.d]# yum list | grep rabbitmq-ser rabbitmq-server.noarch 3.3.5-34.el7 epel [root@bogon yum.repos.d]# yum install -y rabbitmq-server.noarch Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * epel: mirrors.ustc.edu.cn * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com Resolving Dependencies --> Running transaction check ---> Package rabbitmq-server.noarch 0:3.3.5-34.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================== Package Arch Version Repository Size ================================================================================================================================== Installing: rabbitmq-server noarch 3.3.5-34.el7 epel 4.0 M Transaction Summary ================================================================================================================================== Install 1 Package Total download size: 4.0 M Installed size: 4.8 M Downloading packages: rabbitmq-server-3.3.5-34.el7.noarch.rpm | 4.0 MB 00:01:43 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : rabbitmq-server-3.3.5-34.el7.noarch 1/1 Verifying : rabbitmq-server-3.3.5-34.el7.noarch 1/1 Installed: rabbitmq-server.noarch 0:3.3.5-34.el7 Complete!
3.启用端口
[root@bogon yum.repos.d]# firewall-cmd --zone=public --add-port=15672/tcp success [root@bogon yum.repos.d]# firewall-cmd --zone=public --add-port=5672/tcp success [root@bogon yum.repos.d]# firewall-cmd --list-ports 15672/tcp 5672/tcp [root@bogon yum.repos.d]#
4.配置本地域名映射
[root@bogon yum.repos.d]# vi /etc/hosts #添加:127.0.0.1 bogon 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 127.0.0.1 bogon
5.启用 Management Plugin
[root@bogon yum.repos.d]# rabbitmq-plugins enable rabbitmq_management The following plugins have been enabled: mochiweb webmachine rabbitmq_web_dispatch amqp_client rabbitmq_management_agent rabbitmq_management Plugin configuration has changed. Restart RabbitMQ for changes to take effect.
6.启动Rabbitmq服务器
[root@bogon yum.repos.d]# /sbin/service rabbitmq-server start Redirecting to /bin/systemctl start rabbitmq-server.service
7.流量器访问 http://server:15672 进行登录 用户名:guest 密码:guest