yum list | grep epel-release yum -y install epel-release.noarch
#安裝 yum -y install rabbitmq-server #啓動 systemctl start rabbitmq-server.service #查看 systemctl status rabbitmq-server.service
#查看 rabbitmq-plugins list #開啓管理後臺 rabbitmq-plugins enable rabbitmq_management #重啓 systemctl restart rabbitmq-server.service #查看端口 netstat -tunlp |grep 15672 #防火牆端口放開 iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 15672 -j ACCEPT iptables-save > /etc/sysconfig/iptables
帳號:guest 密碼:guestphp
#安裝PHP編譯環境 yum -y install php-devel #安裝依賴數據包 yum -y install librabbitmq-devel #安裝amqp pecl install amqp #修改php配置文件 vim /usr/local/php/etc/php.ini 添加 extension=amqp.so #重啓php-fpm service php-fpm restart
最後查看插件是否安裝成功
vim