没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
Redis windows 测试 redis 持久化功能
还需要在 redis 根目录增加一个 redis 的配置文件 redis.conf,文件具体内容有:
1. # Redis configuration file example
2.
3. # By default Redis does not run as a daemon. Use 'yes' if you need it.
4. # Note that Redis will write a pid file in /var/run/redis.pid when daemonized
.
5. daemonize no
6.
7. # When run as a daemon, Redis write a pid file in /var/run/redis.pid by default
.
8. # You can specify a custom pid file location here.
9. pidfile /var/run/redis.pid
10.
11.# Accept connections on the specified port, default is 6379
12.port 6379
13.
14.# If you want you can bind a single interface, if the bind option is not
15.# specified all the interfaces will listen for connections.
16.#
17.# bind 127.0.0.1
18.
19.# Close the connection after a client is idle for N seconds (0 to disable)
20.timeout 300
21.
22.# Set server verbosity to 'debug'
23.# it can be one of:
24.# debug (a lot of information, useful for development/testing)
25.# notice (moderately verbose, what you want in production probably)
26.# warning (only very important / critical messages are logged)
27.loglevel debug
28.
29.# Specify the log file name. Also 'stdout' can be used to force
30.# the demon to log on the standard output. Note that if you use standard
31.# output for logging but daemonize, logs will be sent to /dev/null
32.logfile stdout
33.
34.# Set the number of databases. The default database is DB 0, you can select
35.# a different one on a per-connection basis using SELECT <dbid> where
36.# dbid is a number between 0 and 'databases'-1
37.databases 16
38.
39.################################ SNAPSHOTTING ########################
#########
40.#
41.# Save the DB on disk:
42.#
43.# save <seconds> <changes>
44.#
45.# Will save the DB if both the given number of seconds and the given
46.# number of write operations against the DB occurred.
47.#
48.# In the example below the behaviour will be to save:
49.# after 900 sec (15 min) if at least 1 key changed
50.# after 300 sec (5 min) if at least 10 keys changed
51.# after 60 sec if at least 10000 keys changed
52.save 900 1
53.save 300 10
54.save 60 10000
55.
56.# Compress string objects using LZF when dump .rdb databases?
57.# For default that's set to 'yes' as it's almost always a win.
58.# If you want to save some CPU in the saving child set it to 'no' but
59.# the dataset will likely be bigger if you have compressible values or keys.
60.rdbcompression yes
61.
62.# The filename where to dump the DB
63.dbfilename dump.rdb
64.
65.# For default save/load DB in/from the working directory
66.# Note that you must specify a directory not a file name.
67.dir ./
68.
69.################################# REPLICATION ##########################
#######
70.
71.# Master-Slave replication. Use slaveof to make a Redis instance a copy of
72.# another Redis server. Note that the configuration is local to the slave
73.# so for example it is possible to configure the slave to save the DB with a
74.# different interval, or to listen to another port, and so on.
75.#
76.# slaveof <masterip> <masterport>
77.
78.# If the master is password protected (using the "requirepass" configuration
79.# directive below) it is possible to tell the slave to authenticate before
剩余13页未读,继续阅读
LauraKuang
- 粉丝: 17
- 资源: 335
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0