Linux under RABBITMQ Server Setup

Source: Internet
Author: User
Tags rabbitmq

System environment

Operating system: CentOS6.9

ERLANG:OTP 19.3

Rabbitmq:rabbitmq-server 3.6.12 Installation steps to install Erlang

1, installation Pre-environment

Install the following components from Yum to run the command:

[Email protected] erlang]# yum-y install make gcc gcc-c++ kernel-devel M4 ncurses-devel Openssl-devel


2. Download the source code file of Erlang and unzip it

Run the following command to unzip.

[Email protected] softwares]# TAR-XVF otp_src_19.3.tar.gz

Then, run the following command to rename the folder to Erlang.

[Email protected] softwares]# mv otp_src_19.3./erlang


3, configuring the installation

The first is./configure, check the compilation environment and configure the installation path, run the following command:

[Email protected] erlang]#/configure--prefix=/usr/erlang--without-javac

Then make, compile the source code and run the following command:

[[email protected] erlang]# make

Finally, make install, start the installation, and run the following command:

[[email protected] erlang]# make install


4, setting environment variables

Run the following command to edit the/etc/profile file.

[Email protected] erlang]# Vim/etc/profile

Append the following to the end.

Save, and then run the following command to make the environment variable effective immediately.

[Email protected] erlang]# Source/etc/profile


5. Verify that the installation is successful

Run the following command to verify that Erlang is installed successfully.

[Email protected] erlang]# Erl


Installing Rabbitmq-server

1. Download RPM Package and install

Run the following command to start installing the RPM package.

[Email protected] softwares]# RPM-IVH rabbitmq-server-3.6.12-1.el6.noarch.rpm

You may encounter the following issues:

Workaround:

http://blog.csdn.net/yunfeng482/article/details/72853983


2, setting environment variables

Run the following command to edit the/etc/profile file.

[Email protected] softwares]# Vim/etc/profile

Append the following to the end.

Save, and then run the following command to make the environment variable effective immediately.

[Email protected] erlang]# Source/etc/profile


3. Turn on web monitoring

First, run the following command to turn on RABBITMQ

[Email protected] rabbitmq]# Rabbitmq-server

After CTRL + C cancels the process, run the following command to turn on web monitoring.

[Email protected] rabbitmq]# Rabbitmq-plugins enable rabbitmq_management


4, start

Once web monitoring is turned on, we can officially launch RABBITMQ.

There are two ways to start the RABBITMQ.

The first method is to run the Rabbitmq-server command directly.

But this way, once the terminal exits, the RABBITMQ service stops, so it is not recommended to do so.

The second method is to run the service rabbitmq-server XXX command.

Service Rabbitmq-server Start #启动

Service Rabbitmq-server Stop #停止

Service Rabbitmq-server Restart #重启

Service Rabbitmq-server Status #查看状态

Service Rabbitmq-server etc #查看有哪些命令可以使用

At the same time, add rabbitmq-server to the boot-up service and run the following command:

[Email protected] bin]# chkconfig rabbitmq-server on

The best practice is the second approach. Precautions

1,RPM-IVH rabbitmq-server-3.6.12-1.el6.noarch.rpm times the following error?

error:failed Dependencies:erlang >= r16b-03 are needed by Rabbitmq-server-3.6.6-1.el6.noarch socat are needed by rabbit Mq-server-3.6.6-1.el6.noarch

Solution: http://blog.csdn.net/yunfeng482/article/details/72853983


2, running service Rabbitmq-server start has been unable to start, prompting '/usr/lib/rabbitmq/bin/rabbitmq-server:line 50:erl:command not found '?

Workaround:

Because the environment variable is different, the command cannot be found, follow the instructions to soft-connect Erlang's Erl to the/usr/bin directory, and run the following command.

[Email protected] bin]# ln-s/usr/erlang/bin/erl/usr/bin/erl Reference

    1. Erlang Official website: http://www.erlang.org/downloads
    2. RABBITMQ Official website: http://www.rabbitmq.com/download.html

Linux under RABBITMQ Server Setup

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.