问题
I'm upgrading the php version to 7.0 in my docker image which is based on Ubuntu 14.04. I read some articles giving the commands to uninstall php5 while installing php7.0. Is this really necessary? What are the pros and cons?
回答1:
add the new repository for PHP 7:
apt-get install software-properties-common
add-apt-repository ppa:ondrej/php
remove PHP 5 from your system and install PHP 7
apt-get update && apt-get purge php5-fpm && apt-get --purge autoremove && apt-get install php7.0-fpm php7.0-mysql php7.0-curl php7.0-gd php7.0-json php7.0-mcrypt php7.0-opcache php7.0-xml
see this article for more details
https://bjornjohansen.no/upgrade-to-php7
来源:https://stackoverflow.com/questions/40611976/ubuntu-14-04-upgrade-to-php7-and-uninstall-php5