- Redis is a software project that implements data structure servers. It is open-source, networked, in-memory, and stores keys with optional durability.
Install the package.
The Redis configuration file is well-documented and located at
- By default, if no "bind" configuration directive is specified, Redis listens for connections from all the network interfaces. it may be preferred to allow only access on the host instead:
- Accept connections on the specified port (default is 6379), specify
port 0to disable listing on TCP:
Listen on socket
Using Redis over a Unix socket may give a performance increase, compared to TCP/IP .
The following changes should be made in
/etc/redis.conf to enable use of the unix socket:
- Enable and update the Redis socket path:
- Set permission to the socket to all members of the redis group:
- Create the directory which contains the socket:
# mkdir /run/redis # chown redis:redis /run/redis # chmod 755 /run/redis
- Persist the directory which contains the socket:
d /run/redis 0755 redis redis -
- Add users (e.g. git, http) to the redis group so they can access and use the socket.
Finally restart the