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:

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

Categories: PHP

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.