Home  >  Article  >  Backend Development  >  ubuntu install APC

ubuntu install APC

WBOY
WBOYOriginal
2016-07-29 08:51:001044browse

Alternative PHP Cache, the full Chinese name is "Optional PHP Cache", is a component of PECL, which can be used to cache and optimize PHP code on the web server and improve server performance. It can be installed separately from PECL, and you can check whether it is installed correctly through phpinfo().

APC can significantly accelerate the speed of PHP applications. Its implementation principle is to cache the PHP intermediate code of opcode. Adding APC to the application can improve the response speed of the application and reduce the server load.

Here we introduce how to install APC.

1. First install the necessary packages

?

1

sudoapt-get installphp -pear php5-dev apache2-threaded- dev

2. Install APC:

?

1

sudopecl installapc-3.1 .6

3. Create the configuration file /etc/php5/conf.d/apc.ini with the following content:

?

1

extension=apc.so

4. Restart Apache:

?

1

sudo /etc/init.d/apache2restart

After Apache restarts, the APC part will be included in php.ini, you can see it in phpinfo() To the output information:

The above introduces the installation of APC on ubuntu, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn