Installing APC op-code cache on Ubuntu 10.04

61 篇文章 0 订阅

http://blog.thecodingmachine.com/content/installing-apc-op-code-cache-ubuntu-1004



In this article, I will explain how to install the APC opcode cache in a few easy steps, on Ubuntu 10.04.
APC is an opcode cache (and more). When a PHP script is run, it is compiled by PHP internally, before executing it. PHP does not store the compiled result, therefore, next time the script is run, PHP will compile it again. APC is designed to store the result in its cache. This way, when PHP executes again a script, APC will serve the compiled script from the cache. PHP won't have to parse the script again, and it will save a lot of time.

First step: install PECL

apt-get install apache2-threaded-dev php5-dev php-pear make

Second step: install APC

pecl install apc

APC will ask this question:
Use apxs to set compile flags (if using APC with Apache)? [yes] :

Just answer: yes

PECL will compile the APC extension and generate a apc.so extension file. We need to be sure PHP knows about this file.

Note: if the build fails with this message:
/tmp/pear/temp/APC/php_apc.c:959: error: duplicate ‘static’
make: *** [php_apc.lo] Erreur 1
ERROR: `make' failed

then you might have to retry with a newer version of APC (as of July 2010, the latest stable version of APC does not completely support PHP 5.3 it seems).
Try this instead:
pecl install apc-beta

Third step: enable the extension

cd /etc/php5/conf.d/
nano apc.ini

In the apc.ini file, write:

extension=apc.so

OR

vi /etc/php5/apache2/php.ini

write:

extension=apc.so

Finally, restart Apache:

/etc/init.d/apache2 restart

根据提供的信息,“installing : xdg-utils-1.1.0-0.16.20120809git.1.alios7.noarch 87/92 installing(正在安装:xdg-utils-1.1.0-0.16.20120809git.1.alios7.noarch 87/92)”是在进行软件安装过程中的显示信息。 这段信息表示正在安装一个名为xdg-utils的软件包。软件包的版本号为1.1.0,构建号为0.16,构建日期为2012年8月9日。包的类型为noarch,适用于任何体系结构。该软件包是由alios7构建,并且该软件包在安装顺序中是在总共92个软件包中的第87个。 安装软件包的目的是为了增强Linux系统的桌面集成功能。xdg-utils是一个由freedesktop.org提供的软件套件,提供一系列与桌面环境集成相关的实用工具。通过安装xdg-utils,用户可以更方便地进行程序的启动、文件的打开和浏览器的调用等操作。 在安装过程中,系统会检查软件包的依赖关系,以确保所需的其他软件包已经安装并满足要求。安装过程还可能涉及从软件源或安装媒体下载软件包文件,并将其解压到相应的目录中。 安装软件包的具体过程通常是自动化的,用户只需要等待安装完成。在安装过程中可能还会显示其他信息,如进度百分比或其他配置选项。完成安装后,用户可以根据软件包的使用指南来使用新安装的软件。 总而言之,“installing : xdg-utils-1.1.0-0.16.20120809git.1.alios7.noarch 87/92 installing”是软件安装过程中的显示信息,表示正在安装xdg-utils软件包,该软件包是用于增强Linux系统的桌面集成功能的实用工具套件。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值