安装rabbitmq
1、创建文件夹
mkdir rabbitmq cd rabburmq
2、安装Erlang
a、在安装RabbitMQ之前,必须安装受支持的Erlang / OTP 版本。在基于RPM的发行版中,Erlang软件包有三种常用的资源。
3 、RabbitMQ Erlang版本要求
When installing with Yum, all dependencies other than Erlang/OTP should be resolved and installed automatically as long as compatible versions are available. When that's not the case, dependency packages must be installed manually.
However, when installing a local RPM file via yum dependencies must be installed manually. The dependencies are:
- erlang: a supported version of Erlang can installed from a number of repositories
- socat
- logrotate
4、Erlang 版本下载
Erlang Yum Repository from Erlang Solutions
Follow the instructions under "Installation using repository" at Erlang Solutions. Note that Erlang Solutions tend to provide cutting edge Erlang versions that may or may not be supported by RabbitMQ. Version locking (see below) is recommended when Erlang installed using this option.
2019_10_09_16:47:28[root@izbp18tnigcymjlz2mm69lz rabbitmq]# rpm -ihv esl-erlang_22.1.2-1_centos_7_amd64.rpm 2019_10_09_16:47:28warning: esl-erlang_22.1.2-1_centos_7_amd64.rpm: Header V4 RSA/SHA256 Signature, key ID a14f4fca: NOKEY 2019_10_09_16:47:28Preparing... ################################# [100%] 2019_10_09_16:47:28Updating / installing... 2019_10_09_16:47:34 1:esl-erlang-22.1.2-1 ################################# [100%] 2019_10_09_16:47:34Erlang OTP 22.1.2 installed 2019_10_09_16:47:37[root@izbp18tnigcymjlz2mm69lz rabbitmq]# erl 2019_10_09_16:47:37Erlang/OTP 22 [erts-10.5.2] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe] 2019_10_09_16:47:37 2019_10_09_16:47:37Eshell V10.5.2 (abort with ^G) 2019_10_09_16:47:391> 2019_10_09_16:47:39[4]+ Stopped erl 2019_10_09_16:47:44[root@izbp18tnigcymjlz2mm69lz rabbitmq]# ls 2019_10_09_16:47:44esl-erlang_22.1.2-1_centos_7_amd64.rpm esl-erlang_R16B03-6_centos_6_amd64.rpm rabbitmq-release-signing-key.asc rabbitmq-server-3.8.0-1.el7.noarch.rpm rabbitmq-server-3.8.0-1.el7.noarch.rpm.asc 2019_10_09_16:47:55[root@izbp18tnigcymjlz2mm69lz rabbitmq]# rpm -ivh rabbitmq-server-3.8.0-1.el7.noarch.rpm 2019_10_09_16:47:55Preparing... ################################# [100%] 2019_10_09_16:47:55Updating / installing... 2019_10_09_16:47:55 1:rabbitmq-server-3.8.0-1.el7 ################################# [100%]
5、快速安装脚本
Using PackageCloud Yum Repository
A Yum repository with RabbitMQ packages is available from PackageCloud.
A quick way to install is to use a Package Cloud-provided script. Package Cloud also can be used to install a recent Erlang version via yum.
There are more installation options available:
- Using PackageCloud Chef cookbook
- Using PackageCloud Puppet module
- Manually
See PackageCloud RabbitMQ repository instructions.
6、安装rabbitmq
导入密钥 # import the new PackageCloud key that will be used starting December 1st, 2018 (GMT) rpm --import https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey # import the old PackageCloud key that will be discontinued on December 1st, 2018 (GMT) rpm --import https://packagecloud.io/gpg.key