Linux Centos7搭建RabbitMQ
下载依赖
yum -y install epel-release
yum -y update
安装Erlang
yum -y install erlang socat
测试安装成功
erl -version
安装wget
yum -y install wget
安装RabbitMQ
wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.15/rabbitmq-server-3.6.15-1.el6.noarch.rpm
也可以去下载其他版本:点我直达
导入GPG密钥
rpm –import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
安装RPM包
rpm -Uvh rabbitmq-server-3.6.15-1.el6.noarch.rpm
开始RabbitMQ
启动RabbitMQ
systemctl start rabbitmq-server
查看启动状态
systemctl status rabbitmq-server
注意事项
需要开启端口:8161
访问web控制台
启动RabbitMQ Web管理控制台
rabbitmq-plugins enable rabbitmq_management
将RabbitMQ文件的所有权提供给RabbitMQ用户
chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/
创建账号
rabbitmqctl add_user admin StrongPassword
rabbitmqctl set_user_tags admin administrator
rabbitmqctl set_permissions -p / admin “.*” “.*” “.*”
注:StrongPassword是密码
访问RabbitMQ
http:ip:15672