1.Install Socat _
Online installation depends on the environment:
yum install gccyum install shockedyum install opensslyum install openssl-devel
2. Install Erlang
You can first create a rabbit folder to upload the installation packagemkdir /rabbitmq && cd /rabbitmq#Upload erlang-22.0.7-1.el7.x86_64.rpm installation package upload#install _rpm -ivh erlang-22.0.7-1.el7.x86_64.rpm
3. Install RabbitMQ
cd /rabbitmq#Upload rabbitmq - server-3.7.17-1.el7.noarch.rpm installation package upload#install _rpm -ivh rabbitmq-server-3.7.17-1.el7.noarch.rpm
4. Open the management interface and configuration
#Open the management interfacerabbitmq-plugins enable rabbitmq_management#Configure remote login mq using guestcd /usr/share/doc/rabbitmq-server-3.7.17cp rabbitmq.config.example/etc/rabbitmq/rabbitmq.config#Modify configuration filevi /etc/rabbitmq/rabbitmq.config
Modify the /etc/rabbitmq/rabbitmq.config configuration file:
5. Start
Centos6 uses this command:/sbin/service rabbitmq-server restartCentos7 uses this command:systemctl start rabbitmq-server
6. Configure virtual host and users
6.1. User roles
After RabbitMQ is installed, you can access http://ip address : 15672 ; it comes with the guest/guest username and password; if you need to create a custom user, you can also log in to the management interface and do the following:
Role description :
1. Super administrator (administrator)You can log in to the management console, view all information, and operate users and policies .2. Monitoring _You can log in to the management console and view relevant information about the rabbitmq node ( number of processes, memory usage, disk usage, etc.)3. Policymaker _You can log in to the management console and manage the policy . But the relevant information of the node cannot be viewed ( the part marked by the red box in the figure above ) .4. Ordinary managers (management)You can only log in to the management console, and cannot see node information or manage policies.5. OthersUnable to log in to the management console, usually ordinary producers and consumers.
6.2. Virtual Hosts configuration
Mysql has the concept of a database and can specify user permissions for operations such as libraries and tables . RabbitMQ also has similar permission management; in RabbitMQ, you can create a virtual message server Virtual Host. Each Virtual Host is equivalent to a relatively independent RabbitMQ server, and each VirtualHost is isolated from each other. Exchange , queue , and message cannot communicate with each other. Equivalent to mysql 's db . Virtual Name generally starts with / .