Short intro about Redis:
Redis, an acronym for Remote Dictionary Server, is a fast and open-source key-value data store that is stored in memory. The development of Redis began when its creator, Salvatore Sanfilippo, aimed to enhance the scalability of his Italian startup. Over time, Redis evolved into a versatile data store that is used as a database, cache, message broker, and queue.
With sub-millisecond response times, Redis can handle millions of requests per second, making it a valuable tool for real-time applications across industries such as gaming, advertising technology, financial services, healthcare, and the Internet of Things. Redis has become one of the most widely-used open-source engines and has been dubbed the "Most Loved" database by Stack Overflow for five consecutive years. Its lightning-fast performance makes Redis a popular choice for use in caching, session management, gaming leaderboards, real-time analytics, geospatial applications, ride-hailing services, chat/messaging platforms, media streaming, and pub/sub apps.
In the following steps, we will guide you through the installation process of Redis on a Debian server.
You must have shell access with sudo privileged account access to Debian 10 system. First of all, log in to your system and upgrade the current packages.
1st run:
Code: Select all
sudo apt update
Code: Select all
sudo apt upgrade
Code: Select all
sudo apt install redis-server
Code: Select all
sudo systemctl enable redis-server
Code: Select all
maxmemory 256mb
maxmemory-policy allkeys-lru
Code: Select all
sudo systemctl restart redis-server
Code: Select all
sudo apt install php-redis
Code: Select all
sudo phpenmod -v 7.4 -s ALL redis
Use redis-cli tool to verify the connection between the Redis server
Code: Select all
redis-cli
127.0.0.1:6379> ping
PONG
Code: Select all
$ redis-cli info
$ redis-cli info stats
$ redis-cli info server