Redis

This article describes how to install Redis for Ubuntu Linux 20.04.

Install Redis

For correct operation, you will need Redis version 5 or above.

Install redis by running the following command:

sudo apt install redis-server

Configure Redis

начало внимание

You can use the following characters in a password:

  • Capital Latin letters (A to Z)
  • Lowercase Latin letters (a to z)
  • Digits (0 to 9)
  • Symbols: !()-_+=$

конец внимание

  1. Allow connecting to the Redis server by editing the /etc/redis/redis.conf configuration file and adding the machine’s IP address (for example, 192.168.10.10):

sudo nano /etc/redis/redis.conf
bind 127.0.0.1 ::1 192.168.10.10

  1. Increase the maximum number of clients by changing the maxclients parameter’s value to 20000. You also need to uncomment the line (delete the # character):

maxclients 20000

  1. Restart Redis:

sudo systemctl restart redis-server

Connect to Redis

Connection string for Redis:

redis://<redis-server-address>:6379/0

 

Found a typo? Highlight the text, press ctrl + enter and notify us