Installing PHP APC on GNU/Linux Centos 5
原贴:http://2bits.com/articles/installing-php-apc-gnulinux-centos-5.html
Published Mon, 2008/03/24 - 13:49, Updated Wed, 2009/07/15 - 23:40
Complex PHP applications, such as Drupal, can gain a lot of performance benefits from running a PHP op-code cache/accelerators
.
APC,
Alternate PHP Cache, is now the most maintained free/open source
op-code cache, and is being used more and more as it emerges to be the
most stable.
The instructions here detail how to get APC running on a CentOS 5
server. The server happened to have Plesk on it as well, which
initially made me hesitant to install APC "normally", since Plesk is so
picky on what other software is installed on the server. However, it
seems to have worked out well.
First, we need the pecl
command so we can download and install APC from the repositories.
Do to so, we execute the following command:
yum install php-pear
But, this will not run on its own, we need the following package for the phpize
command:
yum install php-devel
We also need the apxs
command, which is installed via the following package:
yum install httpd-devel
Now we have all the software we need, so we install apc via the pecl command:
pecl install apc
Once that finishes, we need to enable apc in Apache's configuration. the following command should do this for us.
echo "extension=apc.so" > /etc/php.d/apc.ini
Then we restart Apache:
/etc/init.d/httpd start
And we are all done. Watch for less execution time per page,
and decreased memory usage per Apache process compared to what you had
before.
Links
You can find some additional tips at Setting up Alternative PHP Caching APC support on Centos server
.
‹ Increasing Drupal's speed via the Squid caching reverse proxy
up
Installing PHP APC on GNU/Linux Ubuntu Gutsy Gibbon 7.10 (and Debian) ›
»
Add new comment
Pecl may not be able to perform the
相关文档:
最近两天项目需要,由于服务器正在开发,客户端进度稍快一些,没有服务器进行联调。因此我重操旧业,用PHP快速的写了一些web页面,算是当测试桩程序了,七八个web接口,基本上5到6个小时搞定了。由于当前的服务器需要与其他服务器进行对接,因此写的这个web服务还需要充当client角色,向其他服务器发送请求。
在网上搜了一 ......
摘要:一、涉及到的危险函数〔include(),require()和include_once(),require_once()〕 include()&&require()语句:包括并运行指定文件。这两种结构除了在如何处理失败之外完全一样。include()产生一个警告而require()则导致一个致命错误。换句话说,如果你想在遇到丢失文件时停止处理页面就用require()。include() ......
这段时间在一个电子商务公司待在,所以接触到很多电子商务的概念。
也接触到了一个全新的电子商务模式。这里由于涉及到了公司的营销
策略方面的商务机密,所以不便过多的谈及。
不过一个好的idea,总是会勾起很多的不畏失败的尝试。我就从最基
础的电子商务开始叻。
刚好有个朋友准备做手机的电子商务,用前几篇文章提 ......
这一节课的内容比较少,主要讲了抽象类和抽象方法。
抽象类是指含有抽象方法的类,抽象类至少要包含一个抽象方法。用abstract关键字定义抽象方法和类。
抽象方法的特点是只有方法名,不包含方法体,即没有方法实现,具体体现在代码中就是抽象方法不包含大括号{}。
抽象类不能被实例化,只能被继承,继承的子类必须重载父 ......
原贴:http://www.162cm.com/archives/433.html
Blog
联系我
about
PHP 装上APC之后的问题:
APC由于能够缓存文件上传进度,因此算是解决了一直以来困挠PHP开发人员的一个老大难,所以我也特别喜欢他了。如果对php实现文件上传进度条有困 难,可以看这里
。
不过今天发现,APC宣称的加速功能,其实也是一种缓存 ......