源码安装之后 报错 Failed to configure LOCALE for invalid locale name
原因是redis 8.0 需要配置字符集
只需要在环境变量中添加
LANG=en_US.utf8 即可,
在配置之前先查看当前系统中存在哪些字符集
locale -a
然后在 /etc/profile 环境变量中添加配置
LANG=en_US.utf8
在启动时还存在以下告警
5161:C 10 Aug 2025 02:30:31.857 # 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 https://github.com/jemalloc/jemalloc/issues/1328.
To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then rebootor run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
在告警中已经给出了解决方案
即是在 /etc/sysctl.conf 文件中添加 vm.overcommit_memory = 1 然后重启
或者执行命令 sysctl vm.overcommit_memory=1