|
TUPA - The Ultimate PowerDNS Administration INSTALL A PHP-ACCELERATOR |
 |
Install a PHP-Accelerator
PHPA gives you more performance on page generation and is very easy to install. Around 30% faster in my case.
Download the needed file for your PHP version on http://www.php-accelerator.co.uk/ and decompress it into “/usr/lib/apache/php/” (or an other path you like)
Create a directory where cache files are stored (f.ex. /home/phpa_cache):
$ mkdir /home/phpa_cache
$ chown apache:apache /home/phpa_cache
$ chmod 700 /home/phpa_cache
Add the following code into your php.ini or into a new file in “/etc/php.d/”. These are values which works fine for me. Don't forget to change the paths.
; PHP Accelerator extension
zend_extension="/usr/lib/apache/php/php_accelerator_1.3.3r2.so"
; Config
phpa = on
phpa.tweaks = on
phpa.cache_dir = /path/to/cache/dir
phpa.file_perms = 400
phpa.cache_file_prune_period = 1h
phpa.cache_file_ttl = 1d
phpa.shm_size = 32
phpa.shm_key = 0xc0deb00
phpa.shm_perms = 666
phpa.shm_user = apache
phpa.shm_group = apache
phpa.shm_release_at_exit = on
phpa.shm_stats_check_period = 5m
phpa.shm_ttl = 12h
phpa.shm_max_processes = 512
phpa.shm_lock_threshold0 = 10
phpa.shm_lock_threshold1 = 10
Restart Apache and you PHP caching should run.
- /