Logo
  • Entries
  • Comments
  • Popular
Recent Posts
  • January 2012
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • July 2007
Recent Comments
  • Makendra It's always a pleasure to hear from someone with eexrpitse....
  • Rubén Ortiz Hola dependerá de varias cosas pero la respuesta sería NO. ...
  • jose miguel perea Buenos días, ¿La replicación entre maestro y esclavo es i...
  • Rubén Ortiz Si lo hacéis legal, con VMware el único problema son los cos...
  • Angel Hola, estamos valorando implementar baremetal para crear un ...
Popular Articles
  • Declaro la guerra al mosquito Tigre (35)
  • Phpbb3 - encode error converter (19)
  • MySQL - Variables básicas a configurar (17)
  • Reinicio programado Windows 2003 Server (16)
  • Plesk - Evitar el SPAM (10)
  • Home
  • Contacta
  • Hosting Linux
  • Legal
  • Sobre mí – About me

Instalar Xcache en Centos 5

Posted by Rubén Ortiz on Oct 2, 2008 in Centos, Linux | 0 comments

Instrucciones breves para compilar y instalar Xcache en Centos 5. No tiene mayor dificultad.

1
2
3
4
5
6
7
8
9
<strong>
# wget http://xcache.lighttpd.net/pub/Releases/1.2.2/xcache-1.2.2.tar.gz
# tar -zxf xcache-1.2.2.tar.gz
# cd xcache
# phpize
# ./configure --enable-xcache
# make
# su
# make install</strong>
1
Installing shared extensions:     /usr/lib/php/modules
1
<strong># cat xcache.ini &gt;&gt; /etc/php.ini</strong>

Editamos php.ini para instalar Xcache como extension

1
<strong># joe /etc/php.ini</strong>
1
zend_extension = /usr/lib/php/modules/xcache.so

La configuración del xcache está explicada en comentarios en el propio php.ini, pero hay cosas relevantes como el xcache.count, relativo al número de procesadores de nuestro sistema. Averiguamos el número de procesadores y luego editamos el php.ini

1
<strong># cat /proc/cpuinfo |grep -c processor</strong>
1
xcache.count = 4

Las demás variables se pueden configurar fácilmente leyendo la documentación. Ahora podemos crear un archivo php con la función phpinfo ( ) y moverlo a nuestro directorio root para comprobar que Xcache funciona correctamente. No olvidemos reiniciar Apache!

1
<strong># /etc/init.d/httpd restart</strong>

Instalar el Admin

Para instalar el admin primero creamos un fichero php como el siguiente para obtener el password encriptado en md5

1
echo md5("password");

Copiamos el resultado en php.ini, en la variable xcache.admin.pass

1
xcache.admin.pass = "password_en_md5"

Ahora copiamos el directorio web de Xcache a nuestro document root de apache

1
<strong># cp -R admin/* /var/www/midominio.com/admin/.</strong>

Reiniciamos Apache. Accedemos al admin, introduciendo user y password.

Sobre el Error Segmentation Fault
Algo que me sucedió en la instalación de Xcache en Centos 5. Al comprobar los logs de Apache comprobé que había numerosos errores de Segmentation Fault.

1
2
<strong># php -v</strong>
Segmentation fault
1
<strong># cat /var/log/httpd/error_log</strong>
1
2
3
4
5
6
[Thu Oct 02 13:43:39 2008] [notice] child pid 15978 exit signal Segmentation fault (11)
[Thu Oct 02 13:43:42 2008] [notice] child pid 15979 exit signal Segmentation fault (11)
[Thu Oct 02 13:43:50 2008] [notice] child pid 15980 exit signal Segmentation fault (11)
[Thu Oct 02 13:44:08 2008] [notice] child pid 15981 exit signal Segmentation fault (11)
[Thu Oct 02 13:44:12 2008] [notice] child pid 15982 exit signal Segmentation fault (11)
[Thu Oct 02 13:44:33 2008] [notice] child pid 15983 exit signal Segmentation fault (11)

Para evitarlo hacemos lo siguiente

1
2
3
4
5
<strong>
# rm /dev/zero
# mknod /dev/zero char 1 5
# /etc/init.d/httpd restart
</strong>

Actualización:
Otro problema relativo. Aunque creemos el fichero /dev/zero, por una limitación (no se si de php.ini o el propio kernel) puede que el valor de cache que asignamos a xcache.size es superior a lo que puede guardar y eso provoca el siguiente error:

1
<strong>xcache /dev/zero: No space left on device</strong>

Para arreglar, hemos de reducir el valor asignado a xcache.size, por ejemplo empezando por 8M y reiniciando apache. No deberíamos ver más ese error ni Segmentation Faults en el apache. Y si los hay, deberían ser por otro motivo que no fuera Xcache.

  • http://xcache.lighttpd.net/
  • http://xcache.lighttpd.net/pub/Releases/1.2.2/xcache-1.2.2.tar.gz
  • http://xcache.lighttpd.net/wiki/InstallFromSource
  • http://www.jasonlitka.com/2006/12/20/php-caching-and-acceleration-with-xcache/

No Responses to “Instalar Xcache en Centos 5”

  1. Instalar xCache en centOS 5 – Plesk 9.2 | Fernando Gomez says:
    10 de September, 2009 at 1:15 am

    [...] ayudaré a otros que se encuentren con el mismo problema, como me ha pasado a mi con los post de Rubén Ortiz y Vichaunter [...]

Leave a Reply

Click here to cancel reply.

Nube de Tags

apache bare metal benchmark cacti centos dell drupal esxi General gripe A Hardware humor IIS kayako Linux lpi lyric Lyrics memcached mysql nginx openfiler OpenVZ openx Parallels php Phpbb plesk postgresql proftpd raid SQL Server ssh svn trac ubuntu varnish Virtualizacion Virtuozzo Virtuozzo Linux Warphammer.net Windows windows 2003 wordpress zabbix

Categorias

  • 2003 Server
  • Apache 2.X
  • benchmark
  • Centos
  • Cuanto (Luser) Cabron
  • ESXi
  • General
  • Hardware
  • IIS
  • Lighttpd
  • Linux
  • Lyrics
  • MySql
  • Nginx
  • OpenVZ
  • Parallels
  • Parallels Bare Metal
  • Php
  • Phpbb
  • Plesk
  • PostgreSQL
  • Prestashop
  • Software
  • SQL SERVER
  • Ubuntu
  • Varnish
  • Virtualizacion
  • Virtuozzo
  • Virtuozzo Windows
  • VMWare
  • Warphammer.net
  • Windows
  • Wordpress

Blogroll

  • David Toribio
  • EasyCompany.es
  • Marius Duch
  • Series
  • Warphammer.net

Recursos

  • Backup Plesk9
  • CentOS 5 32 bits RPMs
  • CentOS 5 64 bits RPMs
  • Lighttpd
  • MySQL Tunner
  • OpenVZ – Panel – PROXMOX
  • OpenVZ – Panel – VTONF
  • OpenVZ Wiki
  • Parallels Virtual Automation Resources
  • Plesk 8 Docs
  • Plesk 9 Docs
  • Plesk Hacker
  • Port80 – Compression Check
  • Virtuozzo DOCS
  • Virtuozzo Lin Commands
  • Virtuozzo Win Commands
  • Virtuozzo Windows Docu

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
Designed by Elegant Themes | Powered by Wordpress