How to Install Redis on CentOS 7 (Legacy Guide)
Legacy Redis installation notes for CentOS 7, which reached end of life in 2024; use Redis instructions for a supported Linux release for new deployments.
On this page
Legacy system: CentOS Linux 7 reached end of life on June 30, 2024, as listed by the CentOS project. CentOS no longer provides routine updates for it, so running
yum updatedoes not restore current security support. Do not use CentOS 7 for a new Redis deployment. For a supported RPM-based option, see Redis on Rocky Linux 9 or follow the official Redis Linux installation guide.
This page preserves the historical package-based steps for maintaining an existing CentOS 7 host when your organization still provides an approved package source. Package availability and versions depend on that source; the steps below do not imply that CentOS 7 or its Redis packages are currently supported.
Install Redis from an available package source
If the configured repository still provides the Redis package, install it with:
sudo yum install redis
If yum cannot find a package, consult the repository administrator. Do not switch to unverified archives or third-party mirrors for a production server.
Start and test the service
sudo systemctl enable --now redis
sudo systemctl status redis
Test the local service with the Redis client:
redis-cli PING
A healthy local server responds with:
PONGSecure the Redis endpoint
Keep Redis accessible only to trusted application hosts. Before allowing remote connections, verify the listening interfaces, authentication or ACL configuration, and firewall rules. Do not expose TCP port 6379 directly to the public internet. See the official Redis security guide.
For a maintained Linux installation, see Redis Open Source installation instructions.