Redis Boot-time warning message removal and simple security settings

Source: Internet
Author: User
Tags redis version

Windows:https://github.com/msopentech/redis/releases



12645:m Jul 23:05:55.764 # Server started, Redis version 3.0.3

12645:m Jul 23:05:55.766 # 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.overcom Mit_memory=1 ' for the take effect.

12645:m 23:05:55.767 # WARNING you are Transparent Huge Pages (THP) support for enabled in your kernel. This would 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 you R/etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.

12645:m Jul 23:05:55.769 # warning:the TCP Backlog setting of 511 cannot be enforced BECAUSE/PROC/SYS/NET/CORE/SOMAXC Onn is set to the lower value of 128.

12645:m 23:05:55.769 * The server is now a ready-to-accept connections on port 6379

==>

# echo "vm.overcommit_memory = 1" >>/etc/sysctl.conf or Sysctl Vm.overcommit_memory=1

# echo never >/sys/kernel/mm/transparent_hugepage/enabled

# echo "Net.core.somaxconn = 511" >>/etc/sysctl.conf or echo 511 >/proc/sys/net/core/somaxconn


Start:

[Email protected] ~]# redis-server/etc/redis.conf

12704:m Jul 23:33:25.615 * Increased maximum number of open files to 10032 (it is originally set to 1024).

_._

_.-' __ '-._

_.-``    `.  `_. "-._ Redis 3.0.3 (00000000/0)

.-`` .-```. ' \ \ _.,_ '-._

(',.-' | ',) Running in standalone mode

| '-._ '-...-' __...-. '-._| '     ' _.-' | port:6379

|     '-._ '. _/_.-' | pid:12704

'-._ '-._ '-./_.-' _.-'

| '-._ '-._ '-.__.-' _.-' _.-' |

|           '-._ '-._ _.-' _.-' | Http://redis.io

'-._ '-._ '-.__.-' _.-' _.-'

| '-._ '-._ '-.__.-' _.-' _.-' |

| '-._ '-._ _.-' _.-' |

'-._ '-._ '-.__.-' _.-' _.-'

'-._ '-.__.-' _.-'

'-._ _.-'

'-.__.-'


12704:m Jul 23:33:25.616 # Server started, Redis version 3.0.3

12704:m Jul 23:33:25.616 * DB loaded from disk:0.000 seconds

12704:m 23:33:25.616 * The server is now a ready-to-accept connections on port 6379




Redis Unauthorized Access Vulnerability ————————

Vulnerability Description:

Redis does not require a password to access it by default, and hackers can access all the information in the database, causing serious information leaks.

Fix solution:

1. Bind IP that requires access to the database

Modify the "Bind 127.0.0.1" in redis.conf to the IP address that requires access to this database.


Bind 192.168.31.202 192.168.31.200

Bind 127.0.0.1


2. Set Access password

Find the "requirepass" field in redis.conf and fill in the password you need in the back.

Note: After modifying the above two methods, it is necessary to restart Redis to take effect.


This article is from the "Attitude decides everything" blog, please make sure to keep this source http://relearn.blog.51cto.com/2605709/1696731

Redis Boot-time warning message removal and simple security settings

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.