sudo yum install -y gcc gcc-c++ glibc-devel make ncurses-devel openssl-devel autoconf java-1.8.0-openjdk-devel git
vi /etc/yum.repos.d/rabbitmq-erlang.repo
[rabbitmq-erlang] name=rabbitmq-erlang baseurl=https://dl.bintray.com/rabbitmq/rpm/erlang/20/el/7 gpgcheck=1 gpgkey=https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc repo_gpgcheck=0 enabled=1
yum install -y erlang
yum install -y socat
rpm -Uvh https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.4/rabbitmq-server-3.7.4-1.el7.noarch.rpm
systemctl start rabbitmq-server systemctl status rabbitmq-server systemctl restart rabbitmq-server #設置爲開機啓動 systemctl enable rabbitmq-server
#安裝web管理頁面插件(先啓動rabbitmq服務): rabbitmq-plugins enable rabbitmq_management
#增長rabbitMQ端口:5672 sudo firewall-cmd --add-port=5672/tcp --zone=public --permanent #增長rabbitMQ端口:15672 sudo firewall-cmd --add-port=15672/tcp --zone=public --permanent #從新加載防火牆設置 sudo firewall-cmd --reload
RabbitMQ從3.3.0開始禁止使用guest/guest訪問除localhost外的地址,若是想使用guest/guest訪問,須要在rabbitmq配置文件中設置loopback_users屬性。java
默認路徑:/usr/lib/rabbitmq/lib/rabbitmq_server-3.7.4/ebin/rabbit.appc++
vi /usr/lib/rabbitmq/lib/rabbitmq_server-3.7.4/ebin/rabbit.app
找到loopback_users屬性,將[<<"guest">>] 修改成 [] git
以後重啓rabbitmqgithub
systemctl restart rabbitmq-server