centos7 rabbitmq-server-3.8.19手动rpm打包安装说明

rabbitmq-server-3.8.19安装说明

由于我们公司客户是内网,不能用yum安装。所以要用rpm下载下来相关依赖包安装。

安装指南

参考官方文档:https://rabbitmq.com/install-rpm.html

安装版本和地址 

1、elrang版本:23.0以上
2、RabbitMQ版本号:RabbitMQ 3.8.19  
  (1)Windows系统: 

https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.19/rabbitmq-server-3.8.19.exe

  (2)CentOs7.0以上系统: 

https://github-releases.githubusercontent.com/924551/523abc00-dd82-11eb-94fc-35d0ebe08227?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210714%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210714T074745Z&X-Amz-Expires=300&X-Amz-Signature=d3c964d154476717c58581cbd4d7ad404f18f562990952cacdf5c1747b99286a&X-Amz-SignedHeaders=host&actor_id=20737708&key_id=0&repo_id=924551&response-content-disposition=attachment%3B%20filename%3Drabbitmq-server-3.8.19-1.el7.noarch.rpm&response-content-type=application%2Foctet-stream

Centos7安装步骤

1.如果能连网,以下是download所有相关包的方法。
(1)查看yum中是否存在3.8.19版本:
yum --showduplicates list rabbitmq-server | expand
(2)Yum 将验证它安装的任何软件包的签名,导入签名密钥。
## primary RabbitMQ signing key
rpm --import https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
## modern Erlang repository
rpm --import https://packagecloud.io/rabbitmq/erlang/gpgkey
## RabbitMQ server repository
rpm --import https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
(3)添加yum的镜像地址,在/etc/yum.repos.d添加一个rabbitmq.repo,内容如下: 

# In /etc/yum.repos.d/rabbitmq.repo

##
## Zero dependency Erlang
##

[rabbitmq_erlang]
name=rabbitmq_erlang
baseurl=https://packagecloud.io/rabbitmq/erlang/el/7/$basearch
repo_gpgcheck=1
gpgcheck=1
enabled=1
# PackageCloud's repository key and RabbitMQ package signing key
gpgkey=https://packagecloud.io/rabbitmq/erlang/gpgkey
       https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

[rabbitmq_erlang-source]
name=rabbitmq_erlang-source
baseurl=https://packagecloud.io/rabbitmq/erlang/el/7/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/rabbitmq/erlang/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

##
## RabbitMQ server
##

[rabbitmq_server]
name=rabbitmq_server
baseurl=https://packagecloud.io/rabbitmq/rabbitmq-server/el/7/$basearch
repo_gpgcheck=1
gpgcheck=1
enabled=1
# PackageCloud's repository key and RabbitMQ package signing key
gpgkey=https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
       https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

[rabbitmq_server-source]
name=rabbitmq_server-source
baseurl=https://packagecloud.io/rabbitmq/rabbitmq-server/el/7/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
(4)进入当前home目录 (快捷命令cd ~),并新建rpms目录
mkdir rpms
(5)下载socat、logrotate和rabbitmq-server安装包放在rpms目录  
yum install -y --downloadonly socat --downloaddir=./rpms/
yum install -y --downloadonly logrotate --downloaddir=./rpms/ 
yum install -y --downloadonly rabbitmq-server --downloaddir=./rpms/
(6)安装rpms下面的所有rpm包  
rpm -ivh ./rpms/*.rpm --force --nodeps
2.如果不能连网,就提前在有网的电脑上下载好上述的签名和rpms包安装!  

Centos7开启管理界面和开机启动

1.开启管理界面  
  进入/usr/lib/rabbitmq/bin目录执行:
rabbitmq-plugins enable  rabbitmq_management
2.开机启动
  依然在bin目录执行:
chkconfig rabbitmq-server on
3.启动服务  
service rabbitmq-server stop
service rabbitmq-server start
4.打开端口  
   需要打开5672和15672两个端口  
firewall-cmd --permanent --add-port=15672/tcp
firewall-cmd --permanent --add-port=5672/tcp
firewall-cmd --reload
//关闭selinux
setsebool -P nis_enabled 1
5.设置外部访问管理界面(只在开发测试环境)  
  由于开发环境要远程访问管理界面,guest不能远程登录,需要添加一个管理员账号才能远程登录。
  添加admin用户,密码admin。直接在命令行执行:
rabbitmqctl  add_user admin admin
授权管理员权限。
rabbitmqctl set_user_tags admin administrator
现在可以远程访问了http://10.10.1.11:15672/登录admin账号就行。 

  • 0
    点赞
  • 1
    收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
©️2022 CSDN 皮肤主题:编程工作室 设计师:CSDN官方博客 返回首页
评论

打赏作者

nakeer

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值