本文共 1986 字,大约阅读时间需要 6 分钟。
1.安装Erlang环境
cd /usr/local/src/
mkdir rabbitmq cd rabbitmqwget
rpm -Uvh erlang-solutions-1.0-1.noarch.rpmrpm --import
sudo yum install erlang
2.安装RabbitMQ上面都成功后 安装RabbitMQ
wget
rpm --import yum install rabbitmq-server-3.6.1-1.noarch.rpm安装输出log如下:Install 1 Package(s)
Total size: 5.5 MInstalled size: 5.5 MIs this ok [y/N]: yDownloading Packages:Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning TransactionInstalling : rabbitmq-server-3.6.1-1.noarch 1/1 Verifying : rabbitmq-server-3.6.1-1.noarch 1/1 Installed:rabbitmq-server.noarch 0:3.6.1-1 Complete!run the following command to allow SELinux to enable RabbitMQ service:setsebool -P nis_enabled 1
开启端口,如果是本地测试,关掉iptables也可以4369 (epmd), 25672 (Erlang distribution)
5672, 5671 (AMQP 0-9-1 without and with TLS)15672 (if management plugin is enabled)61613, 61614 (if STOMP is enabled)1883, 8883 (if MQTT is enabled)启动:/etc/init.d/rabbitmq-server start
log如下:[root@iZ942k2d5ezZ tools]# /etc/init.d/rabbitmq-server start
Starting rabbitmq-server: SUCCESSrabbitmq-server.加入浏览器界面:rabbitmq-plugins enable rabbitmq_management
chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/然后访问: 就可以看到界面了:RabbitMQ Management - Google Chrome_005
增加账户:
rabbitmqctl add_user mqadmin 123456
rabbitmqctl set_user_tags mqadmin administratorrabbitmqctl set_permissions -p / mqadmin "." "." ".*"上面的命令中
mqadmin就是登陆的账户
123456就是登陆的密码
然后就可以看到界面了,如下:
RabbitMQ Management
转载于:https://blog.51cto.com/3694780/2177240