Skip to content

Commit 0a2ffe7

Browse files
committed
edit redis.conf
1 parent e76d355 commit 0a2ffe7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

redis.conf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515
# By default Redis does not run as a daemon. Use 'yes' if you need it.
1616
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
17-
daemonize yes
17+
daemonize no
1818

1919
# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
2020
# default. You can specify a custom pid file location here.
21-
pidfile /var/run/redis.pid
21+
pidfile ./log/redis.pid
2222

2323
# Accept connections on the specified port, default is 6379.
2424
# If port 0 is specified Redis will not listen on a TCP socket.
@@ -66,7 +66,7 @@ loglevel notice
6666
# Specify the log file name. Also 'stdout' can be used to force
6767
# Redis to log on the standard output. Note that if you use standard
6868
# output for logging but daemonize, logs will be sent to /dev/null
69-
logfile /var/run/redis.log
69+
logfile ./log/redis.log
7070

7171
# To enable logging to the system logger, just set 'syslog-enabled' to yes,
7272
# and optionally update the other syslog parameters to suit your needs.
@@ -105,9 +105,9 @@ databases 16
105105
#
106106
# save ""
107107

108-
save 900 1
109-
save 300 10
110-
save 60 10000
108+
#save 900 1
109+
#save 300 10
110+
#save 60 10000
111111

112112
# By default Redis will stop accepting writes if RDB snapshots are enabled
113113
# (at least one save point) and the latest background save failed.
@@ -150,7 +150,7 @@ dbfilename dump.rdb
150150
# The Append Only File will also be created inside this directory.
151151
#
152152
# Note that you must specify a directory here, not a file name.
153-
dir ./
153+
dir ./db/
154154

155155
################################# REPLICATION #################################
156156

@@ -607,7 +607,7 @@ ds:write_buffer_size 64
607607
ds:block_size 32
608608
ds:max_open_files 4000
609609
ds:block_restart_interval 16
610-
ds:path ./leveldb
610+
ds:path ./db/leveldb
611611
#rl:ttl,强制设置redis里key的过期时间,仅对rl系列命令有效
612612
rl:ttl 0
613613
#rl:ttlcheck 当key的ttl在此范围内被读取,则过期期间重设置为rl:ttl

0 commit comments

Comments
 (0)