How To Install Redis on Ubuntu 22.04
Redis:
Redis (REmote DIctionary Server) is an open source, in-memory, NoSQL key/value store that is used primarily as an application cache or quick-response database.
Getting started with Redis
1. System Update
sudo apt update
sudo apt upgrade -y2. Add Redis Official APT Repository
Install required packages:
sudo apt-get install lsb-release curl gpg -yImport Redis GPG key:
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpgSet correct permissions:
sudo chmod 644 /usr/share/keyrings/redis-archive-keyring.gpgAdd Redis repository to APT sources:
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.listUpdate APT cache:
sudo apt-get update2. Add Redis Official APT Repository
4. Enable Redis Service

5. Test Redis Service
Expected output:

Exit:
6. Configure Redis for systemd & Security
Open configuration file:
6.1 Enable systemd supervision
Search or manually add:
6.1 Enable systemd supervision
Find:
Uncomment and modify:
6.3 (Optional) Enable Remote Access
Only if required for external applications:
Save and exit (CTRL+O, Enter, CTRL+X)
Restart Redis:
6.3 (Optional) Enable Remote Access
Output:
Last updated