Install Redis on Oracle Linux 7+

Install Redis on Oracle Linux 7+

Install RedisPermalink

In this section you’ll add the EPEL repository, and then use it to install Redis.
  1. Add the EPEL repository, and update YUM to confirm your change:
    sudo yum install epel-release
    sudo yum update
    
  2. Install Redis:
    sudo yum install redis
    
  3. Start Redis:
    sudo systemctl start redis
    
    Optional: To automatically start Redis on boot:
    sudo systemctl enable redis
    

Verify the InstallationPermalink

Verify that Redis is running with redis-cli:
redis-cli ping
If Redis is running, it will return:
PONG

Configure RedisPermalink

In this section, you’ll configure some basic persistence and tuning options for Redis.

Persistence OptionsPermalink

Redis provides two options for disk persistence:
  • Point-in-time snapshots of the dataset, made at specified intervals (RDB).
  • Append-only logs of all the write operations performed by the server (AOF).
Each option has its own pros and cons which are detailed in the Redis documentation. For the greatest level of data safety, consider running both persistence methods.
Because the Point-in-time snapshot persistence is enabled by default, you only need to set up AOF persistence:
  1. Make sure that the following values are set for the appendonly and appendfsync settings in redis.conf:
    /etc/redis.conf
    1
    2
    
    appendonly yes
    appendfsync everysec
  2. Restart Redis:
    sudo systemctl restart redis

Comments

  1. Thanks - clear and concise. initially i ran into an issue at the:
    sudo yum install redis
    step (No package redis available). i resolved this with:
    sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

    Additional useful info that might be good to add - required redis.conf changes to allow remote connections if needed.

    ReplyDelete

Post a Comment

Popular posts from this blog