在当前目录(/root)
wget http://www.rabbitmq.com/releases/erlang/erlang-19.0.4-1.el7.centos.x86_64.rpm
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-3.6.6-1.el7.noarch.rpm
安装erlang:
rpm -ivh erlang-19.0.4-1.el7.centos.x86_64.rpm
测试是否安装成功:
erl
安装rabbitmq:
rpm -ivh rabbitmq-server-3.6.6-1.el7.noarch.rpm
在安装rabbitmq时提示依赖socat
yum install socat
然后再次安装rabbitmq
查看状态
systemctl status rabbitmq-server.service (其中可看到Logs日志文件所在目录,查看对应日志可查看配置文件目录)
启动
systemctl start rabbitmq-server.service
查看RabbitMQ中用户命令
rabbitmqctl list_users
创建用户命令
rabbitmqctl add_user cjh cjh (用户名与密码)
赋予用户权限命令
rabbitmqctl set_permissions -p "/" cjh '.*' '.*' '.*'
赋予用户角色命令
rabbitmqctl set_user_tags cjh administrator
开启rabbitmq管理控制台命令
rabbitmq-plugins enable rabbitmq_management
设置阿里云端口访问(不用重启)
访问 http://101.200.50.31:15672