We force "daemonize no" in init script, so daemonize and pidfile does not have any effect in redis.conf. It's init/rc system's job to daemonize programs and handle pidfiles, if it needs it! Applications often communicate with Redis via unix socket, so it's convenient to have it enabled by default. --- a/redis.conf +++ b/redis.conf @@ -112,8 +112,8 @@ # incoming connections. There is no default, so Redis will not listen # on a unix socket when not specified. # -# unixsocket /run/redis.sock -# unixsocketperm 700 +unixsocket /run/redis/redis.sock +unixsocketperm 770 # Close the connection after a client is idle for N seconds (0 to disable) timeout 0 @@ -241,11 +241,6 @@ ################################# GENERAL ##################################### -# 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. -# When Redis is supervised by upstart or systemd, this parameter has no impact. -daemonize no - # If you run Redis from upstart or systemd, Redis can interact with your # supervision tree. Options: # supervised no - no supervision interaction @@ -264,20 +259,6 @@ # # supervised auto -# If a pid file is specified, Redis writes it where specified at startup -# and removes it at exit. -# -# When the server runs non daemonized, no pid file is created if none is -# specified in the configuration. When the server is daemonized, the pid file -# is used even if not specified, defaulting to "/var/run/redis.pid". -# -# Creating a pid file is best effort: if Redis is not able to create it -# nothing bad happens, the server will start and run normally. -# -# Note that on modern Linux systems "/run/redis.pid" is more conforming -# and should be used instead. -pidfile /var/run/redis_6379.pid - # Specify the server verbosity level. # This can be one of: # debug (a lot of information, useful for development/testing) @@ -289,7 +270,7 @@ # Specify the log file name. Also the empty string 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 "" +logfile /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. @@ -441,7 +422,7 @@ # 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 /var/lib/redis ################################# REPLICATION #################################