Install Redis on Oracle Linux 7+
Install Redis on Oracle Linux 7+
Install Redis
In this section you’ll add the EPEL repository, and then use it to install Redis.
- Add the EPEL repository, and update YUM to confirm your change:
sudo yum install epel-release sudo yum update - Install Redis:
sudo yum install redis - Start Redis:
sudo systemctl start redisOptional: To automatically start Redis on boot:sudo systemctl enable redis
Verify the Installation
Verify that Redis is running with
redis-cli:redis-cli ping
If Redis is running, it will return:
PONG
Configure Redis
In this section, you’ll configure some basic persistence and tuning options for Redis.
Persistence Options
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:
- Make sure that the following values are set for the
appendonlyandappendfsyncsettings inredis.conf:- /etc/redis.conf
- Restart Redis:
sudo systemctl restart redis
Thanks - clear and concise. initially i ran into an issue at the:
ReplyDeletesudo 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.
Thanks, I will update the post!
Delete