WebHostingPeople Blog

How Can We Help?

How to Install Redis and PHP-Redis on cPanel

You are here:

Redis is an open supply in-memory knowledge construction retailer that may retailer vast quantities of knowledge with out the constraints of a relational database. When caching with Redis, the cache will robotically be cleared when new content material is revealed. This ensures that any modifications or new content material posted in your web site won’t end in a unclean cache, and the cache might be up to date upon the following web page load.

Putting in Redis on the Server

To start, please comply with the under steps after logging into the server by way of SSH:

1) Use the next instructions to obtain the required rpm recordsdata to the server:

# 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

Activate Redis on the server by executing the next instructions:

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

# yum set up –y redis

Now that Redis has been efficiently put in on the server, we have to configure it to begin routinely upon server reboot. Execute the next command:

# chkconfig redis on

2) After set up, we have to configure Redis by following these steps:

Open the Redis configuration file and add the next strains on the finish of the file:

vi /and many others/redis.conf

maxmemory 256mb

maxmemory-policy allkeys-lru

3) The subsequent step is to put in the PHP Redis extension. For this, we have to log into WHM and seek for “Module Installers” beneath the “Software program” part. As soon as on the “Module Installers” web page, click on on the “Handle” hyperlink for “PHP Pecl”.

Set Up Redis

On the PHP Pecl Installer web page, use the search perform to seek for “redis” after which click on the “Go” button.

Set Up Redis

Choose the suitable Redis extension from the search outcomes and click on on the “Set up” hyperlink to finish the set up.

Set Up Redis

4) Lastly, we have to restart the Redis and httpd providers with a purpose to activate the adjustments.

# service httpd restart

# service redis restart

For those who require additional help, please don’t hesitate to succeed in out to our assist division.

Post Your Comment