Ubuntu 14.04: Upgrade to php7 and uninstall php5?

邮差的信 提交于 2019-12-11 01:22:45

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!