目錄表

CentOS7/Debian10 安裝 Redis5

CentOS7 安裝啟動程序

Debian10 安裝啟動程序

Redis 啟動檢查

啟動時 redis.log 出現以下需要修正的事項
  1. The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 修正語法
    vi /etc/sysctl.conf
    :
    net.core.somaxconn=1024
  2. overcommit_memory is set to 0! Background save may fail under low memory condition. 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. 修正語法
    vi /etc/sysctl.conf
    :
    vm.overcommit_memory=1
  3. you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled. 修正語法
    vi /etc/rc.d/rc.local
    :
    echo never > /sys/kernel/mm/transparent_hugepage/enabled
    chmod a+x /etc/rc.d/rc.local
  4. 重新開機讓設定生效

參考網址