This guide will help you for the installation of Redis server and binding with PHP using Redis PHP extensions on a cPanel server.

Step 1 – Prerequisites

In order to use this tutorial, you must have root shell access of your WHM/cPanel server. Login to your server shell access using root account. Redis packages are not available under default yum repositories. You need to enable EPEL yum repository on your server first. Execute below command to enable:

Step 2 – Install Redis Server

Now, You can use yum package manage to install Redis server packages by executing below command After successfully installation start Redis service and enable to auto-start on system reboot. Redis server is up and running on your system. Go to next step to enable Redis PHP extension on your cPanel server.

Step 3 – Install Redis PHP extension

In this step there are two option available based in the EasyApache version on your cPanel server. Follow one of below step:

cPanel with EasyApache 4

You can install Redis PHP extension for all installed PHP version on your system or install for the active version only. We recommend to install for all versions. PHP 5.6 PHP 7.0 PHP 7.1

cPanel with EasyApache 3

If the cPanel is still running with EasyApache 3, Execute below commands to install Redis PHP extension on your system. Also check Redis module is enabled for PHP. All done. Redis has been installed on your system along with the PHP extension.