How to install xCache on CentOS/RHEL 5/6/7
XCache is a quick, stable PHP opcode cacher. This generally new opcode caching software has been produced by mOo. XCache optimizes performance caching the compiled state of PHP scripts into the RAM and uses the compiled version straight from the RAM. This may increment php execution 1-5 times quicker than default installation.
Step 1: Install XCache for PHP
You can simply use yum command to install xcache for php.
# yum install php-xcache xcache-admin
Step 2: Configure XCache
XCache creates its default php configuration file xcache.ini. This file contains a long list of parameters
# vim /etc/php.d/xcache.ini
Step 3: Verify XCache
Create a php info file using below content and upload to your web server under document root. Open this file in browser and search for xcache.
# vim /var/www/html/info.php
<?php phpinfo(); ?>
Step 4: Configure XCache Admin Panel
XCache also gives admin panel by which we can view caching state, clear store or disabled. Utilizing default installation it’s not enabled. Below setup will enable XCache admin panel with password protected.
# cp -r /usr/share/xcache /usr/local/apache2/htdocs
# echo -n "secreatpassword" | md5sum
Output:
753f51a9cca136b41c5f7cced1f813dd -
# vim /etc/php.d/xcache.ini
[xcache.admin] xcache.admin.enable_auth = On xcache.admin.user = "xadmin" ; set xcache.admin.pass = md5($your_password) ; login use $your_password xcache.admin.pass = "753f51a9cca136b41c5f7cced1f813dd"
For CentOS/RHEL 5/6: # /etc/init.d/httpd restart For CentOS/RHEL 7: # systemctl restart httpd
http://techoism.com/xadmin/ Login: xadmin / secreatpassword