Detailed example code for Ubuntu installation PHP7,APCU,APCU_BC

Source: Internet
Author: User
Tags apcu intl
Http://www.php.cn/php/php-tp-inst installation PHP7.0

sudo add-apt-repository ppa:ondrej/php  sudo apt-get update  sudo apt-get install-y php7.0    sudo apt-get Install php7.0 php7.0-dev php7.0-mysql php7.0-curl php7.0-cli php7.0-common php7.0-curl php7.0-fpm php7.0-gd php7.0-intl Php7.0-json php7.0-memcached php7.0-mysqlnd php7.0-readline php7.0-zip

PHP has been installed to upgrade to php7.0

sudo add-apt-repository ppa:ondrej/php    Note:        If prompted: Sudo:add-apt-repository:command not found execute:        sudo Apt-get Install Software-properties-common

Update All Programs

sudo apt-get update

Remove the previous PHP5 extension

sudo apt-get purge php5-*

To install all updated data

sudo apt-get upgrade

Install PHP7 and previously removed extensions

sudo apt-get install php7.0 php7.0-dev php7.0-mysql php7.0-curl php7.0-cli php7.0-common php7.0-curl php7.0-fpm php7.0-gd Php7.0-intl Php7.0-json php7.0-memcached php7.0-mysqlnd php7.0-readline php7.0-zip

Setting the time zone in configuration/etc/php7/cli/php.ini

Date.timezone = Asia/shanghai

Installing the APCU,APCU_BC Extension

sudo apt-get install PHP-APCU PHP-APCU-BC

When the above command fails to install, you need to manually download the installation package and install it yourself:

Download the installation package  wget Http://mirrors.kernel.org/ubuntu/pool/universe/p/php-apcu/php-apcu_5.1.7+4.0.11-2_amd64.deb  wget http://mirrors.kernel.org/ubuntu/pool/universe/p/php-apcu-bc/php-apcu-bc_1.0.3-2_amd64.deb    //installation software  sudo dpkg-i php-apcu_5.1.7+4.0.11-2_amd64.deb  sudo dpkg-i php-apcu-bc_1.0.3-2_amd64.deb

PHP.ini Configuration Apcu

Open/etc/php/7.0/mods-available/apcu.ini  Add code:    apc.enable_cli=on

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.