echo "deb https://dl.bin$tray.com/rabbitmq/debian xenial main" | sudo tee /etc/apt/sources.list.d/bin$tray.rabbitmq.list wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add - ll apt-get update apt-get install rabbitmq-server apt-get install erlang-nox apt-get remove erlang-nox wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb dpkg -i erlang-solutions_1.0_all.deb apt-get update apt-get install erlang exit apt-get install rabbitmq-server ps -ef | grep rabbit rabbitmq-plugins enable rabbitmq_management whereis rabbitmq rabbitmqctl list_users aptitude show rabbitmq-server aptitude show rabbitmq dpkg -l rabbitmq-server dpkg -L rabbitmq-server rabbitmqctl status apt-get install erlang-nox systemctl enable rabbitmq-server systemctl status rabbitmq-server rabbitmqctl add_user radmin radmin rabbitmqctl set_user_tags radmin administrator rabbitmqctl set_permissions -p / radmin ".*" ".*" ".*" ufw status ufw enable ufw status ufw allow ssh ufw status ufw allow from 10.8.0.0/24 to any port 15672 ufw status ufw disable ufw allow from 10.8.0.0/24 to any port 25672 ufw allow from 10.8.0.0/24 to any port 15672 ufw allow from 10.8.0.0/24 to any port 5672 ufw enable ufw status ufw allow from 172.19.148.0/24 to any port 15672 ufw allow from 172.19.148.0/24 to any port 5672 ufw allow from 172.19.148.0/24 to any port 25672 rabbitmq-plugins enable rabbitmq_mqtt rabbitmq-plugins enable rabbitmq_web_mqtt ufw allow from 172.19.148.0/24 to any port 15675 # 解压文件【/etc/rabbitmq/rabbitmq.config】 cd /etc/rabbitmq ll tar zvxf ./rabbitmq.config.example.gz tar zxf ./rabbitmq.config.example.gz gzip -d ./rabbitmq.config.example.gz rabbitmqctl add_vhost /onlyRemind rabbitmqctl add_user userName password rabbitmqctl list_users rabbitmqctl set_permissions -p /onlyRemind/+ userName ".*" ".*" ".*" rabbitmqctl set_permissions -p /onlyRemind userName ".*" ".*" ".*" rabbitmqctl add_vhost /onlyRemindUpload rabbitmqctl set_permissions -p /onlyRemind userName ".*" ".*" ".*" rabbitmqctl list_users service rabbitmq status service rabbitmq-server status service rabbitmq-server restart rabbitmqctl set_user_tags userName management rabbitmqctl set_permissions -p test userName ".*" ".*" ".*" rabbitmqctl list_users rabbitmqctl list_vhosts service rabbitmq-server restart rabbitmqctl set_global_parameter mqtt_port_to_vhost_mapping '{"1884":"/onlyRemind", "8884":"/onlyRemind"}'
rabbitmq配置
转载请备注引用地址:编程记忆 » rabbitmq配置