http://www.rabbitmq.com/install-rpm.html

Overview

rabbitmq-server is included in Fedora. However, the versions included are often quite old. You will probably get better results installing the .rpm from our website. Check the Fedora package details for which version of the server is available for which versions of the distribution.

We also upload our RPM packages to PackageCloud and Bintray.

Supported Distributions

Below is a list of supported RPM-based distributions as of RabbitMQ 3.6.3:

  • CentOS 6.x and 7.x (note: there are two separate RPM packages for 6.x and 7.x)
  • RedHat Enterprise Linux 6.x and 7.x (same as for CentOS, there are two separate packages)
  • Fedora 23 through 25 (use the RHEL 7.x package)

The packages may work on other RPM-based distributions if dependencies (see below) are satisfied (e.g. using the Wheezy backports repository) but their testing and support is done on a best effort basis.

Install Erlang

Before installing RabbitMQ, you must install a supported version of Erlang/OTP. We strongly recommend using a packaged version. There are three suggested sources for Erlang packages:

  • We produce a package stripped down to only provide those components needed to run RabbitMQ. It may not be as up to date as Erlang Solutions' packages, but it might be easiest to use if installing Erlang's dependencies is proving difficult.
  • Erlang Solutions produces packages that are usually up to date. They produce two sets of packages - ones which are split up and are more convenient to use if you can add a yum repository, and a monolithic package which might be easier if you have to download manually.
  • EPEL ("Extra Packages for Enterprise Linux"); part of the Red Hat / Fedora organisation, provides many additional packages, including Erlang. These are the most official packages, and are split into many small packages, but are not always up to date.

Install zero-dependency Erlang from RabbitMQ

  1. Download and install the zero dependency Erlang RPM package for running RabbitMQ. As the name suggests, the package strips off some Erlang modules and dependencies that are not essential for running RabbitMQ.

Install Erlang from the EPEL repository or

  1. Follow the steps in the EPEL FAQ to enable EPEL on your machine.
  2. Issue the following command as 'root':
    yum install erlang

Install Erlang from the Erlang Solutions repository or

  1. Follow the instructions under "Installation using repository" at Erlang Solutions.

Install monolithic Erlang from Erlang Solutions or

  1. Download and install the appropriate esl-erlang RPM from Erlang Solutions.
  2. Download and install the esl-erlang-compat RPM (direct download) produced by Jason McIntosh.

    This is needed since Erlang Solutions' monolithic packages provide "esl-erlang"; this package just requires "esl-erlang" and provides "erlang".

Install RabbitMQ Server

With rpm and Downloaded RPM

After downloading the server package, issue the following command as 'root':

rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
yum install rabbitmq-server-3.6.9-1.noarch.rpm

Our public signing key is also available from Bintray.

Using PackageCloud RPM Repository

PackageCloud installs packages via HTTPS and signs them using their GPG key. There are multiple ways to install:

  • Provided installation scripts
  • Using PackageCloud Chef cookbook
  • Using PackageCloud Puppet module
  • Manually

See PackageCloud RabbitMQ repository instructions.

Run RabbitMQ Server

Customise RabbitMQ Environment Variables

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

Start the Server

The server is not started as a daemon by default when the RabbitMQ server package is installed. To start the daemon by default when the system boots, as an administrator runchkconfig rabbitmq-server on.

As an administrator, start and stop the server as usual using /sbin/service rabbitmq-server stop/start/etc.

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).

Port Access

