Linux RabbitMQ 安装
安装 erlang
下载 erlang 安装包
wget http://erlang.org/download/otp_src_24.3.tar.gz
解压 erlang 安装包
tar -xvzf /usr/root/otp_src_24.3.tar.gz
安装 erlang 的依赖工具
yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel unixODBC-devel
对 erlang 进行安装环境的配置
cd otp_src_24.3 ./configure --prefix=/usr/local/erlang --without-javac
编译安装
make && make install
验证一下 erlang 是否安装成功了
./bin/erl io:format("hello world~n", []).
配置 erlang 环境变量
vim /etc/profile #添加 #erlang ERL_HOME=/usr/local/erlang PATH=$ERL_HOME/bin:$PATH export ERL_HOME PATH
source /etc/profile
安装 RabbitMQ
下载rpm
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.10.5/rabbitmq-server-3.10.5-1.el8.noarch.rpm
安装rpm
yum install rabbitmq-server-3.10.5-1.el8.noarch.rpm --force --nodeps
开启 web 管理插件
rabbitmq-plugins enable rabbitmq_management
设置开机启动
chkconfig rabbitmq-server on
systemctl enable rabbitmq-server.service
启动服务
service rabbitmq-server start
/bin/systemctl start rabbitmq-server.service
查看服务状态
service rabbitmq-server status
/bin/systemctl status rabbitmq-server.service
访问 RabbitMQ 控制台
http://你的ip地址:15672/
新建用户并授权
[root@bogon rabbitmq]# rabbitmqctl add_user root root Creating user "root" ... [root@bogon rabbitmq]# rabbitmqctl set_user_tags root administrator Setting tags for user "root" to [administrator] ... [root@bogon rabbitmq]# [root@bogon rabbitmq]# rabbitmqctl set_permissions -p / root ".*" ".*" ".*" Setting permissions for user "root" in vhost "/" ...