Managing Redis Server configurations
We have already set or updated Redis Server configurations multiple times in previous recipes. In this recipe, we will revisit the ways to manage Redis Server configurations and introduce two commands related to Redis configuration.
Getting ready…
You need to finish the installation of Redis Server as we described in the Downloading and installing Redis recipe in Chapter 1, Getting Started with Redis.
How to do it...
The steps for managing Redis Server configurations are as follows:
- To start a Redis Server with configurations loaded from a
config
file, append the config file path afterredis-server
:
$ bin/redis-server conf/redis.conf
- To include another config file, use theÂ
include
directive in the Redis config file. For example, we can put common configurations into/redis/conf/redis-common.conf
and include it inredis.conf
:
include /redis/conf/redis-common.conf
- To override configuration parameters when starting Redis Server, append the configuration directives...