centos7 安装 Erlang 和 RabbitMq

                                            ERLANG安装

1.安装依赖

1yum -y install gcc glibc-devel make ncurses-devel openssl-devel xmlto perl 2

2.创建software文件夹并进入

1mkdir software 2cd software 3

3.下载Erlang

1wget https://www.rabbitmq.com/releases/erlang/erlang-19.0.4-1.el6.x86_64.rpm 2

4.安装

1rpm -ivh erlang-19.0.4-1.el6.x86_64.rpm 2

5.检查是否配置成功

1erl 2

                                             RabbitMQ安装

1.安装依赖

1yum install socat build-essential openssl openssl-devel unixODBC unixODBC-devel make gcc gcc-c++ kernel-devel m4 ncurses-devel tk tc xz 2

2.进入software

1cd /software 2

3.下载rabbitmq-server安装包

1wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.4.1/rabbitmq-server-3.4.1-1.noarch.rpm 2

4.安装

1rpm -ivh rabbitmq-server-3.4.1-1.noarch.rpm 2

5.查看状态或启动

1systemctl status rabbitmq-server 2

提示未启动,启动服务

1systemctl start rabbitmq-server 2

再来看看

启动成功

6.设置开机启动

1chkconfig rabbitmq-server on 2

7.设置配置文件

1cp /usr/share/doc/rabbitmq-server-3.6.5/rabbitmq.config.example /etc/rabbitmq/ 2mv rabbitmq.config.example rabbitmq.config 3

8.开启用户远程访问

1sed -i 's/%% {loopback_users, \[\]},/{loopback_users, \[\]}/' /etc/rabbitmq/rabbitmq.config 2

9.开启web界面管理工具并重启

1rabbitmq-plugins enable rabbitmq_management 2

1systemctl restart rabbitmq-server 2

 

代码交流 2021