且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在debian上安装apcu作为php7扩展

更新时间:2023-02-22 20:50:42

首先,我假设您安装了PHP7使用 DotDeb APT存储库。如果没有,这是你应该如何安装。



一旦PHP7安装并正常工作,假设系统上没有安装其他版本的PHP,请安装 apcu via:

  sudo apt-get install php7.0-dev 
pecl channel-update pecl.php.net
pecl install apcu

echoextension = apcu.so>> `php --ini | grep加载配置| sed -es |。*:\s * ||

只需按回车即可提示您指定任何配置。


I have seen this tutorial for ubuntu. http://thereluctantdeveloper.com/2015/12/quick-and-dirty-php-70-set-up-on-ubuntu-1404-with-apcu

It's not clear for me after step(git clone). I need apcu extension for my app to perform faster. Please guide to install apcu extension for php 7 on debian.

First, I'm assuming you installed PHP7 using the DotDeb APT Repository. If not, this is how you should install it.

Once PHP7 is installed and working properly, and assuming there are no other versions of PHP installed on the system, install apcu via:

sudo apt-get install php7.0-dev
pecl channel-update pecl.php.net
pecl install apcu

echo "extension=apcu.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`

Just press enter if prompted to specify any configuration.