How to Install Redis and PHP-Redis on cPanel/WHM?

how to install Redis

How to Install Redis and PHP-Redis on WHM/cPanel?

Login to the server via SSH and do the following steps.

1) Download the following rpm to the server using the below commands.

# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

# wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

Run the following commands to install Redis on the server.

# rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

# yum install –y redis

Now the redis is installed on the server and we need to enable the Radis to start it automatically upon server reboot.

# chkconfig redis on

2) After installation, we need to configure Redis. Follow the below steps to configure it.

Open the Redis configuration file and add the below lines at the end of the file:

vi /etc/redis.conf

maxmemory 256mb

maxmemory-policy allkeys-lru

3) We need to install php redis extension, for that, we need to login to WHM and Search for “Module Installers” under “Software” section. Navigate to “Module Installers” page and then click on the Manage link for the “PHP Pecl”.

How to Install Redis and PHP-Redis on cPanel/WHM? 1 Top10.Digital

On the PHP Pecl Installer page search type “redis” and hit the “Go” button.

How to Install Redis and PHP-Redis on cPanel/WHM? 2 Top10.Digital

Then click on the “Install” link from the results of the Redis extension to complete the installation.

How to Install Redis and PHP-Redis on cPanel/WHM? 3 Top10.Digital

4) Finally, we need to restart the Redis and httpd services to enable the changes.

# service httpd restart

# service redis restart

Visit redis offical website for more informations




Read also:

How To Install ImageMagick (Imagick) In WHM?

How to Install FFMPEG on WHM/cPanel Server – CentOS 7

eskort - web tasarım - werbung