centos6/7 安装rabbitmq

前端之家收集整理的这篇文章主要介绍了centos6/7 安装rabbitmq前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

先要安装依赖的包
yum install gcc glibc-devel make ncurses-devel openssl-devel xmlto

进入src
[root@localhost ~]# cd /usr/local/src

一、要安装rabbitmq,首先要先安装erlang
下载地址:http://erlang.org/download/

[root@localhost src]# wget http://erlang.org/download/otp_src_18.3.tar.gz
[root@localhost src]# tar xvf otp_src_18.3.tar.gz cd otp_src_18.3
移动重命名,进入目录
[root@localhost src]# mv otp_src_18.3 ../opt_src
[root@localhost src]# cd ..
[root@localhost local]# cd opt_src
编译
[root@localhost opt_src]# ./configure –prefix=/usr/local/erlang –with-ssl -enable-threads -enable-smmp-support -enable-kernel-poll –enable-hipe –without-javac

[root@localhost opt_src]# ./configure --prefix=/usr/local/erlang --with-ssl -enable-threads -enable-smmp-support -enable-kernel-poll --enable-hipe --without-javac

安装
[root@localhost opt_src]# make && make install
修改环境变量
[root@localhost ~]# vi /etc/profile
[root@localhost ~]# source /etc/profile
查看是否正确安装
[root@localhost ~]# erl
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V7.3 (abort with ^G)
1>

二、安装rabbitmq
下载地址:http://www.rabbitmq.com/releases/rabbitmq-server/
[root@localhost src]# wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.10/rabbitmq-server-generic-unix-3.6.10.tar.xz
解压
[root@localhost src]# xz -d rabbitmq-server-generic-unix-3.6.10.tar.xz
[root@localhost src]# tar -xvf rabbitmq-server-generic-unix-3.6.10.tar
移动并且进入目录
[root@localhost src]# mv rabbitmq_server-3.6.10 ../rabbitmq
将rabbitmq加入环境变量,如下

ERLANG_HOME=/usr/local/erlang
RABBITMQ_HOME=/usr/local/rabbitmq
PATH=$ERLANG_HOME/bin:$RABBITMQ_HOME/sbin:$PATH
export ERLANG_HOME
export RABBITMQ_HOME
export PATH

基本命令 开启管理页面插件 rabbitmq-plugins enable rabbitmq_management 管理页面:http://服务器IP地址:15672/ 启动/关闭 启动命令,该命令ctrl+c后会关闭服务 rabbitmq-server 在后台启动Rabbit rabbitmq-server -detached 关闭服务 rabbitmqctl stop 帐号 查看所有帐号:rabbitmqctl list_users 添加用户:#rabbitmqctl add_user Username Password 新增admin用户:rabbitmqctl add_user admin 123456 分配用户标签:#rabbitmqctl set_user_tags User Tag [administrator]管理员标签:rabbitmqctl set_user_tags admin administrator

猜你在找的CentOS相关文章