• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Upgrade Redis

Dukemaster

Regular Pleskian
Hi,
thanks to @IgorG one more time for the great tutorial How to install Redis.
Last time I installed Redis 4.0.11 last year and it is running like a charm with no errors for over six months.
Now it's time to upgrade to version 5 (.0.3).
Nowhere on Internet I found a decent instruction how to do it in a way to avoid cross-dependencies and problems.
Would be great if someone could help to do this job as safe as possible. Redis is a special thing. There is no possibility to upgrade it, you have to uninstall Redis completly, or am I wrong?

I thought about the idea perhaps Igor expands his tutorial by an upgrade/update part :cool:
 
Last edited:
Thanks @IgorG for the quick answer.
Do you mean I only have to do it again, without changing something, and it will be also upgraded. No matter that I've a running Redis?
Perhaps I should stop Redis before starting.
 
Yes, new installation over previous should work fine, And yes, stop Redis before starting the upgrade.
 
I do it right now.
I will backup Redis config, which is /etc/redis/6379.conf, and also the /var/lib/redis/6379/appendonly.aof and /var/lib/redis/6379/dump.rdb.
redis-cli
SHUTDOWN SAVE
not connected>
quit
service redis_6379 stop
.....
make test
\o/ All tests passed without errors!
make install
.....
Selected config:
Port : 6379
Config file : /etc/redis/6379.conf
Log file : /var/log/redis_6379.log
Data dir : /var/lib/redis/6379
Executable : /usr/local/bin/redis-server
Cli Executable : /usr/local/bin/redis-cli
Is this ok? Then press ENTER to go on or Ctrl-C to abort.
Copied /tmp/6379.conf => /etc/init.d/redis_6379
Installing service...
Success!
Starting Redis server...
Installation successful!
root@server:~/redis-stable/utils# cd
 
Last edited:
redis_6379.service - LSB: start and stop redis_6379
Loaded: loaded (/etc/init.d/redis_6379; generated)
Active: active (running) since Fri 2019-01-25 10:24:22 CET; 46s ago
Docs: man:systemd-sysv-generator(8)
Process: 1886 ExecStop=/etc/init.d/redis_6379 stop (code=exited, status=0/SUCC
Process: 1912 ExecStart=/etc/init.d/redis_6379 start (code=exited, status=0/SU
Tasks: 4 (limit: 4915)
CGroup: /system.slice/redis_6379.service
└─1924 /usr/local/bin/redis-server 127.0.0.1:6379

Jan 25 10:24:22 server.arox.eu systemd[1]: Starting LSB: start and stop redis_63
Jan 25 10:24:22 server.arox.eu redis_6379[1912]: Starting Redis server...
Jan 25 10:24:22 server.arox.eu systemd[1]: Started LSB: start and stop redis_637
root@server:~#

redis-server --version
Redis server v=5.0.3 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=cc0cb2539f3f903

install the sysfsutils package:
# apt install sysfsutils
and append the lines with that setting to /etc/sysfs.conf:
kernel/mm/transparent_hugepage/enabled = never
and append this two lines in /etc/sysctl.conf
vm.overcommit_memory = 1
net.core.somaxconn = 65535

cat /proc/sys/net/core/somaxconn
65535

cat /sys/kernel/mm/transparent_hugepage/enabled
always madvise [never]

sysctl -a | grep hugepage
sysctl: reading key "net.ipv6.conf.all.stable_secret"
sysctl: reading key "net.ipv6.conf.default.stable_secret"
sysctl: reading key "net.ipv6.conf.eth0.stable_secret"
sysctl: reading key "net.ipv6.conf.eth1.stable_secret"
sysctl: reading key "net.ipv6.conf.lo.stable_secret"
vm.hugepages_treat_as_movable = 0
vm.nr_hugepages = 0
vm.nr_hugepages_mempolicy = 0
vm.nr_overcommit_hugepages = 0

sysctl -a | grep commit
sysctl: reading key "net.ipv6.conf.all.stable_secret"
sysctl: reading key "net.ipv6.conf.default.stable_secret"
sysctl: reading key "net.ipv6.conf.eth0.stable_secret"
sysctl: reading key "net.ipv6.conf.eth1.stable_secret"
sysctl: reading key "net.ipv6.conf.lo.stable_secret"
vm.nr_overcommit_hugepages = 0
vm.overcommit_kbytes = 0
vm.overcommit_memory = 1
vm.overcommit_ratio = 50


and for using Always starting on reboot...I followed this great tutorial for Ubuntu16/18 [it's the last comment by user "raysarebest" - starting with "Just to toss my hat in this ring,..."]

Thanks for help and friendly words @IgorG
successful in all sections...
 
Last edited:
Back
Top