基于CentOS arm系统源码方式安装RabbitMQ
Rabbit技术公司基于AMQP标准开发的RabbitMQ1.0发布。RabbitMQ采用Erlang 语言开发。
本次环境为Mac M1虚拟机CentOS9 arm
源码安装Erlang
Erlang官网地址
Erlang源码Github Dowanload
1 2 3 4 5 6 7 8 9 10 11 12 13
| yum -y install make gcc gcc-c++ kernel-devel m4ncurses-devel openssl-devel
wget https://github.com/erlang/otp/releases/download/OTP-25.1.2/otp_src_25.1.2.tar.gz
tar -zxvf otp_src_25.1.2.tar.gz cd otp_src_25.1.2
./configure --prefix=/usr/local/erlang --without-javac
make && make install
|
安装RabbitMQ
RabbitMQ官网下载地址
源码Github下载地址
RabbitMQ 和 Erlang/OTP 兼容性对照表安装前确认一下!
1 2 3 4 5 6 7 8 9 10
| wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.10.8/rabbitmq-server-generic-unix-3.10.8.tar.xz
xz -d rabbitmq-server-generic-unix-3.10.8.tar.xz
tar -xvf rabbitmq-server-generic-unix-3.10.8.tar
mv rabbitmq-server-generic-unix-3.10.8/ /usr/local/rabbitmq
|
配置系统环境变量
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| vim /etc/profile
export PATH=$PATH:/usr/local/erlang/bin export PATH=$PATH:/usr/local/rabbitmq/sbin
source /etc/profile
erl 或 erl -v
Erlang/OTP 25 [erts-13.1.2] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [jit]
Eshell V13.1.2 (abort with ^G) 1>
|
RabbitMQ相关命令
1 2 3 4 5 6 7 8 9 10 11 12
| rabbitmq-plugins enable rabbitmq_management
rabbitmq-server start
rabbitmq-server -detached rabbitmqctl start_app
rabbitmq-server stop
rabbitmqctl stop_app
|
添加远端登录账户
1 2 3 4 5 6 7 8
| rabbitmqctl add_user admin 1111
rabbitmqctl set_user_tags admin administrator
rabbitmqctl set_permissions -p "/" admin ".*" ".*" ".*"
rabbitmqctl list_users
|
账号guest具有所有的操作权限,并且又是默认账号,出于安全因素的考虑,guest用户只能通过localhost登陆
测试
浏览器输入:serverip:15672。其中serverip是RabbitMQ-Server所在主机的ip,15672是RabbitMQ-Server的端口号
关于rpm安装方式
使用rpm安装,yum install erlang 与 yum insatll rabbitmq-server提示匹配不到命令,关于CentOS9 arm的没有解决
基于CentOS arm系统源码方式安装RabbitMQ
https://github.com/i-xiaoxin/2022/10/19/基于CentOS arm系统源码方式安装RabbitMQ/