Centos installation and configuration apc memory cache

Source: Internet
Author: User
Tags apc zts

Centos installation and configuration apc memory cache

1. download the latest version of apc from centos

Wget-c 'HTTP: // Git.PHP.net /? P = pecl/caching

Note: Try to download the latest version. Otherwise, the php version may be compatible.

2. decompress the package and enter the APC directory.

Tarxzvfapc.tar.gz

Cdapc-6a90406

3. Run phpize

/Usr/local/php/bin/phpize

NOTE: If phpize is not found, you can use find/-namephpize to search for phpize and then run phpize.

4. Run configure.

. /Configure -- enable-apc-mmap -- with-php-config =/phpstudy/server/php/bin/php-config -- prefix =/usr/local/apc

NOTE: If php-config is not found, use the correct path in step 3.

5. Install APC

Make & make install

In the last two lines of output information, you can see information similar to/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/, and the installation is successful.

6. View apc. so

Ll/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/

If apc. so is displayed, everything is normal.

7. Configure php. ini

Add the following code at the end of php. ini:

[Apc] extension = "apc. so "apc. enabled = 1apc. cache_by_default = onapc. shm_segments = 1apc. shm_size = 64Mapc. ttl = 7200apc. user_ttl = 7200apc. num_files_hint = 0apc. write_lock = Onapc. max_file_size = 100 M

8. Restart the www server or centos.

9 use phpinfo () to verify apc. If you see the apc information, the installation is complete and you can start to use apc.

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.