始于2009年10月08日 PM
版本号:Debian-5.03 APC for PHP, 2009年10月08日首版
转载请注明出处,谢谢!
本文中难免有不足、遗漏、错别字和句子不通之处,如发现、或者有更新改变之处,请与我联系以及时修正和完善!
在配置这个程序的前提是你已安装了apache+php+mysq.如果你还没有安装那么你可以查看LAMP即由Linux+Apache+Mysql+PHP组成的一个WEB开发平台.
接下来就是要下载APC代码.
samba:/usr/local/src#wget http://pecl.php.net/get/APC-3.0.19.tgz
samba:/usr/local/src#tar xvf APC-3.0.19.tgz
samba:/usr/local/src#cd APC-3.0.19
samba:/usr/local/src/APC-3.0.19#/usr/local/php/bin/phpize 注意在你要这编译apc之前一定要先运行phpize让它生成configure文档.
samba:/usr/local/src/APC-3.0.19#./configure –enable-apc –enable-apc-mmap –with-php-config=/usr/local/php/bin/php-config
samba:/usr/local/src/APC-3.0.19#make
samba:/usr/local/src/APC-3.0.19#make install
samba:/usr/local/src/APC-3.0.19#vi /usr/local/php/lib/php.ini
修改此文档.添加apc所需要的路径.
extension_dir=”/usr/local/php/lib/php/extensions/no-debug-zts-20060613/” 此路径是在你make install会有提示此行.
extension=”apc.so”
apc.enabled=1
apc.shm_segments=1
apc.shm_size=128
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.enable_cli=1
apc.rfc1867 = on
apc.max_file_size = 1000M
upload_max_filesize = 1000M
post_max_size = 1000M
samba:/usr/local/src/APC-3.0.19# /etc/init.d/apache2 stop
samba:/usr/local/src/APC-3.0.19# /etc/init.d/apache2 start
这样就安装完APC.使用phpinfo.php可以查看如下:
| APC Support | enabled |
| Version | 3.0.19 |
| MMAP Support | Enabled |
| MMAP File Mask | /tmp/apc.08ffTX |
| Locking type | pthread mutex Locks |
| Revision | $Revision: 3.154.2.5 $ |
| Build Date | Oct 8 2009 09:06:58 |

如果你是专业人员.你想调试相关的参数那么请查看.表 1. APC configuration options
原创文章,转载请注明: 转载自PT Ubuntu Blog

十月 7th, 2009
ptubuntu
Posted in
Tags: 





这个挺不错的东西^_^我是用的 LNMP
@久酷: 这个我很早也装过。后来也装也没再玩。不过有空可以再去玩玩。