RabbitMQ安装

本文环境:CentOS 6.5(final)

1、更换源(可忽略)

备份

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

下载repo到/etc/yum.repos.d/

wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

生成缓存

yum clean all
yum makecache

2、准备

yum -y install unixODBC unixODBC-devel java libxslt xmlto

3、安装simplejson

wget https://pypi.python.org/packages/source/s/simplejson/simplejson-3.5.3.tar.gz#md5=d5f62dfa6b6dea31735d56c858361d48 --no-check-certificate

tar zxvf simplejson-*.tar.gz
cd simplejson-*
python setup.py build
python setup.py install

4、安装erlang

wget http://www.erlang.org/download/otp_src_17.1.tar.gz
tar zxf otp_src_*.tar.gz
cd otp_*
yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel//需要依赖
./configure --without-javac
make
make install

5、安装rabbitMQ

wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.3.4/rabbitmq-server-3.3.4.tar.gz
tar zxf rabbitmq-server-3.3.4.tar.gz
cd rabbitmq-server-3.3.4
yum -y install xmlto//依赖
make
make install TARGET_DIR=/opt/rabbitmq/ SBIN_DIR=/opt/rabbitmq/sbin MAN_DIR=/opt/rabbitmq/man DOC_INSTALL_DIR=/opt/rabbitmq/doc //将rabbitmq编译到/opt/rabbitmq目录
.sbin/rabbitmq-plugins enable rabbitmq_management //启用页面管理

将rabiitmq/ebin目录下rabbit.app中loopback_users里的<<"guest">>删除

.sbin/rabbitmq-server -detached//服务器后台启动
.sbin/rabbitmqctl stop//停止
访问http://IP:15672/ 用户名/密码 guest/guest

标签: RabbitMQ

相关文章推荐: