php7.0及mysql、gd扩展安装

摘自https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-php-7-on-ubuntu-14-04
1.Adding a PPA for PHP 7.0 Packages

$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt-get update
#若报错找不到该命令 是因为缺少python-software-properties 
#于是 apt-get install python-software-properties 
#除此之外还要安装 software-properties-common 
#于是 apt-get install software-properties-common 
#然后就能用add-apt-repository了

2.Upgrading mod_php with Apache

$ sudo apt-get install php7.0
$ sudo apt-get install php7.0-mysql

3.安装gd插件

$ sudo apt-get install php7.0-gd
# php5同理需要安装 php5-gd

4.for Debian

#add to /etc/apt/sources.list
deb http://packages.dotdeb.org jessie all
$ sudo apt-get update
$ sudo apt-get install php7.0

你可能感兴趣的:(php)