Install PHPxcache extension module note_php instance in centos

Source: Internet
Author: User
Tags zts
This article describes how to install the PHPxcache extension module in CentOS6.3. This article includes the compilation, installation, configuration, and testing of xchache. If you need it, refer to the installation environment centOS6.3.
APACHE: apache-2.4.4
PHP: 5.4.13

1. Install xchache:

The Code is as follows:


# Wget http://xcache.lighttpd.net/pub/Releases/3.0.1/xcache-3.0.1.tar.gz
# Tar xf xcache-3.0.1.tar.gz
# Cd xcache-3.0.1 # xcache is an extension of php that needs to be loaded using php commands
#/Usr/local/php5/bin/phpize # The phpize command is used to prepare a php extension for compilation. Therefore, the extension must be compiled first.
#./Configure -- enable-xcache -- with-php-config =/usr/local/php5/bin/php-config
# Php-config indicates that php configuration information and compilation options can be obtained;
# Because it is not in the default path, xcache needs to obtain the features enabled during php installation. Otherwise, xcache cannot find the php path.
# Make
# Make install

At the end of installation, the following lines will appear:

The Code is as follows:


Installing shared extensions:/usr/local/php/lib/php5/extensions/no-debug-zts-20100525/
# Install the shared extension module path. Copy the path to the xcache configuration file.

2. Edit php. ini and integrate php and xcache.

The Code is as follows:


# Cd xcache-3.0.1
# Vi xcache. ini


Add the content in the xcache configuration file to the PHP configuration file/usr/local/php5/lib/php. ini.
And find the extension line and change it

The Code is as follows:


Extension =/usr/local/php5/lib/php/extensions/no-debug-zts-20100525/xcache. so


Restart service

The Code is as follows:


Service httpd restart

3. added the phpinfo function to the test page.

Add info. php to/usr/local/apache2/htdocs/to test whether the php module is loaded.

The Code is as follows:


# Vi/usr/local/apache2/htdocs/info. php
---------------
<? Php
Echo phpinfo ();
?>
---------------

Check whether port 80 is enabled

The Code is as follows:


# Lsof-I: 80

Enter http: // localhost/info. php In the browser
The following test page is displayed. The PHP module is successfully loaded under APACHE.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.