CentOS Stream 9
Sponsored Link

Valkey : Install2024/12/04

 

Install Valkey that is an in-memory key-value store database forked from the Redis code due to changes in the Redis license.

[1] Install Valkey.
# install from EPEL

[root@dlp ~]#
dnf --enablerepo=epel -y install valkey
[2] Configure basic settings for Valkey.
[root@dlp ~]#
vi /etc/valkey/valkey.conf
# line 88 : listening interface
# localhost only by default
# if you'd like to connect from other Hosts,
# change to the own IP address or set to [0.0.0.0]

127.0.0.1 -::1
# line 139 : listening port

port 6379
# line 308 : daemonize setting
# if you use Valkey as service daemon, turn to [yes]

daemonize no
# line 379 : number of Databases
# database ID is assigned from 0 to (setting value - 1)

databases 16
# line 455 : save caching Database on Disk
# the default settings below means like follows
# after 3600 sec if at least 1 key changed
# after 300 sec if at least 100 keys changed
# after 60 sec if at least 10000 keys changed
# if you'd like to disable this function, comment out all lines to "save ***" or specify [save ""]

# save 3600 1 300 100 60 10000
# line 1082 : authentication password

requirepass password
# line 1430 : alternative persistence mode ("yes" means enabled)
# if enabled, Redis loses high performance but get more safety

appendonly no
# line 1488 : if enabled [appendonly yes] when writing data on Disk
# [no] means do not fsync by Valkey (just let the OS flush the data)

# appendfsync always
appendfsync everysec
# appendfsync no
[root@dlp ~]#
systemctl enable --now valkey

[3] If Firewalld is running and also you use Valkey as a service Daemon, allow service.
[root@dlp ~]#
firewall-cmd --add-service=redis

success
[root@dlp ~]#
firewall-cmd --runtime-to-permanent

success
Matched Content