安装epel源
rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
#http://mirrors.yun-idc.com/epel/5/x86_64/epel-release-5-4.noarch.rpm
wget -O /etc/yum.repos.d/epel-erlang.repo http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo
安装erlang
yum install erlang xmlto
安装rabbitmq rpm包:
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.5/rabbitmq-server-3.1.5-1.noarch.rpm
rpm -ivh rabbitmq-server-3.1.5-1.noarch.rpm
warning: rabbitmq-server-3.1.5-1.noarch.rpm: Header V4 DSA signature: NOKEY, key ID 056e8e56
Preparing... ########################################### [100%]
1:rabbitmq-server ########################################### [100%]
启动rabbitmq,并验证启动情况
[root@centos-43 rabbitmq]# rabbitmq-server --detached &ps aux |grep rabbitmq
[1] 3266
root 3266 0.0 0.0 63904 1120 pts/0 R 13:58 0:00 /bin/sh /usr/sbin/rabbitmq-server --detached
root 3268 0.0 0.0 61240 740 pts/0 R+ 13:58 0:00 grep rabbitmq
[root@centos-43 rabbitmq]#
RabbitMQ 3.1.5. Copyright (C) 2007-2013 GoPivotal, Inc.
## ## Licensed under the MPL. See http://www.rabbitmq.com/
## ##
########## Logs: /var/log/rabbitmq/rabbit@centos-43.log
###### ## /var/log/rabbitmq/rabbit@centos-43-sasl.log
##########
Starting broker... completed with 0 plugins.
以服务的方式启动
service rabbitmq-server start
检查端口5672是否打开
/sbin/iptables -I INPUT -p tcp --dport 5672 -j ACCEPT
/etc/rc.d/init.d/iptables save
/etc/init.d/iptables restart
/etc/init.d/iptables status
配置开机启动
chkconfg rabbitmq-server on
启用维护插件:
[root@localhost ~]# rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:
mochiweb
webmachine
rabbitmq_web_dispatch
amqp_client
rabbitmq_management_agent
rabbitmq_management
Plugin configuration has changed. Restart RabbitMQ for changes to take effect.
http://www.rabbitmq.com/management.html
The rabbitmq-management plugin provides an HTTP-based API for management and monitoring of your RabbitMQ server, along with a browser-based UI and a command line tool, rabbitmqadmin. Features include:
Declare, list and delete exchanges, queues, bindings, users, virtual hosts and permissions.
Monitor queue length, message rates globally and per channel, data rates per connection, etc.
Send and receive messages.
Monitor Erlang processes, file descriptors, memory use.
Export / import object definitions to JSON.
Force close connections, purge queues.
Web UI :