Configuring Redis
To configure Redis for single-instance Redis deployment, modify key settings in the Redis configuration file and adjust Redis behavior.
- Create a Redis running directory, /home/redis/standalone.
mkdir -p /home/redis/standalone
- Copy the default configuration file. Here, the default configuration file path is /home/redis-6.0.20/redis.conf.
cd /home/redis/standalone cp /home/redis-6.0.20/redis.conf ./
- Modify the configuration file.
- Switch to the Redis running directory.
cd /home/redis/standalone
- Use the sed commands to modify several key settings in the configuration file. Modifications include allowing Redis to listen to connections on all network ports, disabling the protected mode to improve accessibility (please note the security risks), and ignoring specific error warnings that may be encountered on the Arm64 architecture.
sed -i "s/bind 127.0.0.1/#bind 127.0.0.1/g" redis.conf sed -i "s/protected-mode yes/protected-mode no/g" redis.conf sed -i "s/# ignore-warnings ARM64-COW-BUG/ignore-warnings ARM64-COW-BUG/g" redis.conf
- Switch to the Redis running directory.
Parent topic: Single-Instance Deployment