diff -x '*~' -urN redis-2.6.16.orig/redis.conf redis-2.6.16/redis.conf --- redis-2.6.16.orig/redis.conf 2013-08-28 04:36:25.000000000 -0500 +++ redis-2.6.16/redis.conf 2013-11-09 23:00:06.000000000 -0600 @@ -14,11 +14,11 @@ # By default Redis does not run as a daemon. Use 'yes' if you need it. # Note that Redis will write a pid file in /var/run/redis.pid when daemonized. -daemonize no +daemonize yes # When running daemonized, Redis writes a pid file in /var/run/redis.pid by # default. You can specify a custom pid file location here. -pidfile /var/run/redis.pid +pidfile @PREFIX@/var/run/redis.pid # Accept connections on the specified port, default is 6379. # If port 0 is specified Redis will not listen on a TCP socket. @@ -27,7 +27,7 @@ # If you want you can bind a single interface, if the bind option is not # specified all the interfaces will listen for incoming connections. # -# bind 127.0.0.1 +bind 127.0.0.1 # Specify the path for the unix socket that will be used to listen for # incoming connections. There is no default, so Redis will not listen @@ -66,7 +66,7 @@ # Specify the log file name. Also 'stdout' can be used to force # Redis to log on the standard output. Note that if you use standard # output for logging but daemonize, logs will be sent to /dev/null -logfile stdout +logfile @PREFIX@/var/log/redis/redis.log # To enable logging to the system logger, just set 'syslog-enabled' to yes, # and optionally update the other syslog parameters to suit your needs. @@ -105,9 +105,9 @@ # # save "" -save 900 1 -save 300 10 -save 60 10000 +# save 900 1 +# save 300 10 +# save 60 10000 # By default Redis will stop accepting writes if RDB snapshots are enabled # (at least one save point) and the latest background save failed. @@ -122,13 +122,13 @@ # and persistence, you may want to disable this feature so that Redis will # continue to work as usually even if there are problems with disk, # permissions, and so forth. -stop-writes-on-bgsave-error yes +# stop-writes-on-bgsave-error yes # Compress string objects using LZF when dump .rdb databases? # For default that's set to 'yes' as it's almost always a win. # If you want to save some CPU in the saving child set it to 'no' but # the dataset will likely be bigger if you have compressible values or keys. -rdbcompression yes +# rdbcompression yes # Since version 5 of RDB a CRC64 checksum is placed at the end of the file. # This makes the format more resistant to corruption but there is a performance @@ -137,10 +137,10 @@ # # RDB files created with checksum disabled have a checksum of zero that will # tell the loading code to skip the check. -rdbchecksum yes +# rdbchecksum yes # The filename where to dump the DB -dbfilename dump.rdb +# dbfilename dump.rdb # The working directory. # @@ -150,7 +150,8 @@ # The Append Only File will also be created inside this directory. # # Note that you must specify a directory here, not a file name. -dir ./ +# +# dir @PREFIX@/var/db/redis/ ################################# REPLICATION ################################# @@ -179,7 +180,7 @@ # an error "SYNC with master in progress" to all the kind of commands # but to INFO and SLAVEOF. # -slave-serve-stale-data yes +# slave-serve-stale-data yes # You can configure a slave instance to accept writes or not. Writing against # a slave instance may be useful to store some ephemeral data (because data @@ -195,7 +196,8 @@ # such as CONFIG, DEBUG, and so forth. To a limited extend you can improve # security of read only slaves using 'rename-command' to shadow all the # administrative / dangerous commands. -slave-read-only yes +# +# slave-read-only yes # Slaves send PINGs to server in a predefined interval. It's possible to change # this interval with the repl_ping_slave_period option. The default value is 10 @@ -225,7 +227,8 @@ # By default we optimize for low latency, but in very high traffic conditions # or when the master and slaves are many hops away, turning this to "yes" may # be a good idea. -repl-disable-tcp-nodelay no +# +# repl-disable-tcp-nodelay no # The slave priority is an integer number published by Redis in the INFO output. # It is used by Redis Sentinel in order to select a slave to promote into a @@ -240,7 +243,8 @@ # Redis Sentinel for promotion. # # By default the priority is 100. -slave-priority 100 +# +# slave-priority 100 ################################## SECURITY ################################### @@ -364,8 +368,8 @@ # with the better durability guarantees. # # Please check http://redis.io/topics/persistence for more information. - -appendonly no +# +# appendonly no # The name of the append only file (default: "appendonly.aof") # appendfilename appendonly.aof @@ -394,7 +398,7 @@ # If unsure, use "everysec". # appendfsync always -appendfsync everysec +# appendfsync everysec # appendfsync no # When the AOF fsync policy is set to always or everysec, and a background @@ -415,7 +419,8 @@ # # If you have latency problems turn this to "yes". Otherwise leave it as # "no" that is the safest pick from the point of view of durability. -no-appendfsync-on-rewrite no +# +# no-appendfsync-on-rewrite no # Automatic rewrite of the append only file. # Redis is able to automatically rewrite the log file implicitly calling @@ -433,9 +438,9 @@ # # Specify a percentage of zero in order to disable the automatic AOF # rewrite feature. - -auto-aof-rewrite-percentage 100 -auto-aof-rewrite-min-size 64mb +# +# auto-aof-rewrite-percentage 100 +# auto-aof-rewrite-min-size 64mb ################################ LUA SCRIPTING ############################### @@ -453,7 +458,8 @@ # termination of the script. # # Set it to 0 or a negative value for unlimited execution without warnings. -lua-time-limit 5000 +# +# lua-time-limit 5000 ################################## SLOW LOG ################################### @@ -473,38 +479,44 @@ # The following time is expressed in microseconds, so 1000000 is equivalent # to one second. Note that a negative number disables the slow log, while # a value of zero forces the logging of every command. -slowlog-log-slower-than 10000 +# +# slowlog-log-slower-than 10000 # There is no limit to this length. Just be aware that it will consume memory. # You can reclaim memory used by the slow log with SLOWLOG RESET. -slowlog-max-len 128 +# +# slowlog-max-len 128 ############################### ADVANCED CONFIG ############################### # Hashes are encoded using a memory efficient data structure when they have a # small number of entries, and the biggest entry does not exceed a given # threshold. These thresholds can be configured using the following directives. -hash-max-ziplist-entries 512 -hash-max-ziplist-value 64 +# +# hash-max-ziplist-entries 512 +# hash-max-ziplist-value 64 # Similarly to hashes, small lists are also encoded in a special way in order # to save a lot of space. The special representation is only used when # you are under the following limits: -list-max-ziplist-entries 512 -list-max-ziplist-value 64 +# +# list-max-ziplist-entries 512 +# list-max-ziplist-value 64 # Sets have a special encoding in just one case: when a set is composed # of just strings that happens to be integers in radix 10 in the range # of 64 bit signed integers. # The following configuration setting sets the limit in the size of the # set in order to use this special memory saving encoding. -set-max-intset-entries 512 +# +# set-max-intset-entries 512 # Similarly to hashes and lists, sorted sets are also specially encoded in # order to save a lot of space. This encoding is only used when the length and # elements of a sorted set are below the following limits: -zset-max-ziplist-entries 128 -zset-max-ziplist-value 64 +# +# zset-max-ziplist-entries 128 +# zset-max-ziplist-value 64 # Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in # order to help rehashing the main Redis hash table (the one mapping top-level @@ -524,7 +536,8 @@ # # use "activerehashing yes" if you don't have such hard requirements but # want to free memory asap when possible. -activerehashing yes +# +# activerehashing yes # The client output buffer limits can be used to force disconnection of clients # that are not reading data from the server fast enough for some reason (a @@ -559,9 +572,10 @@ # subscribers and slaves receive data in a push fashion. # # Both the hard or the soft limit can be disabled by setting them to zero. -client-output-buffer-limit normal 0 0 0 -client-output-buffer-limit slave 256mb 64mb 60 -client-output-buffer-limit pubsub 32mb 8mb 60 +# +# client-output-buffer-limit normal 0 0 0 +# client-output-buffer-limit slave 256mb 64mb 60 +# client-output-buffer-limit pubsub 32mb 8mb 60 # Redis calls an internal function to perform many background tasks, like # closing connections of clients in timeot, purging expired keys that are @@ -578,13 +592,15 @@ # The range is between 1 and 500, however a value over 100 is usually not # a good idea. Most users should use the default of 10 and raise this up to # 100 only in environments where very low latency is required. -hz 10 +# +# hz 10 # When a child rewrites the AOF file, if the following option is enabled # the file will be fsync-ed every 32 MB of data generated. This is useful # in order to commit the file to the disk more incrementally and avoid # big latency spikes. -aof-rewrite-incremental-fsync yes +# +# aof-rewrite-incremental-fsync yes ################################## INCLUDES ################################### diff -x '*~' -urN redis-2.6.16.orig/redis.sh redis-2.6.16/redis.sh --- redis-2.6.16.orig/redis.sh 1969-12-31 18:00:00.000000000 -0600 +++ redis-2.6.16/redis.sh 2013-11-10 00:30:42.000000000 -0600 @@ -0,0 +1,11 @@ +#!/bin/sh + +export PREFIX="@PREFIX@" +export PATH="$PREFIX/bin:$PATH" +export CONFIG="$PREFIX/etc/redis.conf" + +case "$1" in + start) + sudo -u redis redis-server "$CONFIG" + ;; +esac