RabbitMQ message queue-install RabbitMQ3.6.1 (3), rabbitmq-centos7 under Centos7

Source: Internet
Author: User
Tags rabbitmq

RabbitMQ message queue-install RabbitMQ3.6.1 (3), rabbitmq-centos7 under Centos7

If you have read the first two chapters and have some knowledge of RabbitMQ, you are now ready to use it!

System Used

Centos7 is used in this article. To ensure that users who are not familiar with linux can easily get started (avoid sticking to the installation path ).
Develop good habits and install System Operation updates:

Yum update-yreboot // you do not need to restart normally.

Someone asked me if I am a beginner and can use ubuntu? My answer is if you want to use Centos for future production applications, it doesn't matter if you just learn to play. In my company (the top 500 in the world, I won't name it), most production systems use Centos.

Install the dependency file:
yum -y install gcc glibc-devel make ncurses-devel openssl-devel xmlto perl wget
Install the erlang language environment:

Download and install:

Wget http://www.erlang.org/download/otp_src_18.3.tar.gz // download erlang package tar-xzvf otp_src_18.3.tar.gz // unzip cd otp_src_18.3 // switch to the installation path. /configure -- prefix =/usr/local/erlang // production installation configuration make & make install // compile and install

Configure the erlang environment variable:

Vi/etc/profile // Add the following content at the bottom # set erlang environment ERL_HOME =/usr/local/erlang PATH = $ ERL_HOME/bin: $ PATH export ERL_HOME PATHsource/etc/profile // takes effect

Run the erl command on the console to test whether the installation is successful.

Erl // if you enter the erlang shell, the installation is successful and you can exit.
Download and install RabbitMQ:

Download and install

Cd/usr/local // switch to the directory where you plan to install RabbitMQ, I put it here in the/usr/localwget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server-generic-unix-3.6.1.tar.xz // download the RabbitMQ installation package xz--d rabbitmq-server-generic-unix-3.6.1.tar.xztar-xvf rabbitmq-server-generic-unix-3.6.1.tar

After decompression, a folder rabbitmq-server-3.6.1 is added and renamed to rabbitmq for memory.

mv rabbitmq_server-3.6.1/ rabbitmq

Configure the rabbitmq environment variable:

vi /etc/profile    #set rabbitmq environment    export PATH=$PATH:/usr/local/rabbitmq/sbinsource /etc/profile

Start the service:

Rabbitmq-server-detached // start rabbitmq.-detached indicates that the backend daemon is started.

Check the status. If the following information is displayed, the installation is successful:

rabbitmqctl status

Other related commands

Start the service: rabbitmq-server-detached [/usr/local/rabbitmq/sbin/rabbitmq-server-detached] to view the status: rabbitmqctl status [/usr/local/rabbitmq/sbin/rabbitmqctl status] Close the service: rabbitmqctl stop [/usr/local/rabbitmq/sbin/rabbitmqctl stop] list roles: rabbitmqctl list_users
Configure the webpage plug-in:

Create a directory first; otherwise, an error may be reported:

mkdir /etc/rabbitmq

Then enable the plug-in:

rabbitmq-plugins enable rabbitmq_management
Configure the Firewall:

Configure linux port 15672 Web Page Management port 5672 AMQP:

firewall-cmd --permanent --add-port=15672/tcpfirewall-cmd --permanent --add-port=5672/tcpsystemctl restart firewalld.service

Now you can enter the Server IP Address: 15672 in the browser to view the RabbitMQ WEB Management page. Are you very excited? But you don't have an account or password. Don't worry.

Configure the access account password and permissions:

By default, webpage access is not allowed. You need to add a user to modify the permission. The Code is as follows:

Rabbitmqctl add_user superrd // Add a user. The following two parameters are the user name and password. I have used superrd. Rabbitmqctl set_permissions-p/superrd ". *" // Add the permission rabbitmqctl set_user_tags superrd administrator // modify the User Role

Then you can remotely access the database and directly configure user permissions and other information .?
Login: http: // ip: 15672? After logon, delete the guest in admin .?

Congratulations! Your RabbitMQ has been installed!

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.