描述:
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.
[14904] 27 Apr 23:47:51.811 * The server is now ready to accept connections on port 6379
解决:vim /etc/sysctl.conf
添加vm.overcommit_memory=1
运行sysctl -p
再次运行redis-server。
[root@localhost bin]# ./redis-server
[15378] 28 Apr 00:27:08.241 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf
[15378] 28 Apr 00:27:08.242 * Max number of open files set to 10032
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 2.6.12 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in stand alone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 15378
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
[15378] 28 Apr 00:27:08.243 # Server started, Redis version 2.6.12
[15378] 28 Apr 00:27:08.243 * The server is now ready to accept connections on port 6379