我更改了redis的conf,运行,出现了警告:
Warning: no config file specified, using the default config.
In order to specify a config file use 'redis-server /path/to/redis.conf'
警告:没有明确的config文件,使用默认配置。为了明确配置文件请使用'redis-server /path/to/redis.conf'
我琢磨了半天(我比较愚钝),后来明白了,需要用显示命令方式指定redis的conf运行:
#./redis-server ../redis.conf
这样运行后,上个警告消失。
但是还有一个警告:
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.
警告:过量使用内存设置为0!在低内存环境下,后台保存可能失败。为了修正这个问题,请在/etc/sysctl.conf 添加一项 'vm.overcommit_memory = 1' ,然后重启(或者运行命令'sysctl vm.overcommit_memory=1' )使其生效。
这个警告的处理就很简单了,按照他说的,改一下,重启。发现依旧报警告。然后只好再运行一下命令令'sysctl vm.overcommit_memory=1' 。
所有警告排除。这下终于正常运行了!