Installing APC in CentOS

Source: Internet
Author: User
Tags apc

APC has two main functions,The first is to save the PHP compilation cache in shared memory, it is simple to understand that after the use of APC, the provincegoing to need each time to be PhpThe source code compiles to PHP Opcode time, improves the performance, as long as the next PHP source code does not have any repair , you do not need to recompile. On the other hand the role is similarMemcachedthe function,APC is saving data to shared memory, Memcached also stores data in memory, but Memcached supports distributed, and APC does not.

1 downloading files

from http://pecl.php.net/package/ APC Find the latest APC Stable version

Wgethttp://pecl.php.net/get/apc-3.1.9.tgztar ZXVF APC-3.1.9.TGZCD APC-3.1.9


2 compiling the installation

/usr/local/php/bin/phpize./configure--ENABLE-APC--enable-apc-mmap--with-php-config=/usr/local/cine/php/bin/ Php-configmakemake Install

3 modifying php.ini

Vim/etc/php.ini

Add the following content:

[apc]extension= "/usr/local/cine/php/lib/php/extensions/no-debug-non-zts-20090626/apc.so" apc.enabled = 1apc.cache _by_default = onapc.shm_segments = 1apc.shm_size = 32mapc.ttl = 7200apc.user_ttl = 7200apc.num_files_hint = 0apc.write_loc K = On

4 Detecting whether the installation was successful

php-m | grep APC

If there is a display APC instructions have been installed successfully



This article is from the "Under Siege" blog, make sure to keep this source http://308107405.blog.51cto.com/6396647/1621839

Installing APC in CentOS

Related Article

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.