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
相关文档:
1.下载Zend for Linux。
2.第一步当然是解压zip,解压出来一个 bin 格式的安装文件,
cp到我的用户目录home/ibm中,在终端地直接输入./ZendStudio-5_5_1.bin,安装便自动安装(需要jre支持,我已经提前安
装过了,安装命令是:sudo apt-get install sun-java6-jre
sun-java6-jdk),过不了多久,便开始了界面安装,见 ......
今天要讲的是linux下php扩展的入门篇
下面我来讲讲如何作一个php的扩展
首先要有一个搭建好的php环境
我把php的安装在了/usr/local/php当然也通过
php的一个配置php.ini的路径但是要注意了
用这种方法安装的php扩展不能实现
我们在php安装以后的/usr/local/php/bin目录
找到这个文件php ......
初学PHP,对$_SERVER这个东西很感兴趣.在网上找了N长时间.是我智商有问题? 还是?
呵呵.干脆不如自己一个一个看...
我的IDE环境: Xmapp省着自己配置了...
//功能:打印$_SERVER->Array();
/*PHP Code Star*/
foreach ($_SERVER as $key => $value)
{
echo $key.":".$value."<br>";
}
/*PHP Code En ......
<?php
$txt = 'Hello world';
echo $txt;
?>
<br/>
字符串连接(.)
<br/>
echo 'Hello world'. "" . '1234' 输出:
<?php
$txt1 = 'Hello world';
$txt2 = '1234';
  ......