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:
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.
Run the following command for the environment variable to take effect immediately.
This document uses downloading RabbitMQ 3.6.9 from the RabbitMQ official website as an example. If the download link has expired, or if you want to use other RabbitMQ versions, go to rabbitmq-server and learn more about the installation.
10. Run the following command to import the signature key.
rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
yum install rabbitmq-server-3.6.9-1.el7.noarch.rpm
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:
http://Instance public IP:15672
For more information about how to obtain the public IP address of the instance, see Getting Public IP Addresses.
If you see the following page, it indicates that RabbitMQ has been successfully installed.
3. Log in to RabbitMQ with the admin account created in Step 6 and access the RabbitMQ management page, as shown below: