环境准备
操作系统:CentOS 6.5
Final RabbitMQ: 3.1.5
Python: 2.7.11
ErLang: R16B02
安装预环境(少什么安装什么)
yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel
安装Python 2.7
安装ErLang
-
下载ErLang并解压
wget http://www.erlang.org/download/otp_src_R16B02.tar.gz
tar -xzvf otp_src_R16B02.tar.gz
-
配置安装
./configure --prefix=/usr/local/erlang --with-ssl -enable-threads -enable-smmp-support -enable-kernel-poll --enable-hipe --without-javac
make && make install
- 设置环境变量
ln -s /usr/local/erlang/bin/erl /usr/local/bin/erl
vi /etc/profile
export ERLANG_HOME=/usr/local/erlang
export PATH=$ERLANG_HOME/bin:$PATH
:wq保存并退出,使环境变量立即生效
source /etc/profile
- 输入erl检查ErLang是否安装成功
退出erl控制台: halt().
安装RabbitMQ-Server
- 安装xmlto依赖包
yum install xmlto
- 下载Rabbit-Server并解压
wget
http://www.rabbitmq.com/releases/rabbitmq-server/v3.5.0/rabbitmq-server-3.5.0.tar.gz
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.5/rabbitmq-server-3.1.5.tar.gz
tar -xzvf rabbitmq-server-3.1.5.tar.gz
- 编译安装
make
make install TARGET_DIR=/usr/local/rabbitmq SBIN_DIR=/usr/local/rabbitmq/sbin MAN_DIR=/usr/local/rabbitmq/man
- 安装web插件管理界面
1.创建目录
mkdir /etc/rabbitmq
2.进入rabbit目录,安装插件
cd /usr/local/rabbitmq/sbin
./rabbitmq-plugins enable rabbitmq_management
启动RabbitMQ-Server
rabbitmq-server start
*登录web管理页面
浏览器打开:localhost:15672 账号密码:guest/guest