Linux php5.4 installation accelerates expansion of APC configuration

Source: Internet
Author: User
Tags apc apc configuration

1.APC Introduction
The alternative PHP cache (APC) Chinese full name is an "optional PHP buffer", an open source cache tool that works with PHP, and can be used to cache and optimize PHP code on a Web server to improve server performance.
2.APC Advantages
Both APC and eaccelerator are good php acceleration caches, but why is it recommended to use APC here?
(1) Stability
Based on our testing of several large sites, APC performance is slightly less than eaccelerator in low-load situations, but APC is more stable than eaccelerator in the case of long-running large traffic. If the site appeared in PHP suddenly suspended animation, no reason to appear 502 error, we recommend the use of APC.
(2) Technical support
APC has grown rapidly since FACEBOOK joined the update to APC and has grown considerably, and the new version of Eaccelerator has been poorly stabilized and features and code have been removed quite a bit.
(3) Compatibility
Good support for PHP5.3 and 5.4 versions by APC
3.APC installation (see Accessories for installation package)
[Email protected] opt]# tar zxf apc-3.1.13.tgz
[Email protected] opt]# CD APC-3.1.13
[Email protected] apc-3.1.13]#/usr/local/php/bin/phpize
[Email protected] apc-3.1.13]#/configure--with-php-config=/usr/local/php/bin/php-config--ENABLE-APC-- Enable-mmap--enable-apc-spinlocks--disable-apc-pthreadmutex
[[email protected] apc-3.1.13]# make && make install
[Email protected] apc-3.1.13]# Vi/usr/local/webapps/php/etc/php.ini #加入以下参数
Extension=apc.so
apc.enabled = 1
Apc.shm_size = 64M
Apc.stat = 1
Where Apc.shm_size set is the size of the memory, generally with 64M, memory can be changed to 32M.
Apc.stat is set to 0 o'clock, performance is improved. But every time the PHP file is modified, you have to restart PHP to take effect. If you usually need to change PHP frequently
File, it is recommended to set this parameter to 1.
4. Restart the PHP test

650) this.width=650; "title=" 0.jpg "style=" Float:none; "alt=" wkiol1s1_4djpxaeaaffghrvfva428.jpg "src=" http:/ S3.51cto.com/wyfs02/m02/58/9d/wkiol1s1_4djpxaeaaffghrvfva428.jpg "/>

650) this.width=650; "title=" 3.jpg "style=" Float:none; "alt=" wkiom1s1_rbboznfaagj3wjrime990.jpg "src=" http:/ S3.51cto.com/wyfs02/m02/58/a0/wkiom1s1_rbboznfaagj3wjrime990.jpg "/>

This article is from the "Linux art (q Group: 1991706)" blog, please be sure to keep this source http://304076020.blog.51cto.com/7503470/1603882

Linux php5.4 installation accelerates expansion of APC configuration

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.