We use Redis for our in-memory datastore and cache.
Installation
Set the repository address of redis and execute the command: yum install epel-release
Installing redis yum install redis
Start redis systemctl start redis
If you want to access the database remotely, you shall open firewall port.(optional)
Set Auto-start execution command on power-up chkconfig redis on
firewall-cmd --zone=public --add-port=6379/tcp –permanent
firewall-cmd --reload
firewall-cmd --list
Bash
6. To set up remote access, you need to modify the configuration file. First, find the location of the redis.config configuration file whereis redis.config then comment bind 127.0.0.1 (change password if you want)
Modify the redis. conf configuration file vim /etc/redis.conf
After the settings are completed systemctl restart redis
Test redis
Enter the redis interactive command line redis-cli
To add data to the database set 'a' 'b’
Redis Troubleshootng
SpringBoot connects to the Redis service, DENIED Redis is running in protected mode because protected mode is enabled Soultion in Config file Modify protected-mode yes to NO
There is an authentication problem. Soultion Be Sure that the authentication password is set auth “p@ssw0rd”
References