本地虚拟机配置RabbitMQ(测试)

  86 次阅读

CONTENT

环境:CentOS Linux release 7.7.1908(3.10.0-1062.el7.x86_64)
1.镜像:https://mirrors.tuna.tsinghua.edu.cn/centos/7.7.1908/isos/x86_64/CentOS-7-x86_64-Minimal-1908.iso

2.安装好后键入 ip addr 查看本地ip,并使用Xshell链接最小化虚拟机 

3.配置源  https://mirrors.tuna.tsinghua.edu.cn/help/centos/  

4.因为与python交互所以安装minconda环境, 
https://docs.anaconda.com/anaconda/install/linux/https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-4.7.10-Linux-x86_64.sh

5. 安装好后重新打开新的Xshell窗口链接(使得conda生效),并安装rabbitMQ

6.根据文档提供的链接安装erlang(环境)和rabbitmq 的源,  
https://www.rabbitmq.com/install-rpm.html#package-cloud , 
https://packagecloud.io/rabbitmq/erlang/install#bash-rpm , 
https://packagecloud.io/rabbitmq/rabbitmq-server/install 

7.分别键入 yum install erlang -y   yum install rabbitmq-server -y

8.根据教程 键入 chkconfig rabbitmq-server on  设定为开机启动,  /sbin/service rabbitmq-server start/stop 为启动关闭服务

9.配置下载默认配置(3.7版本以上支持此配置) https://github.com/rabbitmq/rabbitmq-server/raw/v3.7.x/docs/rabbitmq.conf.example ,存入/etc/rabbitmq/rabbitmq.conf

10.创建用户、虚拟机, rabbitmqctl add_user test password 
rabbitmqctl add_vhost centos
rabbitmqctl set_permissions -p  centos test ".*" ".*" ".*" 
创建用户test 密码password ,创建虚拟机centos 并允许test访问虚拟主机 

安装调用都正常了,但是放弃了对RabbitMQ的使用= = 还是用redis吧


注意:直接修改主机名(/etc/hostname)会导致rabbitmq无法启动,hosts文件中别忘添加主机名

Comments | NOTHING

暂无评论...