Notes on installation and configuration of PHP accelerator APC in Linux

Source: Internet
Author: User
Tags apc zts
This article mainly introduces the installation and configuration notes of the PHP accelerator APC in Linux. This article also describes how to install apc in Windows. For more information, see

This article mainly introduces the installation and configuration notes of the PHP accelerator APC in Linux. This article also describes how to install apc in Windows. For more information, see

Currently I am using the APC-3.1.9 stable, you can download the latest version by yourself.

1. Installation

The Code is as follows:


Wget
Tar xzvf APC-3.1.9.tgz
Cd APC-3.1.9
/Usr/local/php/bin/phpize
. /Configure -- enable-apc-mmap -- with-php-config =/usr/local/php/bin/php-config -- prefix =/usr/local/apc
Make & make install

Note: Check the corresponding directory after installing and compiling:

The Code is as follows:


Ll/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
-Rwxr-xr-x 1 root 659164 Apr 8 apc. so

Installed successfully!

2. Configure/usr/local/php/etc/php. ini.

The Code is as follows:


Vi/usr/local/php/etc/php. ini

Shift + g to the last line, and add at the end

The Code is as follows:


[Apc]
Extension = "/usr/local/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 = 64
Apc. ttl = 7200
Apc. user_ttl = 7200
Apc. num_files_hint = 0
Apc. write_lock = On

Then copy the APC. php file under the apc directory to the accessible directory.

The Code is as follows:


Cp/root/APC-3.1.9/apc. php/home/wwwroot/

3. Restart LNMPA

The Code is as follows:


/Root/lnmpa restart

4. Appendix: Install apc in Windows

:

The Code is as follows:


Extension = php_apc.dll

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.