- These instructions are intended specifically for installing XCache, an open-source opcode cacher.
- I’ll be working from a Liquid Web Core Managed CentOS 7 server, and I’ll be logged in as non-root user. If you need more information then visit our tutorial on How to Add a User and Grant Root Privileges on CentOS 7.
Step #1: Add the EPEL RepositoryAnsible is part of Extra Packages for Enterprise Linux (EPEL), which is a community repository of non-standard packages for the RHEL distribution. First, we need to install the EPEL repository. Directions on enabling EPEL can be found here.
Step #2: The InstallationAs a matter of best practice we’ll update our packages:
sudo yum -y updateThen let’s install XCache and any required packages:
sudo yum -y install php-xcache xcache-admin
Step #3: Verify the Extension is AvailableNow verify that the extension is available by using the following command:
php -m | grep XCacheYour result should be:
XCache XCache Cacher XCache Coverager XCache Optimizer XCache XCache Cacher XCache Coverager XCache OptimizerListing the PHP version should now include information about XCache as well:
PHP 5.4.16 (cli) (built: Oct 31 2014 12:59:36) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies with XCache v3.1.1, Copyright (c) 2005-2014, by mOo with XCache Optimizer v3.1.1, Copyright (c) 2005-2014, by mOo with XCache Cacher v3.1.1, Copyright (c) 2005-2014, by mOo with XCache Coverager v3.1.1, Copyright (c) 2005-2014, by mOo