Install Redis on Debian
Install Redis on Debian
Redis is a key-value database. This guide installs it on Debian 12.
Setup Repositories
Add the Redis repository to APT:
1
2
3
4
sudo apt-get install lsb-release curl gpg
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
sudo chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg
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.list
Note for LXC: If
lsb_releasefails, enablenestingor specify the distro name manually. For Debian 12, usebookworm.
Install Redis
1
2
sudo apt update
sudo apt install redis
The default configuration file is at:
1
sudo nano /etc/redis/redis.conf
Test that Redis is running:
1
redis-cli ping
A successful response returns PONG.
References
This post is licensed under CC BY 4.0 by the author.