源碼安裝之后 報錯 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