安装包准备
1、Erlang安装包下载:https://www.erlang-solutions.com/resources/download.html
2、RabbitMq安装包下载:https://www.rabbitmq.com/install-generic-unix.html
注意:Erlang和RabbitMq版本需要一致,版本对应查询地址https://www.rabbitmq.com/which-erlang.html
安装环境
$ yum install xz
$ yum install -y make gcc gcc-c++ m4 openssl openssl-devel ncurses-devel unixODBC unixODBC-devel java java-devel
$ yum install perl
安装Erlang
将安装包上传到/usr/local目录
$ cd /usr/local
$ yum install esl-erlang_21.3-1~centos~6_amd64.rpm
$ erl -version
安装RabbitMq
将安装包上传到/usr/local目录
$ cd /usr/local
$ xz -d rabbitmq-server-generic-unix-3.7.13.tar.xz
$ tar -xvf rabbitmq-server-generic-unix-3.7.13.tar
$ mv rabbitmq_server-3.7.13 /usr/local/rabbitmq_server
添加环境变量
$ vim /etc/profile
# 加入以下内容
export RABBITMQ_SERVER_HOME=/usr/local/rabbitmq_server
export PATH=${RABBITMQ_SERVER_HOME}/sbin:$PATH
# 保存后执行以下指令
$ source /etc/profile
启动RabbitMq
启动服务
# 启动后台管理
$ rabbitmq-plugins enable rabbitmq_management
# 后台运行rabbitmq
$ rabbitmq-server -detached
创建用户
$ rabbitmqctl add_user admin 123456
$ rabbitmqctl set_user_tags admin administrator
$ rabbitmqctl set_permissions -p / admin '.*' '.*' '.*'
网友评论