centos6.5rabbitmq安装搭建
安装rabbitmq需要先安装erlang.rabbitmq3.6版本需要erlang R16B03++版本的支持。
1、准备好安装包
wget http://erlang.org/download/otp_src_19.0.tar.gz
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.5/rabbitmq-server-generic-unix-3.6.5.tar.xz
2.yum 安装需要的类库
yum install ncurses ncurses-base ncurses-devel ncurses-libs ncurses-static ncurses-term ocaml-curses ocaml-curses-devel -y
yum install openssl-devel zlib-devel -y
3.编译安装erlang
tar -xvzf otp_src_19.0.tar.gz cd otp_src_19.0
./configure --prefix=/usr/local/erlang --with-ssl -enable-threads -enable-smmp-support -enable-kernel-poll --enable-hipe --without-javac
make && make install
如果有java 环境 去掉--without-javac
修改/etc/profile
4.配置环境变量#添加下面 export ERLANG_HOME=/usr/local/erlang export PATH=$ERLANG_HOME/bin:$PATH 5.编译安装rabbitmq
xz -d rabbitmq-server-generic-unix-3.6.5.tar.xz
tar -xvf rabbitmq-server-generic-unix-3.6.5.tar
mv rabbitmq_server-3.6.5 /usr/local/
cd /usr/local/rabbitmq_server-3.6.5/sbin
./rabbitmq-server 直接启动 ./rabbitmq-server -detached 后台启动 ./rabbitmq-plugins enable rabbitmq_management 开启插件管理页面 #关闭服务 ./rabbitmqctl stop
[root@localhost sbin]# ./rabbitmqctl add_user test 123456 Creating user "rabbitadmin" ... [root@localhost sbin]# ./rabbitmqctl set_user_tags test administrator Setting tags for user "test" to [administrator] ...