rabbitmq安装

 

1、下载相应版本的erlang安装包

  版本对比

  https://www.rabbitmq.com/which-erlang.html

mkdir /opt/src
cd /opt/src
wget http://erlang.org/download/otp_src_21.3.tar.gz

 

2、安装依赖

yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel

 

3、解压

tar zxf otp_src_21.3.tar.gz
cd otp_src_21.3

 

4、配置、编译、安装

./configure --prefix=/opt/erlang --with-ssl --enable-threads --enable-smp-support --enable-kernel-poll --enable-hipe --without-javac
make && make install

 

5、配置环境变量

vim /etc/profile.d/erlang.sh
    PATH=/opt/erlang/bin:$PATH

 

6、验证是否安装成功

source /etc/profile.d/erlang.sh
erl

 

 

安装erlang

选择相应版本的erlang安装包

https://packagecloud.io/rabbitmq/erlang

curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh | sudo bash
sudo yum install erlang-22.3.4.11-1.el7.x86_64

 

 

安装rabbitmq

1、下载安装包

https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.5/rabbitmq-server-3.8.5-1.el7.noarch.rpm

 

2、安装socat

yum -y install socat

 

3、安装rabbitmq(如果erlang是编译安装会报错找不到erlang依赖,加上--nodeps安装)

rpm -ivh rabbitmq-server-3.8.5-1.el7.noarch.rpm --nodeps

 

4、启动rabbitmq

systemctl start rabbitmq-server.service
systemctl enable rabbitmq-server.service

 

5、开启web管理

rabbitmq-plugins enable rabbitmq_management

 

6、用户创建

rabbitmqctl add_user test 123456

 

7、用户授权

rabbitmqctl set_user_tags test administrator

 

8、创建虚拟主机

rabbitmqctl add_vhost test_vhost

 

9、配置用户虚拟主机权限

rabbitmqctl set_permissions -p test_vhost test ".*" ".*" ".*"

 

posted @ 2023-04-10 14:06  难止汗  阅读(21)  评论(0编辑  收藏  举报