• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Install XCache - Optimize PHP Performance

{{postValue.id}}

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

code

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

phpinfo

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


PHP Version
Xcache


XcacheCacher
Xcache_Converger

Tags:
benjamin
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is the command to install Xcache in Ubuntu?

A

By using this command you can install
Syntax: "apt-get install php5-xcache"

Q

What if I'm getting "undefined symbol"?

A

If your php is configured --enable-versioning, disable it. It's broken. If you insist on versioning, build XCache as a static module of php.

Q

Where Is ./configure file in a system?

A

You have to install php first, which gives you "phpize" executable(script), and do
~/src/xcache $ phpize
(generating configure)
~/src/xcache $ ./configure --help
~/src/xcache $ ./configure --enable-

Q

Why is my cache being cleared?

A

You are Setted PHP_FCGI_CHILDREN to 1 or greater if you're using php FastCGI.

Q

Why Apache2 keeps getting segmentation faults with cache larger than 4M?

A

For that you have to set
Syntax: "Set "xcache.readonly_protection = On" in php.ini"

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Lucas ?
Various options in Top command

Am using Top command only to view the load average, what are the various options in Top command..??

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.