redis install and start the warning process

  1, redis installation

    a, the installation package redis downloaded, unpacked, directly into the document root make, this step is finished, make PREFIX = / usr / local / redis install (PREFIX developed installation path)

     b, copy the configuration file to the source bag installation path eg: cp path / redis-5.0.8 / redis.conf path / redis /

 

  2, start redis

     redis installation directory ./bin/redis-server ./redis.conf

 

 3, the warning process starts

   a, when you start redis, reported three warnings, warnings from the solution, and the Internet, only for record

20525:M 05 Apr 2020 18:34:47.429 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.

Solution:

echo "net.core.somaxconn = 1024" > /etc/sysctl.conf

sysctl -p 

  

b, the second warning

 WARNING 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.

Solution:

echo "vm.overcommit_memory=1" >> /etc/sysctl.conf

sysctl vm.overcommit_memory=1

 

c, the third warning

 WARNING 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

  Solution:

echo Never> / SYS / Kernel / mm / transparent_hugepage / Enabled 


Vim   /etc/rc.local    // The following sentence into this file 
   
    echo Never> / SYS / Kernel / mm / transparent_hugepage / Enabled 

Source / etc / RC .local

 

Guess you like

Origin www.cnblogs.com/xiaoshudian/p/12638652.html