CentOS7 Erlang RabbitMQ Install and configure remote access

Source: Internet
Author: User
Tags rabbitmq

For the installation of RABBITMQ, I also really wasted some effort, version download a lot, but there are compile problems, compile does not pass, error can not find the cause of errors, even error is * * * such existence.


Other dependencies that I have not tested because I exist in the environment: Python,simplejson, installing


Between RABBITMQ is dependent on the Erlang language.


Erlang installation is more important, version problems, compile problems, there can be no problem, otherwise RABBITMQ is absolutely not installed, that is, binary package can not be used

Can be installed using Yum, I've been looking for a long time to succeed in the following way

1, download source wget http://www.erlang.org/download/otp_src_R16B02.tar.gz
2. Install the Erlang compilation environment:
Yum-y install make GCC gcc-c++ kernel-devel M4 ncurses-devel Openssl-devel

3, Decompression otp_src_R16B02.tar.gz
4, MV Otp_src_r16b02 erlang_r16b #重命名
5. Installing Erlang:
CD erlang_r16b/

./configure--prefix=/usr/erlang-with-ssl-enable-rhreads- Enable-smp-support-enable-kernel-poll-enable-hipe-without-javac

Make && make install
6. Configuring Erlang
Vim/etc/profile
Add export path= at the end $PATH:/usr/local/erlang/bin
Source/etc/profile
7. Testing

Erl command

Exit command line: Halt ().


Installing RABBITMQ Server
1. Download the binary package:

Http://www.rabbitmq.com/releases/rabbitmq-server/v3.5.1/rabbitmq-server-generic-unix-3.5.1.tar.gz

2, Decompression:xz-d rabbitmq-server-generic-unix-3.6.1.tar.xz

Release archive: TAR-XVF Rabbitmq-server-generic-unix-3.6.1.tar

Modified name: MV rabbitmq-server-generic-unix-3.6.1 rabbitmq

3. Configure environment variable Vi/etc/profile

Configuration: Export path= $PATH:/usr/rabbitmq/sbin

Save and make the file effective: Source/erc/profile

4. Operation
Start RABBITMQ
Rabbitmq-server start
Stop
Rabbitmqctl stop
Check whether you are running
Rabbitmqctl status
5. Adding to a startup item
Chkconfig Rabbitmq-server on

———— ———— – Split Line ————————————
configuring system parameters
When RABBITMQ is running in a production environment, in order to be able to handle a significant number of concurrent connections and queues, we need to adjust the resource limits of the system and tune the kernel parameters as appropriate. One of the more important, we need to adjust the setting is a single user can , which can be viewed by ulimit-n. In most Linux systems, the default value for this parameter is lower, typically 1024. In a production environment, we recommend that the parameter value be at least 65536. and 4096 is basically able to meet the requirements of the development environment.
There are actually two places that limit the number of file descriptors: One is the maximum allowable value of the OS kernel (this parameter corresponds to Fs.file-max in Linux), The other is the maximum allowable value per user space (ulimit-n). The value of the first parameter must be greater than the value of the next parameter.
If you want to learn more about how to control system resource limits, you can refer to http://docs.basho.com/riak/latest/ops/tuning/ open-files-limit/

Validation restriction parameters
You can view the number of file descriptors by RABBITMQ the overview option to manage the UI interface. It can also be viewed through the rabbitmqctl status command.
Command Ulimit-a to display the maximum number of file descriptors that can be opened by the current user


Installation Focus:

A lot of problems occur during the installation process

Otp_src_R16B02.tar.gz version package, corresponding to the Rabbitmq-server version package is rabbitmq-server-generic-unix-3.5.1.tar.gz

Rabbitmq-server-generic-unix-3.5.1.tar.gz This package is easy to use, decompression, and configuration can be directly used


And then I tried the other two bags.

Rabbitmq-server-generic-unix-3.6.1.tar.xz

Address: Http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server-generic-unix-3.6.1.tar.xz

Otp_src_18.3.tar.gz

Address: http://erlang.org/download/otp_src_18.3.tar.gz


It is also possible to install the two packages together using the above method



******

After installing the software, and not directly to the external access, the software is given by default account is the guest password is also guest and only local access to login

For external access, the following configuration is necessary, of course, after the configuration of the guest can not be external access, guest only for the internal.

5. Remote Access Configuration

The default webpage is not allowed to access, you need to add a user to modify the permissions, the code is as follows:

Add User: Rabbitmqctl add_user hxb HXB

Add Permissions: Rabbitmqctl set_permissions-p "/" HXB ". *". * "". * "

Modify the user role Rabbitmqctl set_user_tags HXB Administrator

It can then be accessed remotely, and then directly configure user rights and other information.

  

6. RABBITMQ Common Commands

Add_user <UserName> <Password>

Delete_user <UserName>

Change_password <UserName> <NewPassword>

List_users

Add_vhost <VHostPath>

Delete_vhost <VHostPath>

list_vhostsset_permissions [-P <vhostpath>] <UserName> <Regexp> <Regexp> <Regexp>

clear_permissions [-P <vhostpath>] <UserName>

list_permissions [-P <vhostpath>]

List_user_permissions <UserName>

list_queues [-P <vhostpath>] [<queueinfoitem> ...]

list_exchanges [-P <vhostpath>] [<exchangeinfoitem> ...]

list_bindings [-P <vhostpath>]

List_connections [<connectioninfoitem> ...]











CentOS7 Erlang RabbitMQ Install and configure remote access

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.