Installation on Ubuntu
sudo apt install -y memcached libmemcached-tools installs the server and a few helper tools, and registers the memcached systemd service started automatically. Verify the binary with memcached -V.
Configuration
Unlike on macOS, Ubuntu provides /etc/memcached.conf, where each line is a flag: -m 64 (memory in MB), -l 127.0.0.1 (listen address), -p 11211 (port). Edit it, then sudo systemctl restart memcached to apply.
Security
The default config binds to 127.0.0.1, which is the safe choice — Memcached has no authentication. If you must listen on a LAN address, restrict access with a firewall and disable UDP (-U 0) to avoid amplification abuse.