ubuntu16 php5

网站迁移笔记

迁移参考: https://www.digitalocean.com/community/tutorials/how-to-move-an-apache-web-root-to-a-new-location-on-ubuntu-16-04 Ubuntu1604 安装php5.6 由于Ubuntu1604 默认安装的是php7。由于网站兼容性问题,需要装php5。 步骤参考:https://phpraxis.wordpress.com/2016/05/16/install-php-5-6-or-5-5-in-ubuntu-16-04-lts-xenial-xerus/ > add-apt-repository ppa:ondrej/php > apt-get update > apt-get install php5.6 php5.6-mbstring php5.6-mysql php5.6-sqlite3 > 还有这些按需要装 php5.6-cli php5.6-curl php5.6-json php5.6-mcrypt php5.6-curl php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0 mysql-server-5.7 apache2 # php 版本切换方法2 > sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart ; echo 1 | sudo update-alternatives –config php > sudo a2dismod php5.6 ; sudo a2enmod php7.