To install a PECL extension for multiple PHP versions, repeat the PECL extension installation for each PHP version.
This PHP extension provides client access to the Redis server. It is not Redis itself. Redis is a server that provides a key/value store. When you install the Redis PHP extension, it will allow PHP to communicate with a Redis server. Read more about installing the Redis server.

Installing the Redis Extension on PHP 7.X

In the examples shown, replace "7.X" with your app's PHP version (for example, "7.0").

To install the PHP Redis extension on PHP 7.0 or PHP 7.1, SSH in to your server as root and run the following command:

sudo apt-get install gcc make autoconf libc-dev pkg-config
sudo pecl7.X-sp install redis

Once installed, create a configuration file for the extension and restart PHP by running the following command as root:

sudo bash -c "echo extension=redis.so > /etc/php7.X-sp/conf.d/redis.ini"
sudo service php7.X-fpm-sp restart

Installing the Redis Extension on PHP 5.X

The most recent version of the Redis extension can only be installed on PHP 7.0 and above. If you need to use the Redis extension on PHP 5.4, 5.5, or 5.6, you must run Version 2.2.8.

In the examples shown, replace "5.X" with your app's PHP version (for example, "5.4").

To install this extension, run the following command as your server's root user:

sudo apt-get install gcc make autoconf libc-dev pkg-config
sudo pecl5.X-sp install redis-2.2.8

Once installed, create a configuration file for the extension and restart PHP by running the following command as root:

sudo bash -c "echo extension=redis.so > /etc/php5.X-sp/conf.d/redis.ini"
sudo service php5.X-fpm-sp restart

Using the PHP Redis Extension

See the documentation for the PHP Redis extension for usage information.

Alert: For Control Panel Help & Tutorials, click here: Panel Tutorials
Was this answer helpful? 0 Users Found This Useful (0 Votes)

Powered by WHMCompleteSolution