Installing a PHP Cache in Apache
From LinuxVM
Log from install APC in a SLES10 SP2
To be able to install APC, Alternative PHP Cache, ( a PECL package) in SLES10 SP2 for zSeries, s390x:
yast install:
- php5-pear - php5-devel - php5-fastcgi(not sure about this probably not needed)
Then download the APC package from http://pecl.php.net/package/APC
and install with: (using apxs does not work)
root@zlin0036# pear install APC-3.0.19.tgz 47 source files, building running: phpize Configuring for: PHP Api Version: 20041225 Zend Module Api No: 20060613 Zend Extension Api No: 220060519 1. Use apxs to set compile flags (if using APC with Apache)? : yes
1-1, 'all', 'abort', or Enter to continue: 1 Use apxs to set compile flags (if using APC with Apache)? [yes] : no 1. Use apxs to set compile flags (if using APC with Apache)? : no
1-1, 'all', 'abort', or Enter to continue: 1 Use apxs to set compile flags (if using APC with Apache)? [no] : 1. Use apxs to set compile flags (if using APC with Apache)? : no
1-1, 'all', 'abort', or Enter to continue: building in /var/tmp/pear-build-root/APC-3.0.19 running: /tmp/pear/cache/APC-3.0.19/configure --with-apxs=no ... ... ... Libraries have been installed in: /var/tmp/pear-build-root/APC-3.0.19/modules
If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ----------------------------------------------------------------------
Build complete. Don't forget to run 'make test'.
running: make INSTALL_ROOT="/var/tmp/pear-build-root/install-APC-3.0.19" install Installing shared extensions: /var/tmp/pear-build-root/install-APC-3.0.19/usr/lib64/php5/extensions/ running: find "/var/tmp/pear-build-root/install-APC-3.0.19" -ls 209217 0 drwxr-xr-x 3 root root 8 Sep 24 10:15 /var/tmp/pear-build-root/install-APC-3.0.19 172032 0 drwxr-xr-x 3 root root 8 Sep 24 10:15 /var/tmp/pear-build-root/install-APC-3.0.19/usr 172033 0 drwxr-xr-x 3 root root 8 Sep 24 10:15 /var/tmp/pear-build-root/install-APC-3.0.19/usr/lib64 172034 0 drwxr-xr-x 3 root root 8 Sep 24 10:15 /var/tmp/pear-build-root/install-APC-3.0.19/usr/lib64/php5 172035 0 drwxr-xr-x 2 root root 16 Sep 24 10:15 /var/tmp/pear-build-root/install-APC-3.0.19/usr/lib64/php5/extensions 172036 492 -rwxr-xr-x 1 root root 496182 Sep 24 10:15 /var/tmp/pear-build-root/install-APC-3.0.19/usr/lib64/php5/extensions/apc.so
Build process completed successfully Installing '/usr/lib64/php5/extensions/apc.so' install ok: channel://pecl.php.net/APC-3.0.19 configuration option "php_ini" is not set to php.ini location You should add "extension=apc.so" to php.ini root@zlin0036#
added to php.ini:
extension=apc.so apc.enabled = 1 apc.cache_by_default = "Off" apc.filters = "+\.php$"
and /etc/init.d/apache2 restart
I also added acp.php in the webroot, it display details about how it works.
It all works fine now.
Text added by Tore Agblad Volvo IT, Sweden.