From 2776f415ea25795ec53890d33efcfd6699e21adb Mon Sep 17 00:00:00 2001 From: xiaoz Date: Fri, 11 Dec 2020 03:06:02 +0000 Subject: [PATCH] fix bug --- install_rabbitmq.sh | 82 ++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/install_rabbitmq.sh b/install_rabbitmq.sh index 15ffa34..289d284 100644 --- a/install_rabbitmq.sh +++ b/install_rabbitmq.sh @@ -1,42 +1,42 @@ -#!/bin/bash -##### name:rpm包安装rabbitMQ ##### - -#参考教程:https://jingyan.baidu.com/article/c275f6bae21a0ca23c75672d.html -#https://www.rabbitmq.com/install-rpm.html#package-dependencies -#https://www.rabbitmq.com/install-rpm.html#install-erlang -#https://github.com/rabbitmq/erlang-rpm/releases - -#安装依赖 -function depend(){ - yum -y update - yum -y install wget curl socat -} - -#下载并安装rpm包 -function install_rpm(){ - wget https://github.com/rabbitmq/erlang-rpm/releases/download/v23.1.5/erlang-23.1.5-1.el7.x86_64.rpm - wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.9/rabbitmq-server-3.8.9-1.el7.noarch.rpm - rpm -ivh v23.1.5/erlang-23.1.5-1.el7.x86_64.rpm - rpm -ivh rabbitmq-server-3.8.9-1.el7.noarch.rpm -} - -#启动服务并安装插件 -function instal_plugins(){ - #启动服务 - systemctl start rabbitmq-server - systemctl enable rabbitmq-server - #安装插件 - rabbitmq-plugins enable rabbitmq_management -} - -#防火墙放行端口 -function pass_firewalld(){ - firewall-cmd --zone=public --add-port=15672/tcp --permanent - firewall-cmd --reload -} - -#执行函数进行安装 -depend -install_rpm -instal_plugins +#!/bin/bash +##### name:rpm包安装rabbitMQ ##### + +#参考教程:https://jingyan.baidu.com/article/c275f6bae21a0ca23c75672d.html +# https://www.rabbitmq.com/install-rpm.html#package-dependencies +# https://www.rabbitmq.com/install-rpm.html#install-erlang +# https://github.com/rabbitmq/erlang-rpm/releases + +#安装依赖 +function depend(){ + yum -y update + yum -y install wget curl socat +} + +#下载并安装rpm包 +function install_rpm(){ + wget https://github.com/rabbitmq/erlang-rpm/releases/download/v23.1.5/erlang-23.1.5-1.el7.x86_64.rpm + wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.9/rabbitmq-server-3.8.9-1.el7.noarch.rpm + rpm -ivh v23.1.5/erlang-23.1.5-1.el7.x86_64.rpm + rpm -ivh rabbitmq-server-3.8.9-1.el7.noarch.rpm +} + +#启动服务并安装插件 +function instal_plugins(){ + #启动服务 + systemctl start rabbitmq-server + systemctl enable rabbitmq-server + #安装插件 + rabbitmq-plugins enable rabbitmq_management +} + +#防火墙放行端口 +function pass_firewalld(){ + firewall-cmd --zone=public --add-port=15672/tcp --permanent + firewall-cmd --reload +} + +#执行函数进行安装 +depend +install_rpm +instal_plugins pass_firewalld \ No newline at end of file