redis启动时警告信息去除及简单安全设置

windows: https://github.com/MSOpenTech/redis/releases

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

12645:M 29 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.overcommit_memory=1‘ for this to take effect.

12645:M 29 Jul 23:05:55.767 # 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. Redis must be restarted after THP is disabled.

12645:M 29 Jul 23:05:55.769 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.

12645:M 29 Jul 23:05:55.769 * The server is now 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

启动:

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

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

_._

_.-``__ ‘‘-._

_.-``    `.  `_.  ‘‘-._           Redis 3.0.3 (00000000/0) 64 bit

.-`` .-```.  ```\/    _.,_ ‘‘-._

(    ‘      ,       .-`  | `,    )     Running in standalone mode

|`-._`-...-` __...-.``-._|‘` _.-‘|     Port: 6379

|    `-._   `._    /     _.-‘    |     PID: 12704

`-._    `-._  `-./  _.-‘    _.-‘

|`-._`-._    `-.__.-‘    _.-‘_.-‘|

|    `-._`-._        _.-‘_.-‘    |           http://redis.io

`-._    `-._`-.__.-‘_.-‘    _.-‘

|`-._`-._    `-.__.-‘    _.-‘_.-‘|

|    `-._`-._        _.-‘_.-‘    |

`-._    `-._`-.__.-‘_.-‘    _.-‘

`-._    `-.__.-‘    _.-‘

`-._        _.-‘

`-.__.-‘

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

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

12704:M 29 Jul 23:33:25.616 * The server is now ready to accept connections on port 6379

Redis 未授权访问漏洞————————

漏洞描述:

redis 默认不需要密码即可访问,黑客直接访问即可获取数据库中所有信息,造成严重的信息泄露。

修复方案:

1、绑定需要访问数据库的IP

修改 redis.conf 中的 “bind 127.0.0.1” ,改成需要访问此数据库的IP地址。

bind 192.168.31.202 192.168.31.200

bind 127.0.0.1

2、设置访问密码

在 redis.conf 中找到“requirepass”字段,在后面填上你需要的密码。

注:上述两种方法修改后,需要重启redis才能生效。

时间: 2024-10-10 13:49:12

redis启动时警告信息去除及简单安全设置的相关文章

Tomcat启动时警告:[SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:****' did not find a matching property.

运行Tomcat时发出的警告,但是不影响项目的运行,原因是因为在部署项目时,Tomcat会在动在配置文件server.xml自动生成一行代码.如下: <Context docBase="WebDemo" path="/WebDemo" reloadable="true" source="org.eclipse.jst.jee.server:WebDemo"/></Host>. 默认情况下,Context

metaspliot 5.0.66启动时告警信息

metaspliot 5.0.66启动时告警信息 Microsoft Windows [版本 10.0.18363.535](c) 2019 Microsoft Corporation.保留所有权利. C:\Users\Administrator>msfconsoleC:/metasploit-framework/embedded/lib/ruby/gems/2.6.0/gems/rex-core-0.1.13/lib/rex/compat.rb:376: warning: Win32API i

redis启动时的几个报警错误-redis优化

1)The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128 2)WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcomm

redis 启动时 Warning 警告解决及说明

启动错误 1.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 tak

redis 中的配置文件redis.conf 相关配置信息

知识点有点分散,一点一点记录把:(嘿,这需要极大耐性呢) 1.需要注意:当相关配置中的内存大小需要指定时,通过可能指定的格式为 1k . 5GB.4M等,大小写可以不区分. 2.Redis 默认不是守护进程的方式进行,可以通过该配置项修改,使用 yes 启用守护进程(守护进程是指在后台运行的进程). 3.当 Redis 以守护进程方式运行时,Redis默认会把,Redis默认会把pid写入到/var/run/redis.pid文件中.可以通过pidfile指定 4.指定 Redis监听端口,默认

Redis入门到高可用(二)—— Redis启动及使用

1. 三种启动方式 ♦?  最简启动 ./redis-server 使用Redis默认配置进行启动; ♦?  动态参数启动 * redis-server --port 6380  更改端口为6380并启动 ♦?  配置文件启动 redis-server  configPath (将需要的配置写在配置文件中) 三种方式对比:    生产环境选择配置文件启动    单机多实例配置文件可以用端口区分开 2. Redis客户端连接 ./redis-cli  -h 127.0.0.1 -p 6379 Re

Servlet中的init()方法如何才会在服务器启动时执行

如果要想让 servlet 的 init () 方法在服务器启动 时就被执行,则需要在 web.xml 中相应的 servlet 下配置 1 <?xml version="1.0" encoding="UTF-8"?> 2 <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" 3 xmlns:xsi="http://www.

去除hadoop的启动过程中警告信息

如何去除hadoop的启动过程中警告信息1.由于警告是在执行start-all.sh启动Hadoop时出现的,所以应该查看start-all.sh,执行more start-all.sh可以看到下面代码:if [ -e "$bin/../libexec/hadoop-config.sh" ]; then  . "$bin"/../libexec/hadoop-config.shelse  . "$bin/hadoop-config.sh"fi根据

去除hadoop启动过程中的警告信息

安装完hadoop后启动hadoop 会报一个Warning.解决办法 vi  /etc/profile 进入编辑模式,添加下面这行 export HADOOP_HOME_WARN_SUPPRESS=1 保存退出 立即生效:source /etc/profile 重新启动hadoop 消除警告成功! 去除hadoop启动过程中的警告信息,布布扣,bubuko.com