Linux下安装erlang以及RabbitMQ的步骤

本文详细介绍如何在Linux环境下安装及配置RabbitMQ消息中间件,包括安装Erlang环境、RabbitMQ服务及其Web插件,并介绍了基本的管理命令。

RabbitMQ官网:Messaging that just works — RabbitMQhttps://www.rabbitmq.com/

 Erlang官网:Erlang Programming LanguageErlang Programming Languagehttps://www.erlang.org/

 先在RabbitMQ官网中下载需要的包

 由于RabbitMQ基于Erlang开发,所以需要同时安装Erlang环境。可以在linux中通过

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

命令获取rpm包,然后使用

rpm -Uvh 包名来解压安装包 然后通过yum install -y erlang安装。等待安装完成后,可以使用

erl -v  命令查看是否安装成功以及版本号。 

退出erlang命令行方法:halt().

由于RabbitMQ还依赖socat 所以还要通过

yum install -y socat安装此依赖
socat安装完成后,通过 rpm -Uvh 解压RabbitMQ命令解压安装包

再使用 yum install rabbitmq-server -y 命令安装即可

systemctl start rabbitmq-server 启动RabbitMQ

systemctl status rabbitmq-server 查看MQ状态

设置开机自启 systemctl enable rabbitmq-server

停止服务 systemctl stop rabbitmq-server

安装web插件

 可以通过rabbitmq-plugins enable rabbitmq_management命令安装WEB插件,安装成功后,可通过ip地址:15672访问web管理界面。默认账号密码为都为guest 。但此账号只能通过本机访问。若为远程服务器或虚拟机,则无法使用。此时需要通过命令添加用户并赋予权限。

添加用户 rabbitmqctl add_user admin admin 后两个单词为账号密码 把add_user变为change_password 可用于修改密码 改为list_users可查看有多少用户

赋予账号管理员权限 rabbitmqctl set_user_tags admin administrator 

经典计算机操作系统教材第三版,详细内容可见亚马逊。https://www.amazon.com/Computer-Systems-Programmers-Perspective-Engineering/dp/0134123832/ref=sr_1_2?ie=UTF8&qid=1541476471&sr=8-2&keywords=computer+systems+a+programmer's+perspectiveComputer systems: A Programmer’s Perspective explains the underlying elements common among all computer systems and how they affect general application performance. Written from the programmer’s perspective, this book strives to teach readers how understanding basic elements of computer systems and executing real practice can lead them to create better programs. Spanning across computer science themes such as hardware architecture, the operating system, and systems software, the Third Edition serves as a comprehensive introduction to programming. This book strives to create programmers who understand all elements of computer systems and will be able to engage in any application of the field--from fixing faulty software, to writing more capable programs, to avoiding common flaws. It lays the groundwork for readers to delve into more intensive topics such as computer architecture, embedded systems, and cyber security. This book focuses on systems that execute an x86-64 machine code, and recommends that programmers have access to a Linux system for this course. Programmers should have basic familiarity with C or C++. Personalize Learning with MasteringEngineeringMasteringEngineering is an online homework, tutorial, and assessment system, designed to improve results through personalized learning. This innovative online program emulates the instructor’s office hour environment, engaging and guiding students through engineering concepts with self-paced individualized coaching With a wide range of activities available, students can actively learn, understand, and retain even the most difficult concepts.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值