Install APCu in cPanel server
This post describes how to install APCu in cPanel server. APCu is designed to be used alongside OpCache if you need data caching. The APCu was developed by Joe Watkins in response to OPcache.
Please login to the server via SSH and install the pcre-devel package prior to the APCu installation. You can do it using the following command. This is applicable for EasyApache 3 and EasyApache 4.
yum install pcre-devel
Install APCu on cPanel using EasyApache 3
Please install APCu using PECL repository. You can do it using 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 completed.
/etc/init.d/httpd restart
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:
PHP 5.4
/opt/cpanel/ea-php54/root/usr/bin/pecl install channel://pecl.php.net/APCu-4.0.10
Verify using following command:
/opt/cpanel/ea-php54/root/usr/bin/php -m | grep apcu
PHP 5.5
/opt/cpanel/ea-php55/root/usr/bin/pecl install channel://pecl.php.net/APCu-4.0.10
Verify using following command:
/opt/cpanel/ea-php55/root/usr/bin/php -m | grep apcu
PHP 5.6
/opt/cpanel/ea-php56/root/usr/bin/pecl install channel://pecl.php.net/APCu-4.0.10
Verify using following command:
/opt/cpanel/ea-php56/root/usr/bin/php -m | grep apcu
PHP 7.0
/opt/cpanel/ea-php70/root/usr/bin/pecl install apcu
Verify using the following command:
/opt/cpanel/ea-php70/root/usr/bin/php -m | grep apcu
PHP 7.1
/opt/cpanel/ea-php71/root/usr/bin/pecl install apcu
Verify using the following command:
/opt/cpanel/ea-php71/root/usr/bin/php -m | grep apcu
Restart Apache service
service httpd restart
That’s it!
If you like this post and wish to receive more articles from us, please like our FB page: If you like this post and wish to receive more articles from us, please like our FB page: Button
Your suggestions and feedbacks will encourage us and help to improve further, please feel free to write your comments.
For more details on our services, please drop us an E-mail at info@grepitout.com
really thank you for your help
two days headache and brainstorming before finding your page
i can create my api with your help
I am glad to hear that the issue is resolved 🙂 Keep visiting GrepItOut!