RABBITMQ Installing on Linux

Source: Internet
Author: User
Tags locale rabbitmq

Language environment Installation

First, compile the installation method

1. Environment-dependent installation-if you need to install the Erlang locale with compilation, you need to install C + + compilation.

-y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel unixODBC unixODBC-devel httpd python-simplejson

2.erlang installation of the locale (RABBITMQ is developed in the Erlang distributed language)

installation files get

wget http://erlang.org/download/otp_src_19.2.tar.gz

Unzip the Erlang installation package

tar -xzvf otp_src_19.2.tar.gz

Go to the Erlang directory

cd otp_src_19.2

Compile and install the Erlang locale Prefix=/usr/local/erlang for the installation directory

  ./configure  --prefix=/usr/local/erlang --enable-smp-support --enable-threads --enable-sctp --enable-kernel-poll --enable-hipe --with-ssl --without-javac

Erlang Language Compilation configuration options:

–prefix Specifying the installation directory
–enable-smp-support enable symmetric multi-processing support (abbreviation for symmetric multi-processing symmetric multi-processing structure)

–enable-threads Enabling asynchronous Threading support

–ENABLE-SCTP enable Flow Control protocol support (stream control transmission Protocol, flow-controlled transport protocol)

–enable-kernel-poll enabling the Linux kernel poll

–enable-hipe enable high-performance ERLANG–WITH-SSL enable SSL package –without-javac
No Java compilation

To begin the installation of the compilation:

make && make install 

Configuring the Erlang environment variable

PATH=$PATH:/usr/local/erlang/binsource /etc/profil

Test the success of an Erlang installation

17 [erts-6.2] [source] [smp:2:2] [async-threads:10] [kernel-poll:false]Eshell V6.2 (abort with ^G)

The Erlang installation version number is output

Second, Yum installation method

Root permission to install Erlang

install erlang
Install RABBITMQ (RPM package installation recommended)
rpm -ivh rabbitmq-server-3.6.6-1.el6.noarch.rpm 

Installation will be error-dependent workaround not install dependencies

warning: rabbitmq-server-3.6.6-1.el6.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 6026dfca: NOKEYerror: Failed dependencies: erlang >= R16B-03 is needed by rabbitmq-server-3.6.6-1.el6.noarch socat is needed by rabbitmq-server-3.6.6-1.el6.noarch

Workaround:

Yum-y Install Socat

At this time will be an error without SOCAT package or find Socat package, solution install CentOS epel extension source

Yum-y Install Epel-release

Then execute yum-y install Socat

Reinstall Socat

Then install RPM-IVH rabbitmq-server-3.6.6-1.el6.noarch.rpm installation will be error-dependent workaround not install dependencies

Rpm-i–nodeps rabbitmq-server-3.6.6-1.el6.noarch.rpm

Build configuration file

Cp/usr/share/doc/rabbitmq-server-3.6.6/rabbitmq.config.example/etc/rabbitmq/rabbitmq.config

Start RABBITMQ

Service Rabbitmq-server Start

The error is as follows:

Starting rabbitmq-server:rmdir:failed to remove '/VAR/RUN/RABBITMQ ': Directory not empty
Failed-check/var/log/rabbitmq/startup_{log, _err}
Rabbitmq-server.

Workaround:

ln -s /usr/local/erlang/bin/erl      /usr/bin/erl

If the/usr/bin/erl already exists
View the/var/log/rabbitmq/startup_err file to view the error log

ERROR:EPMD error for Host controller:timeout (timed out)
Or
ERROR:EPMD error for Host bogon:address (cannot connect to Host/port)
RABBITMQ Default User is Bogon

So
Vi/etc/hosts joins a row 127.0.0.1 Bogon

Then again service Rabbitmq-server start starts normally

sh-4.1#/sbin/service rabbitmq-server Start
Starting rabbitmq-server:success
Rabbitmq-server.

Common RABBITMQ Startup commands:

Service RABBITMQ-server StartService RABBITMQ-server stopservice rabbitmq-server statusservice rabbitmq-server rotate-logs|service rabbitmq
          
           -server restartservice rabbitmq
           -server condrestartservice rabbitmq-server try-restartservice RABBITMQ -server reloadservice rabbitmq-server Force-reloadps -ef | grep rabbitmq view RABBITMQ process netstat C14>-ANPLT | grep LISTEN rabbitmq default listener port 15672/5672       
          

Then open the Admin page plugin

rabbitmq-plugins enable rabbitmq_management

Add Administrator account
Rabbitmqctl Add_user rabbitadmin 123456

[yf482@bogon rabbitmq]$ sudo rabbitmqctl add_user rabbitadmin 123456Creating user "rabbitadmin"

Assigning user Tags
Rabbitmqctl set_user_tags rabbitadmin Administrator

sudo rabbitmqctl set_user_tags rabbitadmin administrator Setting tags for user "rabbitadmin" to [administrator] 

Create and assign roles to view and confirm after completing

Rabbitmqctl list_users

[[email protected] rabbitmq]$ sudo rabbitmqctl list_users Listing usersrabbitadmin [administrator]guest [administrator]

Login RABBITMQ Admin Interface

Browser input Address:/HTTP Server IP address: 15672/

User name password: rabbitadmin/123456

RABBITMQ Installing on Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.