Install Redis cache

For better performance and scalability, you can configure API Portal to cache APIs in a Redis cache. It is recommended to use the Redis cache if you plan to expose hundreds of APIs, or you plan to connect API Portal to more than one API Manager. API Portal continues to work even without Redis cache.

Note   Redis cache is not available on the virtual appliance installation.

Install PHP dependencies

Before installing Redis, you must install phpize that prepares your environment for compiling and installing php extensions, and phpredis extension.

  1. phpize is installed as part of the php development package (for example, php5.6-dev or php7.0-dev). If you do not have a php development package installed, install the correct package for your php version:
  2. yum install php-devel
  3. Download the latest available version of phpredis from the Github repository, and extract the package. For example:
  4. wget


  5. Change to the directory where you extracted the phpredis package, and run the following:
  6. phpize


    make && make install

  7. You must enable the phpredis extension. To do so, you can either edit the php.ini file, or add a redis.ini file in the folder that php uses to load additional modules from. By default, this folder is one of the following:
    • /etc/php5/conf.d if you have a php 5.x installation.
    • /etc/php7/conf.d if you have a php 7.x installation.
    • /etc/php/conf.d if you have installed php from the official repository.

    The redis.ini file should have the following contents:

Install Redis

  1. Download the Redis package:
  2. wget
  3. Extract the package:
  4. tar xvzf redis-stable.tar.gz
  5. Change to the directory where you extracted the package and run the following:
  6. make && make install

Related Links