How to Setup memcached on AlmaLinux 8

a) Installing

Install the required packages first.
sudo dnf install memcached libmemcached

b) Enabling Autostart

To tell systemd to start memcached service automatically at boot, enable it.
sudo systemctl enable memcached.service

c) Starting

Start the memcached service.
sudo systemctl start memcached.service
By default, the memcached listens on port 11211.

d) Letting FirewallD to Know

You may have to add the port to the FirewallD‘s allow list, it you need to access it beyond localhost.
sudo firewall-cmd --zone=public --permanent --add-port=11211/tcp
Then reload the FirewallD.
sudo firewall-cmd --reload


Abdullah As-Sadeed
Abdullah As-Sadeed

Prefers coding from scratch. Loves the Linux kernel.

Leave a Reply