Add XCache acceleration for lamp

Source: Internet
Author: User

Install XCache for PHP acceleration

In a previous blog post, I wrote about the construction of lamp http://407711169.blog.51cto.com/6616996/1185226. Finally, the function of XCache acceleration is mentioned. Here is a detailed look at the acceleration and contrast.

Xcahe can speed up the speed of PHP execution, plus installation settings are intuitive, use this to try

1 Installation xcache-3.0.1

[Root@localhost ~]# Tar xf xcache-3.0.1.tar.gz      
[root@localhost ~]# cd xcache-3.0.1       //xcache is an extension of PHP, To load this extension with the PHP command
[root@localhost xcache]#/usr/local/php/bin/phpize     //phpize command function is to prepare a PHP extension ready to compile, so the extension has to perform the compilation first      
[root@localhost xcache]#./configure--enable-xcache--with-php-config=/usr/local/php/bin/php-config
// Php-config indicates the ability to obtain PHP configuration information and compile-time option information;
//Because it is not in the default path, XCache to obtain the features enabled by the PHP installation, XCache will not find the path to PHP
[ Root@localhost XCache] #make
[root@localhost xcache] #make install
When the installation is complete, a similar line appears:
Installing shared Extensions:     /usr/local/php/lib/php/extensions/no-debug-zts-20100525/      
//install Shared extension Module path, copy this path first, Wait a minute. Copy to XCache configuration file

2 edit php.ini, integrate PHP and XCache

[Root@localhost xcache]# mkdir/etc/php.d      
[root@localhost xcache]# cp xcache.ini/etc/php.d    // Import the sample configuration provided by XCache to php.ini restart     
network Services View Web page

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.