Centos 5.8 编译安装 rabbitmq 3.7.10 for erlang 19.3
环境:
操作系统:centos 5.8
https://vault.centos.org/5.8/isos/x86_64/
一,安装erlang
下载安装包
http://erlang.org/download/otp_src_19.3.tar.gz
安装步骤
# 解压 tar -zvxf otp_src_22.1.tar.gz cd otp_src_22.1 #编译&安装 ./otp_build autoconf ./configure && make && sudo make install
默认安装在/usr/local/lib/erlang/目录下
配置环境变量
vim /etc/profile # 在最后一行添加如下命令 export PATH=$PATH:/usr/local/lib/erlang/bin:/opt/rabbitmq_server-3.7.10/sbin source /etc/profile
验证
erl -version
二,安装rabbitmq
2.1 下载安装包
https://dl.bintray.com/rabbitmq/all/rabbitmq-server/3.7.10/:rabbitmq-server-generic-unix-3.7.10.tar.xz
2.2 减压
xz -d rabbitmq-server-generic-unix-3.8.0.tar.xz tar -xvf rabbitmq-server-generic-unix-3.8.0.tar mv rabbitmq_server-3.7.10 /opt/
cd /opt
ln -s rabbitmq-server-3.7.10 rabbitmq
2.3启动rabbitmq
rabbitmq-plugins enable rabbitmq_management rabbitmq-server 或 rabbitmq-server -detached(后台运行)
2.4添加新用户
默认账号密码是(guest/guest)
这里新添加账号:admin/admin
rabbitmqctl add_user admin admin rabbitmqctl set_user_tags admin administrator
2.5 停止rabbitmq
rabbitmqctl shutdown
2.6 修改核心配置参数
rabbitmq的核心配置参数在/usr/local/rabbitmq_server-3.8.0/ebin/rabbit.app里
vim /usr/local/rabbitmq_server-3.8.0/ebin/rabbit.app # 找到loopback_users 修改为如下内容(去除 <<"guest">>中<<"">>) {loopback_users, [guest]},
参考:
https://www.cnblogs.com/gaoyanbing/diary/2021/01/19/14299196.html