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