• Email Address: forum@outsourcepath.com
English
  • English

Install APCu in cPanel server


APCu is an in-memory key-value store for PHP. Keys are of type string and values can be any PHP variables.
Here at Outsource Path, as part of our Server Management Services, we regularly help our customers to perform Software Installation tasks.
In this context, we shall look into the steps to install APCu cache.

How to Install APCu in cPanel server?

To get APCu installation process started, start by logging into your Server via an SSH tool such as putty and once logged in, you need to follow the following steps;


1. Install pcre-devel package

pcre-devel package is a dependency package which is required for APCu functionality. To install this package, execute the following command;

yum install pcre-devel

Next, you also have to install EasyApache 3 and EasyApache 4.


2. How to Install APCu on cPanel using EasyApache 3?

To install APCu using PECL repository, simply run the following command;

pecl install channel://pecl.php.net/APCu-4.0.10

Also, the newer versions of APCu (Latest version is APCu 5.1.3) needs PHP 7.0.0-dev. The latest available version of PHP is PHP 5.6.19 in EasyApache 3. That’s the reason why we are installing the APCu version 4.0.10.
Please restart Apache service once the APCu installation is completed. To do this, execute;

/etc/init.d/httpd restart

3. How to Install APCu on cPanel using EasyApache 4 ?

If we are using multiple PHP version on EasyApache4, so we need to install APCu on each PHP version individually.
Run the following commands to install APCu module:
For PHP 5.4, execute;

/opt/cpanel/ea-php54/root/usr/bin/pecl install channel://pecl.php.net/APCu-4.0.10

Then, Verify using following command:

/opt/cpanel/ea-php54/root/usr/bin/php -m | grep apcu

For PHP 5.5, run;

/opt/cpanel/ea-php55/root/usr/bin/pecl install channel://pecl.php.net/APCu-4.0.10

Then, Verify using following command:

/opt/cpanel/ea-php55/root/usr/bin/php -m | grep apcu

For PHP 5.6, execute;

/opt/cpanel/ea-php56/root/usr/bin/pecl install channel://pecl.php.net/APCu-4.0.10

Then, Verify using following command:

/opt/cpanel/ea-php56/root/usr/bin/php -m | grep apcu

For PHP 7.0, run;

/opt/cpanel/ea-php70/root/usr/bin/pecl install apcu

Then, Verify using the following command:

/opt/cpanel/ea-php70/root/usr/bin/php -m | grep apcu

For PHP 7.1, execute;

/opt/cpanel/ea-php71/root/usr/bin/pecl install apcu

Then, Verify using the following command:

/opt/cpanel/ea-php71/root/usr/bin/php -m | grep apcu

After this process, Restart Apache service by running the command;

service httpd restart

[Need urgent support in fixing Ubuntu related issues? We are available to help you today.]


Conclusion

This article will guide you on the steps to follow to install APCu in cPanel server.

Recent Post