升级php 5.5。*到php 5.6。*使用apt-get [英] Upgrade php 5.5.* to php 5.6.* using apt-get
问题描述
我安装了一个新的本地服务器,当我安装php5软件包与 apt-get install php5
它得到版本5.6。
I installed a new local server, when I installed php5 package with apt-get install php5
it got the version 5.6.
我的生产服务器仍然是php 5.5,我想像我的开发环境一样升级到php 5.6。
My production server is still with php 5.5 and I would like to upgrade it to php 5.6 like in my dev environment.
我可以轻松使用apt-get?告诉apt-get切换到分支5.6?
Can I do it easily using apt-get ? tell to apt-get to switch to the branch 5.6 ?
Thx
推荐答案
按照显示的顺序输入以下命令:
Enter the following commands in the order shown:
apt-get -y update
add-apt-repository ppa:ondrej/php
apt-get -y update
apt-get -y安装php5.6 php5.6-mcrypt php5.6-mbstring php5.6-curl
php5.6-cli php5.6-mysql php5。 6-gd php5.6-intl php5.6-xsl
输入以下命令以验证PHP 5.6是否正确安装:
Enter the following command to verify PHP 5.6 installed properly:
php -v
以下是一个示例响应,表明安装了PHP 5.6:
Following is a sample response that indicates PHP 5.6 is installed:
PHP 5.6.22-4+deb.sury.org~trusty+1 (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
完成+
这篇关于升级php 5.5。*到php 5.6。*使用apt-get的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!