Notes on installation and configuration of PHP accelerator APC in Linux, accelerator apc
Currently I am using the APC-3.1.9 stable, you can download the latest version from the http://pecl.php.net/package/APC.
1. Installation
Copy codeThe Code is 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-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:
Copy codeThe 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.
Copy codeThe Code is as follows:
Vi/usr/local/php/etc/php. ini
Shift + g to the last row and add at the end
Copy codeThe 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.
Copy codeThe Code is as follows:
Cp/root/APC-3.1.9/apc. php/home/wwwroot/
3. Restart LNMPA
Copy codeThe Code is as follows:
/Root/lnmpa restart
4. Appendix: Install apc in Windows
: Http://kromann.info/php5_2-Release_TS/php_apc.dll
Copy codeThe Code is as follows:
Extension = php_apc.dll
The html form submits data to php. The php file is not executed, but the download is prompted. apache and php configuration problems in linux
There are many causes of errors. You need to analyze the specific problems.
1. Problems with linux x86-64 using the mmcache Module
2. due to a problem in the php compilation and installation process, or after apache + php is installed, PHP has been re-compiled and installed. apache also re-compiled. we recommend that you retain httpd. after conf and related configuration files, reinstall apache + PHP again. Pay attention to the sequence. If this prompt is still displayed, replace the php version and reinstall it.
3. php module zend_extension conflicts with extension
4. This is a common problem with op-code Cache Optimization Software because APC is used. We recommend that you use the latest version (pecl.php.net/package/APC). apache can only be restarted once it appears.
5. The/tmp directory contains too many files, which is normal after deletion
6. Change the configuration mode to worker and prefork.
7. Conflict Between ZendOptimizer-3.3.0 and jdk1.7.0
8. Some special files accessed by the web. Check access_log to see that the file is deleted.
. The problem is that your apache and php are faulty. Or your php has a problem.
Try to submit the PHP file to an empty file.
Only one PHP file is written.
<? Php
Phpinfo ();
?>
How does apc in php cache opcode? Assume that I have installed apc and configured enable apc cache in phpini.
$ Memcache = new Memcache;
$ Memcache-> pconnect ("127.0.0.1", 11211 );