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:
4. Attach: Install APC method under Windows
Download Address: Http://kromann.info/php5_2-Release_TS/php_apc.dll
Copy Code code as follows: