==打开保护模式==
protected-mode yes
==修改默认6379端口==
port 8793
==禁用或者重命名危险命令==
修改 redis.conf 文件,添加
rename-command FLUSHALL "" rename-command FLUSHDB "" rename-command CONFIG "" rename-command KEYS "" rename-command SHUTDOWN "" rename-command DEL "" rename-command EVAL ""
重命名为"" 代表禁用命令,如想保留命令,可以重命名为不可猜测的字符串,如:rename-command FLUSHALL joYAPNXRPmcarcR4ZDgC
==限制redis 配置文件访问权限==
chmod 600 /<filepath>/redis.conf
--END--