How did I fix «Memory overcommit must be enabled» on `redis-server --daemonize yes`?

2023-10-29--18-10-08

WARNING Memory overcommit must be enabled!
Without it, a background save or replication may fail under low memory condition.
Being disabled, it can also cause failures without low memory condition, see github.com/jemalloc/jemalloc/issues/1328.
To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

Step 1

Step 2

reboot