CentOS installation configuration RABBITMQ and Nginx forwarding

Source: Internet
Author: User

Installing Erlang

CD/tmpwgethttp//erlang.org/download/otp_src_18.3.tar.gzTar-ZXVF otp_src_18.3.Tar. gz/opt/otp_src_18.3CD/opt/otp_src_18.3Yum-YInstall GCCGlibc-devel MakeNcurses-devel openssl-devel autoconf./configure && Make&& Make InstallLN-s/usr/local/lib/erlang/bin/erl/usr/bin/.LN-s/usr/local/lib/erlang/bin/erl/bin/.

Note

Erlang is installed, and the input Erl can view the version number, but when installing RABBITMQ, it is not possible to install Erlang or the version is not enough.

Then you can use the following code to map, and then ignore the RABBITMQ dependent direct installation

Ln-s/usr/local/lib/erlang/bin/erl/usr/bin/. Ln-s/usr/local/lib/erlang/bin/erl/bin/.

RABBITMQ Installation
1. Go to https://www.rabbitmq.com/download rpm

RPM with--nodeps indicates that dependencies are ignored during installation

CD/--import https://WWW.RABBITMQ.COM/RABBITMQ-SIGNING-KEY-PUBLIC.ASCRPM-IVH rabbitmq-server-3.6. 1-1. noarch.rpm--nodepsservice rabbitmq-server Restart


RABBITMQ add users, Web plugins

123456".*"" . *" ". *" rabbitmq-plugins enable Rabbitmq_managementservice rabbitmq-server Restart

http://{ip}:15672/

RABBITMQ node cluster configuration

1. Add the master, slave IP separately to the host:

A. Viewing the hostname # hostname

B. Modify host # vi/etc/hosts Note: if hostname contains. So as long as the first dot precedes the string
Masterip Masterhostname
Slaveip Slavehostname

2. Record the Cookie:cat/var/lib/rabbitmq/.erlang.cookie of master

3. Stop slave rabbitmq:service rabbitmq-server stop

4. Modify slave's cookie to master: sudo vim/var/lib/rabbitmq/.erlang.cookie

Service rabbitmq-Server startrabbitmqctl stop_apprabbitmqctl join_cluster [email protected]{masterhostname. Split (". ") [0]}rabbitmqctl start_app

Nginx Configuration Rabbitmq

 #/etc/nginx/conf.d/rabbitmq.confserver {listen  80  ;    server_name rabbitmq.jobstreet.com;    #access_log /var/log/rabbitmq_access_log main;    #error_log /var/log/rabbitmq_error_log debug_http;    Client_max_body_size 60M;    Client_body_buffer_size 512k;        Location / {port_in_redirect on; Proxy_pass http:  // localhost:15672;          proxy_redirect off;        Proxy_set_header Host $host;        Proxy_set_header X -real-ip $remote _addr;    Proxy_set_header X -forwarded-for $proxy _add_x_forwarded_for; }}              

Open Rabbitmq.jobstreet.com Direct Access

Note: Remember to add rabbitmq.jobstreet.com to host


CentOS installation configuration RABBITMQ and Nginx forwarding

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.