This is a step by step guide to install the Rabbit MQ 3.3.5.1 for the series of topics about AMQP messaging. Rabbit MQ support most of the Linux distributions, Mac OS and MS Windows. I would demonstrate it on CentOS 7 as an example.
1. Install compiler and related if necessary
# sudo yum install gcc glibc-devel make ncurses-devel openssl-devel autoconf
2. Update latest EPEL
# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-1.noarch.rpm # wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm # sudo rpm -Uvh remi-release-7*.rpm epel-release-7*.rpm
3. Install Erlang
# wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm # yum install -y erlang
Type “erl” to verfiy if Erlang is installed correctly.
4. Install Rabbit MQ
# wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.3.5/rabbitmq-server-3.3.5-1.noarch.rpm
Add the necessary keys for verification by
# rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
Install with command
# yum install rabbitmq-server-3.3.5-1.noarch.rpm
Issue command to turn on the web UI plugin
# sudo rabbitmq-plugins enable rabbitmq_management
Change permission
# chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/
Issue following command to start the server (*1)
# /usr/sbin/rabbitmq-server
5. Setup admin user account
In /usr/sbin, create new user “mqadmin” by
# rabbitmqctl add_user mqadmin mqadmin
Issue following command to assign administrator role
# rabbitmqctl set_user_tags mqadmin administrator
Issue command ‘rabbitmqctl set_permissions -p / mqadmin “.*” “.*” “.*” ‘ to grant permission
# rabbitmqctl set_permissions -p / mqadmin ".*" ".*" ".*"
Now you can access the web admin by http://host:15672/ (*2)
Remark:
(*1) You may not start the server with command “service rabbitmq-server start” successfully as documented in official manual, please read this link to resolve https://groups.google.com/forum/#!topic/rabbitmq-users/iK3q4GLpHXY
(*2) The default guest/guest user account can only be accessed via localhost
Version Information
Software | Version | Reference |
CentOS | 7 | http://mirror.centos.org/centos/ |
Erlang | OPT17 | http://www.erlang.org/download.html |
Rabbit MQ | 3.3.5.1 | http://www.rabbitmq.com/install-rpm.html |