-
安装服务(root)
step 1:
启用EPEL:EPEL是一个Fedora Project 推出的 EPEL(Extra Packages for Enterprise Linux),EPEL是RHEL 的 Fedora 软件仓库,把它添上,你就可以获得 RHEL AS 的高质量、高性能、高可靠性,又需要方便易用(关键是免费)的软件包更新功能。我当前使用的是cenos6.3_x86_64
# wget http://mirror.neu.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
安装 epel( -U表示更新)
# rpm -Uvh epel-release-6-8.noarch.rpm -U
step 2:
将erlang的repo文件添加到/ete/yum.repos.d/下
# wget -O /etc/yum.repos.d/epel-erlang.repo http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo
step 3:
安装erlang
# yum update
# yum install erlang
step 4:
确认erlang安装成功
# erl
Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:0] [kernel-poll:false]
Eshell V5.8.5 (abort with ^G)
1>io:format("hello world ~n").
输出 hello world ok 安装erlang完毕
step 5:
安装rabbitmq-server (当前最新版本3.0.2-1)
导入rabbitmq 数字签名key 支持后安装
# rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
# wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.0.2/rabbitmq-server-3.0.2-1.noarch.rpm
# yum install rabbitmq-server-3.0.2-1.noarch.rpm
rabbitmq-server安装完成
第一次安装时没有更新EPEL安装到这里遇到的问题:
提示erlang 版本支持问题
Error: Package: rabbitmq-server-3.0.2-1.noarch (/rabbitmq-server-3.0.2-1.noarch)
Requires: erlang >= R12B-3
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
删除所有相关rpm包后重新按照官方文档安装
-
运行RabbitMQ Server
设置开机自动启动 rabbitmq-server
# chkconfig --level 35 rabbitmq-server on
启动rabbitmq-server [start][stop][etc]
# service rabbitmq-server start
rabbitmqctl status
- 安装插件管理界面
# mkdir -m 777 /etc/rabbitmq/ (如果目录已经存在直接执行 # chmod 777 /etc/rabbitmq/)
# rabbitmq-plugins enable rabbitmq_management
重启rabbitmq-server
# rabbitmqctl stop
# rabbitmq-server start
查看管理端口有没有启动:
# netstat -tnlp|grep 55672
浏览器打开http://IP:55672/mgmt/ 账号密码都是guest,如果局域网无法访问设置防火墙过滤规则或关闭防火墙
参考:
http://www.rabbitmq.com/install-rpm.html
http://njbble.iteye.com/blog/1629142
http://njbble.iteye.com/blog/1629213
http://rpm.pbone.net/index.php3/stat/26/dist/55/size/48688463/name/erlang-R12B-3.3.el5.kb.src.rpm
https://www.erlang-solutions.com/downloads/download-erlang-otp
http://njbble.iteye.com/blog/1629142