What's new

Welcome to GloTorrents Community

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Ask question

Ask Questions and Get Answers from Our Community

Answer

Answer Questions and Become an Expert on Your Topic

Contact Staff

Our Experts are Ready to Answer your Questions

Installing Redis and Redis PHP extension in cPanel

_.:=iTake=:._

Administrator
Staff member
ZeuS
Super Moderator
+Lifetime VIP+
Registered
Joined
Oct 20, 2018
Messages
1,370
Reaction score
1,435
Points
113
Credits
14,854
This is a quick guide on how to install both the Redis PHP extension as well as the daemon via SSH Installing the

Redis daemon:

CentOS 6/RHEL 6

Code:
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum -y install redis --enablerepo=remi --disableplugin=priorities
chkconfig redis on
service redis start

CentOS 7/RHEL 7

Code:
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

Installing the Redis PHP extension for PHP5.5, PHP5.6 and PHP7.0.

Code:
for phpver in 55 56 70 ; do
cd ~
wget https://pecl.php.net/get/redis-3.1.0.tgz
tar -xvf redis-*.tgz
cd redis*
/opt/cpanel/ea-php$phpver/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php$phpver/root/usr/bin/php-config
make && make install
echo 'extension=redis.so' >> /opt/cpanel/ea-php$phpver/root/etc/php.d/redis.ini
cd ~
rm -rf redis*
done
/scripts/restartsrv_httpd
/scripts/restartsrv_apache_php_fpm

All done! Check to make sure the PHP extension is loaded in each version of PHP:

Code:
for phpver in 55 56 70 ; do

echo "PHP $phpver" ; /opt/cpanel/ea-php$phpver/root/usr/bin/php -i |grep "Redis Support"

done

Output should be:

Code:
PHP 55
Redis Support => enabled
PHP 56
Redis Support => enabled
PHP 70
Redis Support => enabled

Source:

https://my.royalclouds.net/knowledgebase/24/Installing-Redis-and-Redis-PHP-extension-in-cPanel.html
 
shape1
shape2
shape3
shape4
shape7
shape8
Top