centOs php 5.3をアンインストールしてphpを再インストールします

4786 ワード

   centOs6.8,    php   5.3,       ,       php5.6  
1.       PHP     **   
            
 #yum remove php             
 #php -v            。。。。。
           
 #rpm -qa|grep php     
 #php-pdo-5.1.6-27.el5_5.3
 #php-MySQL-5.1.6-27.el5_5.3
 #php-xml-5.1.6-27.el5_5.3
 #php-cli-5.1.6-27.el5_5.3
 #php-common-5.1.6-27.el5_5.3
 #php-gd-5.1.6-27.el5_5.3               pdo mysql    ;common gd    ;   :# rpm -e php-pdo-5.1.6-27.el5_5.3
    error: Failed dependencies:php-pdo is needed by (installed) php-mysql-5.1.6-27.el5_5.3.i386           :
        # rpm -e php-mysql-5.1.6-27.el5_5.3 
       # rpm -e php-pdo-5.1.6-27.el5_5.3 
       # rpm -e php-xml-5.1.6-27.el5_5.3 
       # rpm -e php-cli-5.1.6-27.el5_5.3 
       # rpm -e php-gd-5.1.6-27.el5_5.3 
       # rpm -e php-common-5.1.6-27.el5_5.3    # php -v             
2.       php5.6   
**centos   yum  php      5.3 ,      yum ,     **

  yum 
  CentOS 6.8 epel remi 。

# rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

   CentOS 7.0# yum install epel-release
# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

  yum list         (Packege)。

# yum list --enablerepo=remi --enablerepo=remi-php56 | grep php

  PHP5.6
yum     ,      PHP5.6(    ,     php7     56  70# yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof


 PHP      。

参照先:http://skinglzw.blog.51cto.com/10729606/1889170 http://blog.csdn.net/simplty/article/details/38444151