One, RPM installation configuration XCache
1.xcache for cache acceleration
PHP third-party extension, stored on the Epel source, the installation package is Php-xcache, on the CentOS6 generally three times times the promotion
[root@localhost~]# Yum List all | grep XCache
Xcache-admin.noarch graphical management interface, no installation required
2.RPM Mounting Php-xcache
[root@localhost~]# Yum insatll-y Php-xcache
3. Configuration files
[root@localhost~]# Cat/etc/php.d/xcache.ini
Generally only xcache.size and Xcache.ttl are adjusted
[Xcache-common] |
|
Extension = xcache.so |
Indicates load cache extension, relative path represents/usr/lib64/moduled/ |
[Xcache.admin] |
|
Xcache.admin.enable_auth = On |
Start Management interface |
Xcache.admin.user = "" |
Administrator user Name |
Xcache.admin.pass = "" |
Administrator-Encrypted (MD5) password |
[XCache] |
|
Xcache.shm_scheme = "Mmap" |
Memory management methods: memory mapping |
Xcache.size = 60M |
The size of the cache in memory |
Xcache.count = 1 |
Number of Cache component segments |
Xcache.slots = 8K |
Cache slots, altogether 64M, each 8k |
Xcache.ttl = 0 |
Cache expires, 0 means permanent |
Xcache.gc_interval = 0 |
|
4. Restart PHP service: See how PHP is deployed
Modules mode: [root@localhost ~]# systemctl Restart httpd
fcgi mode: [root@localhost ~]# systemctl Restart PHP-FPM
Second, compile and install the configuration XCache
1. Dependent Package Installation
#yum Install Php-devel
2. Compiling the installation
#cd xcache-3.2.0
# phpize
#./configure--enable-xcache--with-php-config=/usr/bin/php-config
#make && make Install
Attention:
1) phpize command for current directory generation configure script
2) XCache is installed as a module, generating module installation position/usr/lib64/php/modules/xcache.so
3)--with-php-config can not be specified, will automatically resolve the dependency path
3. Configuration files
#cp xcache.ini/etc/php.d/