CentOS installation apc

Source: Internet
Author: User
Tags apc

CentOS installation apc

APC mainly plays two roles. One is to save the php compilation cache in the shared memory. After using APC, it eliminates the need to compile the PHP source code into the PHP Opcode each time, improving performance. As long as the PHP source code is not modified next time, it does not need to be re-compiled. On the other hand, the role is similar to the Memcached function. APC saves data to the shared memory, while Memcached also saves the data in the memory. However, Memcached supports distributed, while APC does not support distributed.

1. Download an object

Find the latest stable apcversion from http://pecl.php.net/package/apc

wgethttp: //pecl .php.net /get/APC-3 .1.9.tgz tar zxvfAPC-3.1.9.tgz cd APC-3.1.9

2. Compile and install

/usr/local/php/bin/phpize . /configure -- enable -apc-- enable -apc-mmap--with-php-config= /usr/local/cine/php/bin/php-config make make install

3. Modify 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=1 apc.cache_by_default=on apc.shm_segments=1 apc.shm_size=32M apc.ttl=7200 apc.user_ttl=7200 apc.num_files_hint=0 apc.write_lock=on

4. Check whether the installation is successful.

php-m| grep apc

If apc is displayed, the installation is successful.

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.