Installing RabbitMQ on Alpine Linux Latest

In this tutorial, we will go through the steps required to install RabbitMQ on Alpine Linux Latest. We will be using the package manager apk to install RabbitMQ and its dependencies.

Prerequisites

Before starting with the installation steps, ensure that you have the following prerequisites:

Installation Steps

  1. Update the package manager to ensure that you have the latest packages and dependencies:
sudo apk update
  1. Install the erlang and rabbitmq-server packages using the following command:
sudo apk add erlang rabbitmq-server
  1. Once the installation is complete, enable the RabbitMQ service to start automatically on boot:
sudo rc-update add rabbitmq
  1. Start the RabbitMQ service using the following command:
sudo /etc/init.d/rabbitmq start
  1. RabbitMQ is now installed and running on your Alpine Linux Latest instance. To verify that the service is running, type the following command:
sudo rabbitmqctl status

You should see an output similar to the following:

Status of node rabbit@localhost ...
[{pid,1731},
 {running_applications,[{rabbit,"RabbitMQ","3.9.4"},
                        {rabbitmq_amqp1_0,"AMQP 1.0 protocol adapter","3.9.4"},
                        {rabbitmq_auth_backend_cache,"Caching RabbitMQ-auth-server background reader","3.9.4"},
                        {rabbitmq_auth_backend_http,"HTTP-based auth backend provider","3.9.4"},
                        {rabbitmq_auth_backend_ldap,"RabbitMQ LDAP authentication backend","3.9.4"},
                        {rabbitmq_auth_mechanism_ssl,"SSL authentication plugin","3.9.4"},
                        {rabbitmq_aws,"AWS bindings for RabbitMQ","3.9.4"},
                        {rabbitmq_consistent_hash_exchange,"Consistent Hash Exchange Type","3.9.4"},
                        {rabbitmq_event,"RabbitMQ Event Exchange","3.9.4"},
                        {rabbitmq_federation,"Federate exchanges between brokers","3.9.4"},
                        {rabbitmq_federation_management,"Federation Management","3.9.4"},
                        {rabbitmq_jms_topic_exchange,"RabbitMQ JMS Topic Exchange","3.9.4"},
                        {rabbitmq_mqtt,"RabbitMQ MQTT","3.9.4"},
                        {rabbitmq_peer_discovery_aws,"AWS peer discovery backend","3.9.4"},
                        {rabbitmq_peer_discovery_common,"Peer Discovery subsystem dependency","3.9.4"},
                        {rabbitmq_peer_discovery_consul,"Consul peer discovery backend","3.9.4"},
                        {rabbitmq_peer_discovery_etcd,"Etcd peer discovery backend","3.9.4"},
                        {rabbitmq_peer_discovery_k8s,"Kubernetes/Openshift (K/O) peer discovery backend","3.9.4"},
                        {rabbitmq_peer_discovery_test,"Peer Discovery subsystem test support","3.9.4"},
                        {rabbitmq_random_exchange,"Random Exchange Type","3.9.4"},
                        {rabbitmq_recent_history_exchange,"Recent History Exchange Type","3.9.4"},
                        {rabbitmq_sharding,"RabbitMQ Sharding","3.9.4"},
                        {rabbitmq_shovel,"Data movement between brokers","3.9.4"},
                        {rabbitmq_shovel_management,"Shovel management UI plugin","3.9.4"},
                        {rabbitmq_stomp,"Stomp broker adapter","3.9.4"},
                        {rabbitmq_tracing,"RabbitMQ tracing support","3.9.4"},
                        {rabbitmq_trust_store,"RabbitMQ Trust Store","3.9.4"},
                        {rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.9.4"}]},
 {os,{unix,linux}},
 {erlang_version,"23.3.2.0"},
 {memory,[{total,88715552},
          {connection_readers,0},
          {connection_writers,0},
          {connection_channels,0},
          {connection_other,0},
          {queue_procs,0},
          {queue_slave_procs,0},
          {plugins,0},
          {other_proc,7021512},
          {mnesia,82728},
          {mgmt_db,0},
          {msg_index,0},
          {other_ets,0},
          {binary,532192},
          {code,27230360},
          {atom,1354937},
          {other_system,7192287}]},
 {alarms,[{rabbitmq_management,"$management is not running",critical}]},
 {listeners,[{clustering,25672,"::"},{amqp,5672,"::"}]},
 {vm_memory_high_watermark,0.4},
 {vm_memory_limit,2128278528},
 {disk_free_limit,50000000},
 {disk_free,57852492800},
 {file_descriptors,[{total_limit,1048576},
                    {total_used,313},
                    {sockets_limit,943626},
                    {sockets_used,0}]},
 {processes,[{limit,1048576},{used,78}]},
 {run_queue,0},
 {uptime,607},
 {kernel,{net_ticktime,60}}]

Congratulations! You have successfully installed RabbitMQ on Alpine Linux Latest.

Conclusion

This tutorial covered the steps required to install RabbitMQ on Alpine Linux Latest using the package manager apk. Now that you have installed RabbitMQ, you can start using it to build scalable and distributed message-based applications.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!