How to Install XCache - Optimize PHP Performance
To Install XCache to Accelerate and Optimize PHP Performance
XCache is a fast, stable PHP opcode cacher that has been tested and is now running on production servers under high load. It is tested on GNU/Linux and FreeBSD supported. It is relatively new opcode caching software developed by mOo.
First install and enable the EPEL repository. Once you EPEL repo installation is completed, then install XCache by using the following command.
[root@linuxhelp html]# yum install php-xcache xcache-admin
Loaded plugins: aliases, changelog, fastestmirror, kabi, presto, refresh-packagekit, security, tmprepo, verify, versionlock
Loading support for CentOS kernel ABI
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/metalink 3.3 kB 00:00
.
.
.
Installed:
php-xcache.x86_64 1:3.2.0-1.el6.remi.5.6 xcache-admin.noarch 1:3.2.0-1.el6.remi.5.6
Complete!
Once the installation is completed, start editing the configuration file.
Configuration file
[root@linuxhelp html]# vim /etc/php.d/40-xcache.ini
Here, the default configuration has been made if you want to configure by own. For example, if you want to configure it as a admin portal such as username and password your can modify here.
After the modification is completed, use the below command to view the PHP version.
[root@linuxhelp html]# php -v
PHP 5.6.21 (cli) (built: Apr 28 2016 07:47:46)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
.
.
with xcache Coverager v3.2.0, Copyright (c) 2005-2014, by mOo
Now create the one php file in web root directory (i.e /var/www/html) and enter the following statement into that directory.
[root@linuxhelp html]# vim info.php
Now restart the Apache service.
[root@linuxhelp html]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Now open the web browser, enter your server-ip or hostname with HTTP protocol with configuration file was create under web root directory.
http://server-ip/info.php
or
http://localhost/info.php
Comments ( 0 )
No comments available