centos7安装rabbitmq
程序员文章站
2022-07-15 09:19:09
...
因为RabbitMQ是由erlang实现的,所以要先安装erlang再安装rabbitMQ
下载erlang: erlang下载链接
官网下载rabbitmq : http://www.rabbitmq.com/install-rpm.html
一、配置yum软件源地址EPEL(EPEL是管理yum下载软件的软件,也可以说是一个软件仓库)后安装erlang
wget http://dl.fedoraproject.org/pub/epel/7Server/x86_64/Packages/e/epel-release-7-11.noarch.rpm
- 使用rpm安装 添加erlang需要的环境
yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel unixODBC unixODBC-devel httpd python-simplejson
3.安装erlang
rpm -ivh erlang-21.0.7-1.el7.centos.x86_64.rpm
4.安装rabbitmq
rpm -ivh rabbitmq-server-3.7.7-1.el7.noarch.rpm
安装到时候可能会遇到
socat is needed by rabbitmq-server-3.7.7-1.el7.noarch
只需要安装socat 即可
yum install socat
默认安装到rabbitmq只有端口25672
需要添加rabbitmq支持amqp协议
vim /etc/rabbitmq/rabbitmq.config
添加内容为:
[ {rabbit, [{tcp_listeners, [5672]}]} ].
service rabbitmq-server start 启动rabbitmq
service rabbitmq-server restart 重启
service rabbitmq-server stop 关闭
账号配置
账号配置
查看用户列表
rabbitmqctl list_users
添加用户
rabbitmqctl add_user admin admin
设置用户权限
rabbitmqctl set_user_tags admin administrator
设置用户virtual host
rabbitmqctl set_permissions -p / admin "." "." ".*"
添加web能够访问rabbitmq页面
rabbitmqctl start_app
rabbitmq-plugins enable rabbitmq_management
上一篇: Centos7 安装rabbitMQ