PHP – Instalar APC

PHP-logo

Instalando APC para php 5.3.

# wget http://pecl.php.net/get/APC-3.1.3p1.tgz
# tar xf APC-3.1.3p1.tgz
# cd APC-3.1.3p1
# phpize
# ./configure --enable-apc --enable-mmap
# make

Error?
/usr/local/src/APC-3.1.2/apc.c:453: error: 'apc_regex' has no member named 'nreg'
make: *** [apc.lo] Error 1

# yum install pcre-devel
# make clean
# make
# make install

Añadir “extension=apc.so” en php.ini, reiniciar servicio web. Comprobamos:


# -bash-3.2# php -i |grep apc
# apc
# apc.cache_by_default => On => On

Instalando APC para php 5.1.6

#
# tar xf APC-3.1.3p1.tgz
# cd APC-3.1.3p1
# phpize
# ./configure --enable-apc --enable-mmap
# make

Error?
/usr/local/src/APC-3.1.2/apc.c:453: error: 'apc_regex' has no member named 'nreg'
make: *** [apc.lo] Error 1

# yum install pcre-devel
# make clean
# make
# make install

Añadir “extension=apc.so” en php.ini, reiniciar servicio web. Comprobamos:


# -bash-3.2# php -i |grep apc
extension=apc.so
[APC]
apc.enabled = 1
apc.shm_segments = 1
apc.shm_size = 512M
apc.optimization = 0
apc.ttl = 0
apc.user_ttl = 7200
apc.num_files_hint = 1000

Links
http://longvnit.com/blog/?p=627
http://constantshift.com/installing-apc-for-php-5-3/
http://pecl.php.net/package/APC

6 thoughts on “PHP – Instalar APC

  1. Me podrías ayudar?
    Al intentarlo de todas las maneras acabo con un:

    configure: creating ./config.status
    config.status: creating config.h
    running: make
    sh: make: command not found
    ERROR: `make’ failed

    y si hago

    # make clean

    sale:

    -bash: make: command not found

    Muchas gracias!

Leave a Reply

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