rabbitmq使用

rabbitmq使用:
官方网站:
https://www.rabbitmq.com/

yum install -y erlang
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.4/rabbitmq-server-3.8.4-1.el7.noarch.rpm
rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
yum install rabbitmq-server-3.8.4-1.el7.noarch.rpm
启动:
systemctl start rabbitmq-server
# 设置开机启动
systemctl enable rabbitmq-server
使用:
rabbitmq默认的工作端口为25672

# 启用web管理界面
rabbitmq-plugins enable rabbitmq_management
# guest用户只能用于localhost访问
# 添加新用户及授权
rabbitmqctl add_user fort fort
rabbitmqctl set_user_tags fort administrator
rabbitmqctl set_permissions -p / fort '.*' '.*' '.*'
rabbitmqctl list_permissions
# 访问ip:15672即可进入管理界面

具体使用参考官网教程:

https://www.rabbitmq.com/getstarted.html

mqtest
文件里包含了官网的PHP例子