Установка, настройка xcache

xcache предназначен для оптимизации интерпретатора PHP.

Установка remi (нужен для php 5.3.x)

 # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

Установка xcache

 cd /opt
 wget http://xcache.lighttpd.net/pub/Releases/1.3.0/xcache-1.3.0.tar.gz
 tar -xvzf xcache-1.3.0.tar.gz
 cd xcache-1.3.0/
 yum install php-devel gcc
 phpize

Configure, compile and install xcache:

 ./configure --enable-xcache
 make
 make install

/etc/php.d/xcache.ini

 [xcache-common]
 ; change me - 64 bit php => /usr/lib64/php/modules/xcache.so
 ; 32 bit php => /usr/lib/php/modules/xcache.so
 zend_extension = /usr/lib/php/modules/xcache.so
 
 [xcache.admin]
 xcache.admin.auth = On
 xcache.admin.user = "mOo"
 ; xcache.admin.pass = md5($your_password)
 xcache.admin.pass = ""
 
 [xcache]
 xcache.shm_scheme =        "mmap"
 ; Memory size for cache
 xcache.size  =               32M
 ; This value for SMP CPUs. The recommended value to use is count of your cpu + 1
 xcache.count =                 9
 xcache.slots =                8K
 ; Time To Live value for the php entry (cached opcodes of a file)
 xcache.ttl   =              3600
 ; Garbage collection interval
 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
 ; This value for SMP CPUs. The recommended value to use is count of your cpu + 1
 xcache.var_count =             9
 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
 
 xcache.optimizer = On

Ссылки

Комментарии

 
blog/2011/12/15-установка_настройка_xcache.txt · Последние изменения: 2011/12/15 17:40 — Антон Бугреев · []