APC en Magento

nano /etc/php5/conf.d/apc.ini

Copia lo siguiente en el archivo apc.ini que estamos creando.

extension = apc.so    #name dependent on your APC cache install

[APC]
apc.enabled = 1    # Turn APC cache on
apc.optimization  = 0    # Experimental keep off
apc.shm_segments = 1    # Shared memory segments
apc.shm_size = 128M  # Increase until Cache Full Count remains at 0
apc.ttl = 7200
apc.user_ttl  = 7200
apc.num_files_hint = 8096
apc.user_entries_hint = 8096
apc.mmap_file_mask = /tmp/apc.XXXXXX
apc.enable_cli = 1 # Allow command line php to function
apc.cache_by_default  = 1 # Enabled, 0 for filters
apc.max_file_size = 5M # Maximum cached file size
apc.stat = 1 # 1 for dev, 0 for production, whether the source file is checked for mod date
#apc.include_once_override = 1 # Use PHP5.3+ for include_once optimization
  • apc.shm_size indica el tamaño de memoria dedicada al proceso, se recomienda 64M en vps y 128M en dedicado.

Copiar el panel de APC cache a nuestra web.

cp /usr/share/php/apc.php /var/www/vhosts/dominio.tld/httpdocs

Cambiamos el usuario y password del panel APC.

nano /var/www/vhosts/dominio.tld/httpdocs/apc.php
defaults('ADMIN_USERNAME','apc'); 	 //Admin Username
defaults('ADMIN_PASSWORD','password');  //Admin Password - CHANGE THIS TO ENABLE!!!

Para finalizar, reiniciamos apache.

/etc/init.d/apache2 restart