Linux PHP Accelerator APC installation and configuration notes _php tips

Source: Internet
Author: User
Tags apc zts

At present I am using APC-3.1.9 stable, can download the latest version to Http://pecl.php.net/package/APC myself.

1, installation

Copy Code code as follows:

wget http://pecl.php.net/get/APC-3.1.9.tgz
Tar xzvf apc-3.1.9.tgz
CD APC-3.1.9
/usr/local/php/bin/phpize
./configure--ENABLE-APC--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 the installation is compiled:

Copy Code code as follows:

ll/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
-rwxr-xr-x 1 root root 659164 Apr 8 18:30 apc.so

Installation Successful!

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

Copy Code code as follows:

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

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

Copy Code code 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 from the APC directory to the directory you can access.

Copy Code code as follows:

cp/root/apc-3.1.9/apc.php/home/wwwroot/

3, restart Lnmpa

Copy Code code as follows:

/root/lnmpa restart

4. Attach: Install APC method under Windows

Download Address: Http://kromann.info/php5_2-Release_TS/php_apc.dll

Copy Code code 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.