大概过程如下
lsb_release -a
#https://www.digitalocean.com/community/questions/how-to-upgrade-from-php-v-5-5-9-to-v-5-6
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.6 php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml
sudo a2dismod php5
sudo a2enmod php5.6
sudo service apache2 restart
一下是需要的模块
sudo apt-get install php5.6-curl
sudo apt install php5.6-bcmath
sudo apt install php5.6-gd
sudo apt install php5.6-zip