CentOS 6.3 Install PHP xcache Extension Module notes _php instance

Source: Internet
Author: User
Tags install php phpinfo zts centos

Installation Environment centOS6.3
apache:apache-2.4.4
php:5.4.13

1. Install Xchache:

Copy Code code 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是php的扩展, to load this extension with the PHP command
#/usr/local/php5/bin/phpize #phpize命令作用是要准备一个php扩展准备编译, so the extension has to perform the compilation first
#./configure--enable-xcache--with-php-config=/usr/local/php5/bin/php-config
#php-config represents the ability to obtain PHP configuration information and compile-time option information;
# #由于不在默认路径下, XCache to get the functionality enabled by the PHP installation, XCache will not find the path to PHP
#make
#make Install

At the end of the installation, something like the following line appears:

Copy Code code as follows:

Installing Shared extensions:/usr/local/php/lib/php5/extensions/no-debug-zts-20100525/
#安装共享扩展模块路径, copy this path first, wait, copy it to the XCache profile.

2 edit php.ini, integrate PHP and XCache

Copy Code code as follows:

# CD xcache-3.0.1
# VI Xcache.ini

Add the content under the XCache profile to the PHP configuration file/usr/local/php5/lib/php.ini
and find extension this line and fix it instead
Copy Code code as follows:

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

Restart Service
Copy Code code as follows:

Service httpd Restart

3. Add phpinfo function, test page

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

Copy Code code as follows:

# vi/usr/local/apache2/htdocs/info.php
---------------
<?php
Echo Phpinfo ();
?>
---------------

Check if port 80 is open

Copy Code code as follows:

# lsof-i:80

Browser input http://localhost/info.php
Display the following test page content, PHP module that is loaded under Apache success

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.