SELinux, and similar mechanisms may prevent RabbitMQ from binding to a port. When that happens, RabbitMQ will fail to start. Firewalls can prevent nodes and CLI tools from communicating with each other. Make sure the following ports can be opened:

  • 4369: epmd, a peer discovery service used by RabbitMQ nodes and CLI tools
  • 5672, 5671: used by AMQP 0-9-1 and 1.0 clients without and with TLS
  • 25672: used by Erlang distribution for inter-node and CLI tools communication and is allocated from a dynamic range (limited to a single port by default, computed as AMQP port + 20000). See networking guide for details.
  • 15672: HTTP API clients and rabbitmqadmin (only if the management plugin is enabled)
  • 61613, 61614: STOMP clients without and with TLS (only if the STOMP plugin is enabled)
  • 1883, 8883: (MQTT clients without and with TLS, if the MQTT plugin is enabled
  • 15674: STOMP-over-WebSockets clients (only if the Web STOMP plugin is enabled)
  • 15675: MQTT-over-WebSockets clients (only if the Web MQTT plugin is enabled)

It is possible to configure RabbitMQ to use different ports and specific network interfaces.

Default user access

The broker creates a user guest with password guest. Unconfigured clients will in general use these credentials. By default, these credentials can only be used when connecting to the broker as localhost so you will need to take action before connecting from any other machine.

See the documentation on access control for information on how to create more users, delete the guestuser, or allow remote access to the guest user.

Controlling System Limits on Linux

RabbitMQ installations running production workloads may need system limits and kernel parameters tuning in order to handle a decent number of concurrent connections and queues. The main setting that needs adjustment is the max number of open files, also known as ulimit -n. The default value on many operating systems is too low for a messaging broker (eg. 1024 on several Linux distributions). We recommend allowing for at least 65536 file descriptors for user rabbitmq in production environments. 4096 should be sufficient for most development workloads.

There are two limits in play: the maximum number of open files the OS kernel allows (fs.file-max) and the per-user limit (ulimit -n). The former must be higher than the latter.

On distributions that use systemd, the OS limits are controlled via a configuration file at /etc/systemd/system/rabbitmq-server.service.d/limits.conf, for example:

[Service]
LimitNOFILE=300000

The most straightforward way to adjust the per-user limit for RabbitMQ on distributions that do not use systemd is to edit the rabbitmq-env.conf to invoke ulimit before the service is started.

ulimit -S -n 4096

This soft limit cannot go higher than the hard limit (which defaults to 4096 in many distributions). The hard limit can be increased via /etc/security/limits.conf. This also requires enabling the pam_limits.somodule and re-login or reboot.

Note that limits cannot be changed for running OS processes.

For more information about controlling fs.file-max with sysctl, please refer to the excellent Riak guide on open file limit tuning.

Verifying the Limit

RabbitMQ management UI displays the number of file descriptors available for it to use on the Overview tab.

rabbitmqctl status

includes the same value.

The following command

cat /proc/$RABBITMQ_BEAM_PROCESS_PID/limits

can be used to display effective limits of a running process. $RABBITMQ_BEAM_PROCESS_PID is the OS PID of the Erlang VM running RabbitMQ, as returned by rabbitmqctl status.

Configuration Management Tools

Configuration management tools (e.g. Chef, Puppet, BOSH) provide assistance with system limit tuning. Our developer tools guide lists relevant modules and projects.

Managing the Broker

To stop the server or check its status, etc., you can use package-specific scripts (e.g. the service tool) or invoke rabbitmqctl (as an administrator). It should be available on the path. All rabbitmqctl commands will report the node absence if no broker is running.

  • Invoke rabbitmqctl stop to stop the server.
  • Invoke rabbitmqctl status to check whether it is running.

More info on rabbitmqctl.

Logging

Output from the server is sent to a RABBITMQ_NODENAME.log file in the RABBITMQ_LOG_BASE directory. Additional log data is written to RABBITMQ_NODENAME-sasl.log.

The broker always appends to the log files, so a complete log history is retained.

You can use the logrotate program to do all necessary rotation and compression, and you can change it. By default, this script runs weekly on files located in default /var/log/rabbitmq directory. See/etc/logrotate.d/rabbitmq-server to configure logrotate.

centos7 rabbitmq 安装的更多相关文章

  1. centos7 rabbitmq安装/配置

    原文:centos7 rabbitmq安装/配置     因为RabbitMQ是由erlang实现的,所以要先安装erlang再安装rabbitMQ   1.先配置yum软件源地址EPEL(EPEL是 ...

  2. centos7 rabbitmq安装以及应用

    安装单机rabbitmq   1.安装erlang cd /usr.local yum install wget yum install net-tools wget http://erlang.or ...

  3. Linux(CENTOS7) RabbitMq安装

    RabbitMQ是一个在AMQP协议标准基础上完整的,可服用的企业消息系统.它遵循Mozilla Public License开源协议,采用 Erlang 实现的工业级的消息队列(MQ)服务器,Rab ...

  4. 使用专业的消息队列产品rabbitmq之centos7环境安装

      我们在项目开发的时候都不可避免的会有异步化的问题,比较好的解决方案就是使用消息队列,可供选择的队列产品也有很多,比如轻量级的redis, 当然还有重量级的专业产品rabbitmq,rabbitmq ...

  5. [转]centos7环境安装rabbitMQ

    使用专业的消息队列产品rabbitmq之centos7环境安装 http://www.cnblogs.com/huangxincheng/p/6006569.html CentOS7上安装Rabbit ...

  6. RabbitMQ消息队列(三)-Centos7下安装RabbitMQ3.6.1

    如果你看过前两章对RabbitMQ已经有了一定了解,现在已经摩拳擦掌,来吧动手吧! 用什么系统 本文使用的是Centos7,为了保证对linux不太熟悉的伙伴也能轻松上手(避免折在安装的路上),下面是 ...

  7. 【rabbitmq】Centos7 下安装rabbitmq

    rabbitmq安装 rabbitmq的安装依赖erlang,首先应该先安装erlang,然后安装rabbitmq: Step1:安装erlang erlang-rpm安装教程 选择在Centos7 ...

  8. centos7下安装rabbitmq

    RabbitMQ: RabbitMQ是流行的开源消息队列系统,是AMQP(Advanced Message Queuing Protocol高级消息队列协议)的标准实现,用erlang语言开发.Rab ...

  9. centos7环境安装rabbitMQ

    使用专业的消息队列产品rabbitmq之centos7环境安装 http://www.cnblogs.com/huangxincheng/p/6006569.html [源码安装,适用GNOME + ...

随机推荐

  1. Linux系统——本地定制化yum仓库部署

    1)开启yum仓库配置文件 /etc/yum.conf的keepcache功能 (开启一个新的虚拟机) 将keepcache=0改为1,修改配置文件后重新清空缓存(1默认下载的安装包不删除,才可以实现 ...

  2. 1.MySQL必知必会之数据库基础

    下面这几个是几个关于数据库的关键字的概念,为后面的教程做基础的: 数据库:保存有组织的数据的容器(通常是一个文件或一组文件).   表: 某种特定类型数据的结构化清单.   模式:关于数据库和表的布局 ...

  3. 如何做好Web接口测试

    说说我在测试接口时遇到的一些需要注意的点: 1.接口返回:数据格式是否与预期一致.例如:要求返回json格式的数据,json数据的key命名是否正确,对应的value是否与数据库一致.需要转换的数据是 ...

  4. C语言基础温故

    一.C语言中数组动态增长有哪些方法? 1.在原数组单元后面是没法再扩长的,因为后面的单元没法保证一定有.所以,数组原址动态增长肯定是不行的: 2.要么定义长一点的数组,要么自已把N个数组用链表串起来, ...

  5. 对Spring Ioc 以及DI的精彩理解

    转:http://blog.csdn.net/cyjs1988/article/details/50352916 学习过spring框架的人一定都会听过Spring的IoC(控制反转) .DI(依赖注 ...

  6. go panic recover 异常处理

    Go语言追求简洁优雅,所以,Go语言不支持传统的 try…catch…finally 这种异常,因为Go语言的设计者们认为,将异常与控制结构混在一起会很容易使得代码变得混乱.因为开发者很容易滥用异常, ...

  7. powershell 设置环境变量 -- go 单元测试 exit status 3221225781

    执行单元测试时出错 go test -run TestImage 错误提示如下: exit status 3221225781 这个错误的意思是需要加载对应的库文件找不到,加载对应的库文件就习. 但是 ...

  8. Linux安全基线检查脚本

    基线检查内容: 一:共享账号检查 配置名称:用户账号分配检查,避免共享账号存在配置要求:1.系统需按照实际用户分配账号; 2.避免不同用户间共享账号,避免用户账号和服务器间通信使用的账号共享.操作指南 ...

  9. php7不支持curl

    百度出来的东西没有一个有用的 终极解决方案: 1.将extension=curl前的分号去掉: 2.将php目录下的libssh2.dll放到apache安装目录的bin目录下 3.重启apache ...

  10. Hive表的修改Alter

    1.查看创建表的信息 [show create table] hive> show create table student; OK createtab_stmt CREATE TABLE `s ...