rabbitmq消息队列服务安装

2016/05/23 rabbitmq

#RabbitMQ服务安装

##yum方式安装

Install Erlang安装Erlang

RabbitMQ是基于Erlang的,所以首先必须配置Erlang环境.

Erlang提供3个不同的rpm安装包获取方式:

1.Erlang Solutions,包含最新的安装包

https://www.erlang-solutions.com/resources/download.html
https://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/esl-erlang_18.3-1~centos~6_amd64.rpm

2.官方的rpm安装包,时不时更新

http://www.rabbitmq.com/releases/erlang/
http://www.rabbitmq.com/releases/erlang/erlang-18.3-1.el6.x86_64.rpm

3.eple方式,版本较旧

以下是epel源获取方式http://dl.fedoraproject.org/pub/epel/

For EL5:
su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
...
su -c 'yum install foo'


For EL6:
su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm'
...
su -c 'yum install foo'


For EL7:
su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-6.noarch.rpm'
...
su -c 'yum install foo'


wget -O /etc/yum.repos.d/epel-erlang.repo http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo  

yum install erlang

Install RabbitMQ Server安装RabbitMQ服务


rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
#yum install rabbitmq-server-3.6.2-1.noarch.rpm
#yum install rabbitmq-server-3.1.5-1.el6.noarch.rpm 
yum install rabbitmq-server.noarch	

启动rabbitmq服务

chkconfig rabbitmq-server on

service rabbitmq-server start

Customise RabbitMQ Environment Variables

The server should start using defaults. You can customise the RabbitMQ environment. Also see how to configure components.

Note: The server is set up to run as system user rabbitmq. If you change the location of the Mnesia database or the logs, you must ensure the files are owned by this user (and also update the environment variables). 注意:默认将以rabbitmq用户运行

配置文件 Location of rabbitmq.config and rabbitmq-env.conf The location of these files is distribution-specific. By default, they are not created, but expect to be located in the following places on each platform: 默认没有创建配置文件,可以手动创建,配置文件的位置存储位置如下说明

Generic UNIX - $RABBITMQ_HOME/etc/rabbitmq/ Debian - /etc/rabbitmq/ RPM - /etc/rabbitmq/ Mac OS X (Homebrew) - ${install_prefix}/etc/rabbitmq/, the Homebrew prefix is usually /usr/local Windows - %APPDATA%\RabbitMQ\

Port Access运行的端口

SELinux and similar mechanisms may prevent RabbitMQ from binding to a port. When that happens, RabbitMQ will fail to start. Make sure the following ports can be opened:

4369 (epmd), 25672 (Erlang distribution) 5672, 5671 (AMQP 0-9-1 without and with TLS) 15672 (if management plugin is enabled) 61613, 61614 (if STOMP is enabled) 1883, 8883 (if MQTT is enabled) It is possible to configure RabbitMQ to use different ports.


Search

    Table of Contents