InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Ubuntu tutorials

  • How to add a user on Linux with sudo access
  • How to check if a user has password on Linux
  • How to install ViewVC for svn repository on Ubuntu Linux
  • How to setup ssl (https) for your site on Ubuntu Linux
  • Install rabbitmq on Ubuntu Linux
  • LXC (Linux Containers) - quick start tutorial on Ubuntu
  • Linux - command to check swap size
  • Linux - how to add a user using useradd
  • Linux - how to create a large file like 1GB
  • Linux - how to create swap partition
  • Linux - how to remove user from a group
  • Linux - number of cpus (lscpu)
  • Linux du - find disk usage of directories or files
  • NFS client and server handy commands
  • Setup svn repository on AWS Ubuntu with apache auth
  • Ubuntu - check if a service is upstart based
  • Ubuntu - dpkg and apt-get beginner tutorial
  • Ubuntu - find file to package
  • Ubuntu - find where will a package be installed from
  • Ubuntu - how to auto start services on boot using update-rc.d (sysv init)
  • Ubuntu - how to find boot autostart status of a service
  • Ubuntu - reload iptables rules during boot
  • Use x2go to access remote Ubuntu Linux
 
  • Home
  • > Tutorials
  • > Linux

Install rabbitmq on Ubuntu Linux

on Mar 3, 2016

RabbitMQ is an open source message broker software that implements the Advanced Message Queuing Protocol (AMQP). It is written in the Erlang programming language. Here are steps to install rabbitmq on Ubuntu Linux (14.04.3 LTS)

  1. Add rabbitmq public key to trusted keys

    $ wget https://www.rabbitmq.com/rabbitmq-signing-key-public.asc
    $ sudo apt-key add rabbitmq-signing-key-public.asc
    
  2. Update package source list to add rabbitmq source and resynchronize the package index files.

    $ sudo sh -c "echo 'deb http://www.rabbitmq.com/debian/ testing main' > /etc/apt/sources.list.d/rabbitmq.list"
    $ sudo apt-get update
    
  3. Check where will rabbitmq be installed from
    $ apt-cache policy rabbitmq-server
    rabbitmq-server:
      Installed: 3.6.1-1
      Candidate: 3.6.1-1
      Version table:
     *** 3.6.1-1 0
            500 http://www.rabbitmq.com/debian/ testing/main amd64 Packages
            100 /var/lib/dpkg/status
         3.2.4-1 0
            500 http://us-west-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
    
  4. Install rabbitmq
    $ sudo apt-get install rabbitmq-server
    
  5. List rabbitmq-server package version details
    $ dpkg -l rabbitmq-server
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name                           Version              Architecture         Description
    +++-==============================-====================-====================-==================================================================
    ii  rabbitmq-server                3.6.1-1              all                  Multi-protocol messaging broker
    
  6. Look at rabbitmq log files

    $ ls -l /var/log/rabbitmq/
    total 8
    -rw-r--r-- 1 rabbitmq rabbitmq 2285 Mar  3 06:42 rabbit@ip-172-30-0-211.log
    -rw-r--r-- 1 rabbitmq rabbitmq    0 Mar  2 15:14 rabbit@ip-172-30-0-211-sasl.log
    -rw-r--r-- 1 rabbitmq rabbitmq    0 Mar  2 15:14 startup_err
    -rw-r--r-- 1 rabbitmq rabbitmq  362 Mar  2 15:14 startup_log
    $ cat /var/log/rabbitmq/startup_log
    
                  RabbitMQ 3.6.1. Copyright (C) 2007-2016 Pivotal Software, Inc.
      ##  ##      Licensed under the MPL.  See http://www.rabbitmq.com/
      ##  ##
      ##########  Logs: /var/log/rabbitmq/rabbit@ip-172-30-0-211.log
      ######  ##        /var/log/rabbitmq/rabbit@ip-172-30-0-211-sasl.log
      ##########
                  Starting broker... completed with 0 plugins.
    
  7. Check if rabbitmq is setup to auto-start at boot

    $ ls -l /etc/rc*.d/*rabbit*
    lrwxrwxrwx 1 root root 25 Mar  2 15:14 /etc/rc0.d/K20rabbitmq-server -> ../init.d/rabbitmq-server
    lrwxrwxrwx 1 root root 25 Mar  2 15:14 /etc/rc1.d/K20rabbitmq-server -> ../init.d/rabbitmq-server
    lrwxrwxrwx 1 root root 25 Mar  2 15:14 /etc/rc2.d/S20rabbitmq-server -> ../init.d/rabbitmq-server
    lrwxrwxrwx 1 root root 25 Mar  2 15:14 /etc/rc3.d/S20rabbitmq-server -> ../init.d/rabbitmq-server
    lrwxrwxrwx 1 root root 25 Mar  2 15:14 /etc/rc4.d/S20rabbitmq-server -> ../init.d/rabbitmq-server
    lrwxrwxrwx 1 root root 25 Mar  2 15:14 /etc/rc5.d/S20rabbitmq-server -> ../init.d/rabbitmq-server
    lrwxrwxrwx 1 root root 25 Mar  2 15:14 /etc/rc6.d/K20rabbitmq-server -> ../init.d/rabbitmq-server
    

    Presence of these syblinks shows that rabbitmq will start on its own at boot time. Note that rabbitmq is a service based on sysv init. You may also want to visit Ubuntu – how to auto start services on boot using update-rc.d (sysv init).

  8. Check status of rabbitmq-server service

    $ sudo service rabbitmq-server status
    
  9. View rabbitmq system limits in rabbitmq config file.

    $ cat /etc/default/rabbitmq-server
    # This file is sourced by /etc/init.d/rabbitmq-server. Its primary
    # reason for existing is to allow adjustment of system limits for the
    # rabbitmq-server process.
    #
    # Maximum number of open file handles. This will need to be increased
    # to handle many simultaneous connections. Refer to the system
    # documentation for ulimit (in man bash) for more information.
    #
    #ulimit -n 1024
    

    You may want to consider increasing ulimit value in production.

  10. List rabbitmq exchanges

    $ sudo rabbitmqctl list_exchanges
    Listing exchanges ...
    amq.rabbitmq.trace	topic
    amq.rabbitmq.log	topic
    amq.match	headers
    amq.headers	headers
    amq.topic	topic
    amq.direct	direct
    amq.fanout	fanout
    	direct
    
  11. List queues (for fresh install there won’t be any queue)

    $ sudo rabbitmqctl list_queues
    

Related links

RabbitMQ official site

Suggested posts:

  1. How to install phantomjs on Mac
  2. How to install casperjs on Mac
  3. Mac brew – how to find latest available package without installing
  4. PHP echo – comma (,) vs dot (.) performance benchmarks
  5. Ubuntu – how to find boot autostart status of a service
  6. PHP apc – setup and performance benchmarks on Ubuntu Linux
  7. Why and how to log Content-Type in apache access log
  8. How to set up google analytics profiles for domain and sub-domain tracking
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Linux, Tutorials, Ubuntu Linux
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress