系统信息
Centos version 6.5
Redis version 2.6.17
错误信息
Redis 日志内错误,一直也没研究,错误如下:
Failed opening .rdb for saving: No such file or directory
修改redis配置
今天仔细看了下,原来是redis.conf内配置的问题,有个配置项写的是相对路径,改成绝对路径就好了
# The working directory. # # The DB will be written inside this directory, with the filename specified # above using the ‘dbfilename’ configuration directive. # # The Append Only File will also be created inside this directory. # # Note that you must specify a directory here, not a file name.
#请自行创建改dir指定的路径。( mkdir -p /opt/webserver/redis/dbf/ ) dir /opt/webserver/redis/dbf/
重新启动
重新启动redis进程 or 服务。查看日志如下:
[1189] 15 May 15:00:11.064 * Max number of open files set to 10032
_._
_.-“__ ”-._
_.-“ `. `_. ”-._ Redis 2.6.17 (00000000/0) 64 bit.-“ .-“`. “`\/ _.,_ ”-._
( ‘ , .-` | `, ) Running in stand alone mode|`-._`-…-` __…-.“-._|’` _.-‘| Port: 6479
| `-._ `._ / _.-‘ | PID: 1189
`-._ `-._ `-./ _.-‘ _.-‘
|`-._`-._ `-.__.-‘ _.-‘_.-‘|
| `-._`-._ _.-‘_.-‘ | http://redis.io
`-._ `-._`-.__.-‘_.-‘ _.-‘
|`-._`-._ `-.__.-‘ _.-‘_.-‘|
| `-._`-._ _.-‘_.-‘ |
`-._ `-._`-.__.-‘_.-‘ _.-‘
`-._ `-.__.-‘ _.-‘
`-._ _.-‘
`-.__.-‘[1189] 15 May 15:00:11.112 # Server started, Redis version 2.6.17
[1189] 15 May 15:00:11.112 * The server is now ready to accept connections on port 6479
0 条评论。