predisHow to install Redis on Red Hat 8 using PHP?
- Install the Redis package from the Red Hat 8 repository:
 
sudo dnf install redis
- Start the Redis service:
 
sudo systemctl start redis
- Check the status of the Redis service:
 
sudo systemctl status redis
Output example
● redis.service - Redis persistent key-value database
   Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2020-07-09 11:30:50 UTC; 1min ago
 Main PID: 2989 (redis-server)
    Tasks: 4 (limit: 1186)
   Memory: 4.2M
   CGroup: /system.slice/redis.service
           └─2989 /usr/bin/redis-server 127.0.0.1:6379
- Configure the Redis service to start automatically when the system boots:
 
sudo systemctl enable redis
- Install the PHP Redis extension:
 
sudo dnf install php-pecl-redis
- Restart the Apache web server to make the PHP Redis extension available:
 
sudo systemctl restart httpd
- Verify the installation of the PHP Redis extension:
 
php -m | grep redis
Output example
redis
Helpful links
More of Predis
- How can I use PHP and Redis to retrieve a range of values from a sorted set?
 - How can I use PHP to increment values in Redis using ZINCRBY?
 - How do I install PHP Redis on Ubuntu 20.04?
 - How can I use PHP and Redis to retrieve data from a sorted set using ZRANGEBYSCORE?
 - How can I troubleshoot a "PHP Redis went away" error?
 - How can I use the PHP Redis HGET command?
 - How can I use PHP and Redis to get a reverse range of scores?
 - How do I use yum to install php-redis?
 - How do I use the PHP Redis zrevrange command?
 - How can I use Redis with the Yii PHP framework?
 
See more codes...