Esto no es un disco
Esto no es un disco CentOS

Instalar xcache en CentOS 5

Step # 1: Download xcahce source code


Use wget command to download latest stable release:
# wget

Step # 2: Untar tar ball

Use tar command:
# tar -zxvf xcache-1.2.1.tar.gz
# cd xcache-1.2.1

Step # 2: Compile and install xcahce

Use phpize command to prepare xcache as a PHP extension for compiling:
# phpize
Configure, compile and install xcache:
# ./configure --enable-xcache
# make
# make install

Default installation location

  • 64 bit PHP module installed at /usr/lib64/php/modules/
  • 32 bit PHP module installed at /usr/lib/php/modules/

Step # 3: Create xcache.ini file

Under RHEL / CentOS, you place php modules configuration at /etc/php.d/ directory:
# cd /etc/php.d/
Create xcache.ini file:
# vi xcache.ini
Append configuration directives:

; change me - 64 bit php => /usr/lib64/php/modules/
; 32 bit php => /usr/lib/php/modules/
zend_extension = /usr/lib64/php/modules/

xcache.admin.auth = On
xcache.admin.user = "mOo"
; xcache.admin.pass = md5($your_password)
xcache.admin.pass = ""

xcache.shm_scheme =        "mmap"
xcache.size  =               32M
xcache.count =                 1
xcache.slots =                8K
xcache.ttl   =              3600
xcache.gc_interval =         300

; Same as aboves but for variable cache
; If you don't know for sure that you need this, you probably don't
xcache.var_size  =            0M
xcache.var_count =             1
xcache.var_slots =            8K
xcache.var_ttl   =             0
xcache.var_maxttl   =          0
xcache.var_gc_interval =     300

; N/A for /dev/zero
xcache.readonly_protection = Off

xcache.mmap_path =    "/dev/zero"

xcache.cacher =               On
xcache.stat   =               On

Save and close the file.

Alternatively, you can also copy default xcache.ini to /etc/php.d/
# cp xcache.ini /etc/php.d/
# vi /etc/php.d/xcache.ini

Restart your Apache web server:
# service httpd restart

If you are using Lighttpd web server, enter:
# service lighttpd restart

Step # 4: Make sure xcache is working

Type the following command for verification:
$ php -v

PHP 5.1.6 (cli) (built: Nov 20 2007 11:11:52)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    with XCache v1.2.1, Copyright (c) 2005-2007, by mOo

You should see line "XCache v1.2.1, Copyright (c) 2005-2007, by mOo"

It means it is not installed or location is different. Run following to find exact location:

find / -iname ""

If you do not see file try to reinstall it again and pay attention to screen, it does put files in one of those lib dir.

(0 votos)
Visto 9289 veces

Más en esta categoría:

K2 y lighttpd issue »

Deja un comentario

Asegúrate de llenar la información requerida marcada con (*). No está permitido el código HTML. Tu dirección de correo NO será publicada.