centos8 手工安装rabbitmq。
1. 配置:Erlang环境
yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel unixODBC unixODBC-devel httpd
# 下载 erlang
wget http://erlang.org/download/otp_src_21.0.tar.gz
tar -xvf otp_src_21.0.tar.gz
# 重命名文件夹
mv otp_src_21.0 ./erlang
# 进行编译
./configure --prefix=/usr/local/erlang --without-javac
make && make install
配置erlang环境变量 vi /etc/profile
#set erlang enviorment
export PATH=$PATH:/user/local/erlang/bin
# 创建软连接
ln -s /usr/local/erlang/bin/erl /usr/local/bin/erl
# 刷新环境遍历
source /etc/profile
# 验证是否成功
erl
2.安装rabbitmq-server
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.8/rabbitmq-server-generic-unix-3.7.8.tar.xz
yum install xz
xz -d rabbitmq-server-generic-unix-3.7.8.tar.xz
tar -xvf rabbitmq-server-generic-unix-3.7.8.tar
# 随后移动至/usr/local/下 改名rabbitmq:
cp -r rabbitmq_server-3.7.8 /usr/local/rabbitmq
# 添加环境变量
export PATH=/usr/local/rabbitmq/sbin:$PATH
source /etc/profile
3. 启动rabbitmq
#启动后台管理
rabbitmq-plugins enable rabbitmq_management
#运行rabbitmq
rabbitmq-server
# 设置端口访问
iptables -I INPUT -p tcp --dport 15672 -j ACCEPT
#添加用户
rabbitmqctl add_user admin admin
# 添加权限
rabbitmqctl set_permissions -p "/" admin ".*" ".*" ".*"
# 修改角色
rabbitmqctl set_user_tags admin administrator