First, installation1.RABBITMQ is written in Erlang, you need to install Erlang first
wget http://www.rabbitmq.com/releases/erlang/erlang-18.1-1.el6.x86_64.rpm
RPM-IHV erlang-18.1-1.el6.x86_64. Rpm
2. Then go to the official website to download the latest version: Http://www.rabbitmq.com/download.html
The current latest version is 3.6.14
wget https://dl.bintray.com/rabbitmq/rabbitmq-server-rpm/rabbitmq-server-3.6.14-1.el7.noarch.rpm
RPM-IHV rabbitmq-server-3.6.14-1.el7.noarch.rpm
This may cause an error:
Warning:rabbitmq-server-3.6.14-1.el7.noarch.rpm:header V4 rsa/sha512 Signature, key ID 6026dfca:nokey
error:failed dependencies:
Socat is needed by Rabbitmq-server-3.6.14-1.el7.noarch
Solve:
$ yum install-y socat
3. Start
Service/sbin/rabbitmq-server start
Second, the configuration1. Create a user, because the default guest/guest user can only log on locally, create a admin/admin123 with the command line first and make him an administrator.
$/sbin/rabbitmqctl add_user admin admin123
Creating User "admin"
$/sbin/rabbitmqctl set_user_tags admin Administrator
Setting tags for the user "admin" to [Administrator]
2. Then, we enable Web management.
/sbin/rabbitmq-plugins Enable Rabbitmq_management
Now you can use the browser to access the admin console, just log in with the admin you just created, the port is 15672. third, test access
1. If the port is open for direct access to ip:15672
2. If the port is not open, please use the Nginx proxy
#在nginx/conf Directory Creation file
$ vi rabbit.conf
#添加如下内容:
server {
listen ;
server_name rabbit.aikafka.com;
Location/{
proxy_pass http://localhost:15672/;
}
}
#在nginx. conf HTTP module include into rabbit.conf
http{
include rabbit.conf;
....
}
$ nginx-s Reload
Visit: http://rabbit.aikafka.com