Skip to content
Runbook

Install Memcached on Fedora / RHEL

High-performance, distributed in-memory cache for key-value data.

Cachecachein-memorykey-valuedistributed

Installation

Server (Fedora repositories) · dnf
sudo dnf install -y memcached

Verify the installation

Verify
memcached -V

Service

Start
sudo systemctl start memcached
Stop
sudo systemctl stop memcached
Status
sudo systemctl status memcached
Restart
sudo systemctl restart memcached
On boot
sudo systemctl enable memcached

Important files

TypePathDescription
config/etc/sysconfig/memcachedService options: PORT, USER, MAXCONN, CACHESIZE, OPTIONS.

Default ports

11211

Command-line tools

  • memcachedThe cache server daemon.

Uninstall

Uninstall
sudo systemctl stop memcached
sudo dnf remove -y memcached

Good to know

  • Fedora configures Memcached through /etc/sysconfig/memcached (CACHESIZE in MB, OPTIONS for extra flags).
  • Set OPTIONS="-l 127.0.0.1" to bind to localhost only; Memcached has no authentication.
  • Apply changes with sudo systemctl restart memcached.

Installation on Fedora

sudo dnf install -y memcached installs the server. Enable and start it with sudo systemctl enable --now memcached. Verify the binary with memcached -V.

Configuration

Fedora reads service options from /etc/sysconfig/memcached: PORT, USER, MAXCONN, CACHESIZE (in MB), and OPTIONS for extra flags. For example, add OPTIONS="-l 127.0.0.1 -U 0" to bind to localhost and disable UDP. Apply with sudo systemctl restart memcached.

Security

Memcached has no authentication. Keep it bound to 127.0.0.1 (via OPTIONS), and never expose port 11211 to untrusted networks. Disabling UDP (-U 0) avoids being used in amplification attacks.