Upgrade RabbitMQ on Centos 7

What?

I recently had to upgrade RabbitMQ to the latest version (3.7.8) on Centos VM’s. There is that lovely upgrade page on the RabbitMQ website itself https://www.rabbitmq.com/install-rpm.html which is kind of helpful but gave me a hard time because of those Yum repos and version locking. It didn’t want to work at all especially with locking Erlang to a specific version since RabbitMQ 3.7.8 only supports 21.0.x and there are newer versions online. (Which Erlang?)

So I decided to just download the packages I want to install myself and do that instead. Was easier than expected. Happy days!

Finding the packages
Erlang:

You want to go for the stripped down version by RabbitMQ.

https://github.com/rabbitmq/erlang-rpm/releases

Since I needed 21.0.x its: erlang-21.0.9-1.el7.centos.x86_64.rpm

RabbitMQ:

rabbitmq-server-3.7.8-1.el7.noarch.rpm

Upgrade

#Shutdown RabbitMQ… just in case

service rabbitmq-server-stop

#Import Public Signing Key

rpm --import https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc

#Download Erlang package

wget https://github.com/rabbitmq/erlang-rpm/releases/download/v21.0.9/erlang-21.0.9-1.el7.centos.x86_64.rpm

#Install Erlang

rpm -Uvh erlang-21.0.9-1.el7.centos.x86_64.rpm(The "-Uvh" installs the package if it does not exist, otherwise it will just upgrade it and remove the old one. You can use "-U" if you just want to upgrade and remove the old package)

#Download RabbitMQ package

wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.8/rabbitmq-server-3.7.8-1.el7.noarch.rpm

#Install RabbitMQ

rpm -Uvh rabbitmq-server-3.7.8-1.el7.noarch.rpm

#Start RabbitMQ

service rabbitmq-server start