Sample code for installing PHP7, APCu, and APCu_bc in Ubuntu

Source: Internet
Author: User
Tags apcu intl
This article details the sample code for installing PHP7, APCu, and APCu_bc in Ubuntu. if you need it, refer to # php/php-tp-inst to install 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 and upgraded to php7.0.

Sudo add-apt-repository ppa: ondrej/php note: If the prompt is: sudo: add-apt-repository: command not found, run: sudo apt-get install software-properties-common.

Update all programs

sudo apt-get update

Delete the PHP5 extension

sudo apt-get purge php5-*

Install all updated data

sudo apt-get upgrade

Install PHP7 and previously deleted 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

Set the time zone in/etc/php7/cli/php. ini

date.timezone = Asia/Shanghai

Install apcu and apcu_bc extension

sudo apt-get install php-apcu php-apcu-bc

When the preceding command cannot be installed, you need to manually download the installation package and install it on your own:

// Download 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 // install 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

Configure apcu in php. ini

Open/etc/php/7.0/mod-available/apcu. ini and add the code: apc. enable_cli = On.

The above is a detailed description of the sample code for installing PHP7, APCu, and APCu_bc in Ubuntu. For more information, see other related articles in the first PHP community!

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.