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.