RabbitMQ is an open-source message broker based on the Advanced Message Queuing Protocol (AMQP). It features usability, scalability, and high availability with an Erlang-programmed server, and supports multiple clients including Python, Ruby, .NET, Java, JMS, C, PHP, ActionScript, XMPP, STOMP, and AJAX. This document describes how to deploy RabbitMQ on Tencent Cloud CVM.
This document uses the following software as an example to deploy RabbitMQ:
- Linux: Linux operating system. This document uses CentOS 7.7 as an example.
- RabbitMQ Server: open-source message broker. This document uses RabbitMQ Server 3.6.9 as an example.
- Erlang: programming language. This document uses Erlang 19.3 as an example.
- Log in to a Linux instance using standard login method. You can also use other login methods that you are more comfortable with:
- Run the following command to install dependencies.
yum -y install make gcc gcc-c++ m4 ncurses-devel openssl-devel unixODBC-devel
- Run the following command to download the Erlang installation package.
- Run the following command to decompress the Erlang installation package.
tar xzf otp_src_19.3.tar.gz
- Run the following command to create the erlang folder.
- Run the following commands in sequence to compile and install Erlang.
./configure --prefix=/usr/local/erlang --without-javac
make && make install
- Run the following command to open the profile configuration file.
- Press i to enter the edit mode, and append the following at the end of the file.
- Press Esc and enter :wq to save and close the file.
Installing RabbitMQ Server
- Run the following command to download the RabbitMQ Server installation package.
This example uses RabbitMQ 3.6.9 as an example. If the above download link has expired, or if you want to use other RabbitMQ versions, go to rabbitmq-server.
- Run the following command to import the signature key.
rpm --import https:
- Run the following commands in sequence to install RabbitMQ Server.
yum install rabbitmq-server-3.6.9-1.el7.noarch.rpm
- Run the following commands in sequence to enable RabbitMQ autostart and start RabbitMQ.
systemctl enable rabbitmq-server
systemctl start rabbitmq-server
- Run the following command to delete the default guest account of RabbitMQ.
rabbitmqctl delete_user guest
- Run the following command to create an account.
rabbitmqctl add_user Username Password
- Run the following command to set the new account as the admin account.
rabbitmqctl set_user_tags Username administrator
- Run the following command to grant the admin account all permissions.
rabbitmqctl set_permissions -p / Username ".*" ".*" ".*"
- Run the following command to open the Web management page of RabbitMQ.
rabbitmq-plugins enable rabbitmq_management
- Open a browser and visit:
For more information about how to obtain the public IP address of the instance, see Getting Public IP Addresses.
http://Instance public IP:15672
If you see the following page, it indicates that RabbitMQ has been successfully installed.
- Log in to RabbitMQ with the admin account created in Step 6 and access the RabbitMQ management page, as shown below: