Rate This Document
Findability
Accuracy
Completeness
Readability

Configuring Redis

To configure Redis for single-instance Redis deployment, modify key settings in the Redis configuration file and adjust Redis behavior.

  1. Create a Redis running directory, /home/redis/standalone.
    mkdir -p /home/redis/standalone
  2. 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 ./
  3. Modify the configuration file.
    1. Switch to the Redis running directory.
      cd /home/redis/standalone
    2. 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