1.安装Erlang:
https://www.jianshu.com/p/70813dacc535
2.下载RabbitMQ:
wget https://github.com//rabbitmq/rabbitmq-server/releases/download/v3.7.9/rabbitmq-server-3.7.9.tar.xz
xz -d rabbitmq-server-3.7.9.tar.xz
tar -zxvf rabbitmq-server-3.7.9.tar
修改文件名称:
mv rabbitmq-server-3.7.9/ rabbitmq
4.配置环境变量:
vim /etc/profile
RABBIT_MQ=/usr/local/rabbitmq
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$MAVEN_HOME/bin:$ER_LANG/bin:$RABBIT_MQ:
source /etc/profile
查看环境变量:
echo $PATH
5.RabbitMQ 基本命令
启动服务:rabbitmq-server -detached【 /usr/local/rabbitmq/sbin/rabbitmq-server -detached 】
查看状态:rabbitmqctl status【 /usr/local/rabbitmq/sbin/rabbitmqctl status 】
关闭服务:rabbitmqctl stop【 /usr/local/rabbitmq/sbin/rabbitmqctl stop 】
列出角色:rabbitmqctl list_users
6.开始web插件(关闭防火墙)
创建文件:
mkdir /etc/rabbitmq
启动插件:
rabbitmq-plugins enable rabbitmq_management
配置web账号密码:
rabbitmqctl add_user admin admin //添加用户。(账号密码)
rabbitmqctl set_permissions -p / admin ".*" ".*" ".*" //添加权限
rabbitmqctl set_user_tags admin administrator //修改用户角色
访问:
http://127.0.0.1:15672/#/
网友评论