在rabbitmq官网查看对应版本号https://www.rabbitmq.com/which-erlang.html
yum -y install gcc glibc-devel make ncurses-devel openssl-devel xmlto perl wget gtk2-devel binutils-devel
1.http://erlang.org/download/ 选择你所需要的版本下载
2.也可以这样下载,但是比较慢
wget http://erlang.org/download/opt_src_22.0.tar.gz
tar -zxvf opt_src_22.0.tar.gz
mv opt_src_22.0 /usr/local/
cd /usr/local/opt_22.0/
mkdir ../erlang
./configure --prefix=/usr/local/erlang
编译时出现这个可以先忽略
maike install
echo 'export PATH=$PATH:/usr/local/erlang/bin' >> /etc/profile
source /etc/profile
erl
halt().b
GitHub下载地址https://github.com/rabbitmq/rabbitmq-server/releases/tag/v3.7.15
下载
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.15/rabbitmq-server-generic-unix-3.7.15.tar.xz
这里由于是tar.xz格式,需要安装
yum install -y xz
解压
/bin/xz -d rabbitmq-server-generic-unix-3.7.15.tar.xz
第二次解压
tar -xvf rabbitmq-server-generic-unix-3.7.15.tar
移动到local
mv rabbitmq_server-3.7.15/ /usr/local/
mv /usr/local/rabbitmq_server-3.7.15 rabbitmq
配置环境变量
echo 'export PATH=$PATH:/usr/local/rabbitmq/sbin' >> /etc/profile
刷新环境变量
source /etc/profile
创建配置目录
mkdir /etc/rabbitmq
rabbitmq-server -detached //后台启动
rabbitmqctl stop
rabbitmqctl status
打开5672/15672端口,或者关闭防火墙
rabbitmq-plugins enable rabbitmq_management
访问
http://127.0.0.1:1562/
查看所有用户
rabbitmqctl list_users
添加一个用户
rabbitmqctl add_user admin 123456
配置权限
rabbitmqctl set_permissions -p "/" admin ".*" ".*" ".*"
查看用户权限
rabbitmqctl list_user_permissions admin
设置tag
rabbitmqctl set_user_tags admin administrator
删除用户
rabbitmqctl delete_user guest