php5.3升級到php5.6

來源:互聯網
上載者:User

標籤:php   yum   update   

centos預設系統安裝的是php5.3

[[email protected] scripts]# rpm -qa |grep php
php-pdo-5.3.3-47.el6.x86_64
php-mysql-5.3.3-47.el6.x86_64
php-5.3.3-47.el6.x86_64
php-cli-5.3.3-47.el6.x86_64
php-common-5.3.3-47.el6.x86_64

卸載

rpm -e php-mysql-5.3.3-48.el6_8.x86_64
rpm -e php-bcmath-5.3.3-48.el6_8.x86_64
rpm -e php-5.3.3-48.el6_8.x86_64
rpm -e php-common-5.3.3-48.el6_8.x86_64
rpm -e php-common-*  #依賴包過多用yum卸載
yum -y remove php-common-*



安裝php5.6.25

rpm -Uvh http://download.Fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm


yum install --enablerepo=remi,remi-php56 php php-opcache php-pecl-apcu php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-pdo php-pear php-fpm php-cli php-xml php-bcmath php-process php-gd php-common


[[email protected] scripts]# php -v
PHP 5.6.25 (cli) (built: Aug 31 2016 19:26:19)
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
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans

ps:有時候會出現phpinfo()列印和php -v顯示的不是一個版本,如果是剛更新的要解決這個問題需要重啟apache服務即可。






php5.3升級到php5.6

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.