csdn 首发最轻松安装教程:关于centos7 centos8 centos9如何安装erlang和对应版本的rabbitmq

Posted THE PROGRAMMER JIE

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csdn 首发最轻松安装教程:关于centos7 centos8 centos9如何安装erlang和对应版本的rabbitmq相关的知识,希望对你有一定的参考价值。

1.前言:最近做毕业设计,自己装了个虚拟机,但通过各种rpm下载包的方式安装erlang和rabbitmq,总是无法启动或启动失败。琢磨了一番,是erlang相关的包依赖没有自动安装,起码得几十个,由于过于麻烦

下面请看图:

 所以我写了一个redhat Linux系列包括centos全自动安装erlang和rabbitmq的sh脚本,记得用sudo运行,最后只需要用admin 和admin作为密码就可以登录管理界面了!

下面请看源码!

#!/usr/bin/sh

echo "..........................................install relang!..............................."
echo "donwloading repo solution rpm files"
wget https://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
echo "install dependencys for solution rpm file"
yum install epel-release
echo "install repo for erlang"
rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
echo "remove noneed files"
rm -r -f ./erlang-*.rpm
echo "seraching pakage....."
yum list erlang
echo "installing erlang"
yum install -y erlang
echo "serach erlang"
yum list installed erlang
echo "........................install rabbitmq-server!......................................."
echo "import config.................."
rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
rpm --import https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
rpm --import https://packagecloud.io/gpg.key
echo "run autoselect import repo pakage with system version....."
curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | sudo bash
echo "searching rabbitmq-server........"
yum list rabbitmq-server
echo "installing.............."
yum install -y rabbitmq-server
echo "srart rabbitmq-server....."
systemctl start rabbitmq-server
echo "Open the visual management interface"
rabbitmq-plugins enable rabbitmq_management
echo "set admin account with password called admin......
account: admin
password: admin
"
echo "add user"
rabbitmqctl add_user admin admin
echo "set user as manager"
rabbitmqctl set_user_tags admin administrator
echo "allow remote connection"
rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"
echo "restart services"
systemctl restart rabbitmq-server
echo "show users"
rabbitmqctl list_users
echo "compliet! now! you can logon webmanagement instaface with 127.0.0.1:15672"

文字版:文件名:autoinstall_erlang_and_rabbitmq-server.sh

#!/usr/bin/sh

echo "..........................................install relang!..............................."

echo "donwloading repo solution rpm files"

wget https://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm

echo "install dependencys for solution rpm file"

yum install epel-release

echo "install repo for erlang"

rpm -Uvh erlang-solutions-1.0-1.noarch.rpm

echo "remove noneed files"

rm -r -f ./erlang-*.rpm

echo "seraching pakage....."

yum list erlang

echo "installing erlang"

yum install -y erlang

echo "serach erlang"

yum list installed erlang

echo "........................install rabbitmq-server!......................................."

echo "import config.................."

rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc

rpm --import https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey

rpm --import https://packagecloud.io/gpg.key

echo "run autoselect import repo pakage with system version....."

curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | sudo bash

echo "searching rabbitmq-server........"

yum list rabbitmq-server

echo "installing.............."

yum install -y rabbitmq-server

echo "srart rabbitmq-server....."

systemctl start rabbitmq-server

echo "Open the visual management interface"

rabbitmq-plugins enable rabbitmq_management

echo "set admin account with password called admin......

account: admin

password: admin

"

echo "add user"

rabbitmqctl add_user admin admin

echo "set user as manager"

rabbitmqctl set_user_tags admin administrator

echo "allow remote connection"

rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"

echo "restart services"

systemctl restart rabbitmq-server

echo "show users"

rabbitmqctl list_users

echo "compliet! now! you can logon webmanagement instaface with 127.0.0.1:15672"

可以将最后几段admin和admin为名的密码换成你自己的,注意,红色替换的用户名,绿色是密码黄色表示的是sh的echo注释,不管它!

在root用户下才可以复制到Linux系统的终端运行

也可以下载脚本运行,运行脚本使用sudo ./autoinstall_erlang_and_rabbitmq-server.sh

以上是关于csdn 首发最轻松安装教程:关于centos7 centos8 centos9如何安装erlang和对应版本的rabbitmq的主要内容,如果未能解决你的问题,请参考以下文章

CSDN独家首发!万字长文,YOLOv5/v7/v8算法模型yaml文件史上最详细解析与教程!小白也能看懂!掌握了这个就掌握了魔改YOLO的核心!

二本Java小菜鸟轻松斩获网易offer,分享一份CSDN首发Java面经

轻松加愉快的 Kubernetes 安装教程

开发工具首发附注册教程Visual Studio 2019软件安装教程全网首发

❤️手把手教将Java程序部署到Centos7带视频教程肝了十万字全网最详细教程强烈建议收藏❤️

❤️手把手教将Java程序部署到Centos7带视频教程肝了十万字全网最详细教程强烈建议收藏❤️