Ubuntu 14.04:升级到php7并卸载php5? [英] Ubuntu 14.04: Upgrade to php7 and uninstall php5?
本文介绍了Ubuntu 14.04:升级到php7并卸载php5?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在基于Ubuntu 14.04的docker映像中将php版本升级到7.0.我阅读了一些文章,其中提供了在安装php7.0时卸载php5的命令.这真的有必要吗?优缺点都有什么?
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?
推荐答案
为PHP 7添加新的存储库:
add the new repository for PHP 7:
apt-get install software-properties-common
add-apt-repository ppa:ondrej/php
从系统中删除PHP 5并安装PHP 7
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
这篇关于Ubuntu 14.04:升级到php7并卸载php5?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文