Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the copy-the-code domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pb-seo-friendly-images domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the johannes domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121
Install Redis daemon and Redis PHP extension in cPanel - PC✗3
Install Redis daemon and Redis PHP extension in cPanel

Install Redis daemon and Redis PHP extension in cPanel

Here is how to install Redis daemon on a cPanel/WHM server and add the Redis PHP extension to each EasyApache PHP version.

Step 1. Install Redis daemon:

rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum -y install redis --enablerepo=remi --disableplugin=priorities
systemctl enable redis
systemctl start redis

Step 2. Install Redis PHP extension to each EasyApache PHP version:

for phpver in $(whmapi1 php_get_installed_versions|grep -oE '\bea-php.*') ; do
cd ~
wget -O redis.tgz https://pecl.php.net/get/redis
tar -xvf redis.tgz
cd ~/redis-* || exit
/opt/cpanel/"$phpver"/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/"$phpver"/root/usr/bin/php-config
make clean && make install
echo 'extension=redis.so' > /opt/cpanel/"$phpver"/root/etc/php.d/redis.ini
rm -rf ~/redis*
done

Allow a few minutes to install Redis extension to each PHP version:

image 2 1024x369 - Install Redis daemon and Redis PHP extension in cPanel

Step 3. Verify that the Redis extension has been added:

for phpver in $(whmapi1 php_get_installed_versions|grep -oE '\bea-php.*') ; do
echo "PHP $phpver" ; /opt/cpanel/"$phpver"/root/usr/bin/php -i |grep "Redis Support"
done

The output should be:

image 3 - Install Redis daemon and Redis PHP extension in cPanel
whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.