APCu is a user data cache extension for PHP. It is used by many PHP applications to improve their performances.
This howto is tested on:
- Debian 10.0 Buster
Requirements
This howto requires:
- a HTTP server with PHP support, as described by Install PHP-FPM on Debian.
- php-tools, command-line tool easing PHP configuration.
Installation
Detect if sudo is available (“command” is used if not):
cmdProxy='command'
command type -f 'sudo' &>'/dev/null' && cmdProxy='sudo'
Install the software:
${cmdProxy} apt-get install 'php-apcu'
Enable APCu and set its memory cache size:
${cmdProxy} php-tools --add-mod --mod-priority=50 --mod-name='apc-settings' \
--mod-settings="; APC settings
; priority=50
apc.enabled = 1
; Memory allocated to APC.
; Use Munin or APC Info to see if more is needed.
apc.shm_size = \"96M\""
Reload the configuration:
${cmdProxy} php-tools --reload
Thanks
- Thanks to Alternative PHP Cache (en) developers.
0 Comments