IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    centos下使用yum方式升级php版本

    二愣子小强发表于 2015-10-10 07:18:23
    love 0
    [root@localhost mysql]# yum list installed | grep php
    php.x86_64              5.3.3-40.el6_6  @updates                                
    php-bcmath.x86_64       5.3.3-40.el6_6  @updates                                
    php-cli.x86_64          5.3.3-40.el6_6  @updates                                
    php-common.x86_64       5.3.3-40.el6_6  @updates                                
    php-fpm.x86_64          5.3.3-40.el6_6  @updates                                
    php-gd.x86_64           5.3.3-40.el6_6  @updates                                
    php-imap.x86_64         5.3.3-40.el6_6  @updates                                
    php-ldap.x86_64         5.3.3-40.el6_6  @updates                                
    php-mbstring.x86_64     5.3.3-40.el6_6  @updates                                
    php-mysql.x86_64        5.3.3-40.el6_6  @updates                                
    php-odbc.x86_64         5.3.3-40.el6_6  @updates                                
    php-pdo.x86_64          5.3.3-40.el6_6  @updates                                
    php-pear.noarch         1:1.9.4-4.el6   @base                                   
    php-xml.x86_64          5.3.3-40.el6_6  @updates                                
    php-xmlrpc.x86_64       5.3.3-40.el6_6  @updates                                
    [root@localhost mysql]# yum remove php.x86_64 php-bcmath.x86_64 php-cli.x86_64 php-common.x86_64 php-fpm.x86_64 php-gd.x86_64 php-imap.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mysql.x86_64 php-odbc.x86_64 php-pdo.x86_64 php-pear.noarch php-xml.x86_64 php-xmlrpc.x86_64 
    Loaded plugins: fastestmirror, priorities, refresh-packagekit, security
    Setting up Remove Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package php.x86_64 0:5.3.3-40.el6_6 will be erased
    ---> Package php-bcmath.x86_64 0:5.3.3-40.el6_6 will be erased
    ---> Package php-cli.x86_64 0:5.3.3-40.el6_6 will be erased
    ---> Package php-common.x86_64 0:5.3.3-40.el6_6 will be erased
    ---> Package php-fpm.x86_64 0:5.3.3-40.el6_6 will be erased
    ---> Package php-gd.x86_64 0:5.3.3-40.el6_6 will be erased
    ---> Package php-imap.x86_64 0:5.3.3-40.el6_6 will be erased
    ---> Package php-ldap.x86_64 0:5.3.3-40.el6_6 will be erased
    ---> Package php-mbstring.x86_64 0:5.3.3-40.el6_6 will be erased
    ---> Package php-mysql.x86_64 0:5.3.3-40.el6_6 will be erased
    ---> Package php-odbc.x86_64 0:5.3.3-40.el6_6 will be erased
    ---> Package php-pdo.x86_64 0:5.3.3-40.el6_6 will be erased
    ---> Package php-pear.noarch 1:1.9.4-4.el6 will be erased
    ---> Package php-xml.x86_64 0:5.3.3-40.el6_6 will be erased
    ---> Package php-xmlrpc.x86_64 0:5.3.3-40.el6_6 will be erased
    --> Finished Dependency Resolution
    atomic                                                   | 3.4 kB     00:00     
    http://www2.atomicorp.com/channels/atomic/centos/6/x86_64/repodata/f31bb48d6a553580c3f967f854be9505790a9f5917b9954530d85c280454e04e-primary.sqlite.bz2: [Errno 12] Timeout on http://www2.atomicorp.com/channels/atomic/centos/6/x86_64/repodata/f31bb48d6a553580c3f967f854be9505790a9f5917b9954530d85c280454e04e-primary.sqlite.bz2: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds')
    Trying other mirror.
    atomic/primary_db                                        | 865 kB     00:07     
    base                                                     | 3.7 kB     00:00     
    epel                                                     | 3.6 kB     00:00     
    epel/primary_db                                          | 2.9 MB     00:32     
    extras                                                   | 3.4 kB     00:00     
    extras/primary_db                                        |  32 kB     00:00     
    nginx                                                    | 2.9 kB     00:00     
    nginx/primary_db                                         | 6.8 kB     00:00     
    updates                                                  | 3.4 kB     00:00     
    updates/primary_db                                       | 1.9 MB     00:17     
    
    Dependencies Resolved
    
    ================================================================================
     Package             Arch          Version                Repository       Size
    ================================================================================
    Removing:
     php                 x86_64        5.3.3-40.el6_6         @updates        3.5 M
     php-bcmath          x86_64        5.3.3-40.el6_6         @updates         29 k
     php-cli             x86_64        5.3.3-40.el6_6         @updates        6.2 M
     php-common          x86_64        5.3.3-40.el6_6         @updates        2.9 M
     php-fpm             x86_64        5.3.3-40.el6_6         @updates        3.2 M
     php-gd              x86_64        5.3.3-40.el6_6         @updates        324 k
     php-imap            x86_64        5.3.3-40.el6_6         @updates        100 k
     php-ldap            x86_64        5.3.3-40.el6_6         @updates         52 k
     php-mbstring        x86_64        5.3.3-40.el6_6         @updates        2.1 M
     php-mysql           x86_64        5.3.3-40.el6_6         @updates        216 k
     php-odbc            x86_64        5.3.3-40.el6_6         @updates         88 k
     php-pdo             x86_64        5.3.3-40.el6_6         @updates        168 k
     php-pear            noarch        1:1.9.4-4.el6          @base           2.2 M
     php-xml             x86_64        5.3.3-40.el6_6         @updates        307 k
     php-xmlrpc          x86_64        5.3.3-40.el6_6         @updates         77 k
    
    Transaction Summary
    ================================================================================
    Remove       15 Package(s)
    
    Installed size: 22 M
    Is this ok [y/N]: y   
    Downloading Packages:
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Erasing    : 1:php-pear-1.9.4-4.el6.noarch                                                                                                                                                                                            1/15 
      Erasing    : php-5.3.3-40.el6_6.x86_64                                                                                                                                                                                                2/15 
      Erasing    : php-mysql-5.3.3-40.el6_6.x86_64                                                                                                                                                                                          3/15 
      Erasing    : php-odbc-5.3.3-40.el6_6.x86_64                                                                                                                                                                                           4/15 
      Erasing    : php-pdo-5.3.3-40.el6_6.x86_64                                                                                                                                                                                            5/15 
      Erasing    : php-cli-5.3.3-40.el6_6.x86_64                                                                                                                                                                                            6/15 
      Erasing    : php-gd-5.3.3-40.el6_6.x86_64                                                                                                                                                                                             7/15 
      Erasing    : php-xml-5.3.3-40.el6_6.x86_64                                                                                                                                                                                            8/15 
      Erasing    : php-bcmath-5.3.3-40.el6_6.x86_64                                                                                                                                                                                         9/15 
      Erasing    : php-ldap-5.3.3-40.el6_6.x86_64                                                                                                                                                                                          10/15 
      Erasing    : php-fpm-5.3.3-40.el6_6.x86_64                                                                                                                                                                                           11/15 
    warning: /etc/php-fpm.d/www.conf saved as /etc/php-fpm.d/www.conf.rpmsave
    warning: /etc/php-fpm.conf saved as /etc/php-fpm.conf.rpmsave
      Erasing    : php-xmlrpc-5.3.3-40.el6_6.x86_64                                                                                                                                                                                        12/15 
      Erasing    : php-imap-5.3.3-40.el6_6.x86_64                                                                                                                                                                                          13/15 
      Erasing    : php-mbstring-5.3.3-40.el6_6.x86_64                                                                                                                                                                                      14/15 
      Erasing    : php-common-5.3.3-40.el6_6.x86_64                                                                                                                                                                                        15/15 
    warning: /etc/php.ini saved as /etc/php.ini.rpmsave
      Verifying  : php-mbstring-5.3.3-40.el6_6.x86_64                                                                                                                                                                                       1/15 
      Verifying  : php-pdo-5.3.3-40.el6_6.x86_64                                                                                                                                                                                            2/15 
      Verifying  : 1:php-pear-1.9.4-4.el6.noarch                                                                                                                                                                                            3/15 
      Verifying  : php-imap-5.3.3-40.el6_6.x86_64                                                                                                                                                                                           4/15 
      Verifying  : php-xmlrpc-5.3.3-40.el6_6.x86_64                                                                                                                                                                                         5/15 
      Verifying  : php-odbc-5.3.3-40.el6_6.x86_64                                                                                                                                                                                           6/15 
      Verifying  : php-fpm-5.3.3-40.el6_6.x86_64                                                                                                                                                                                            7/15 
      Verifying  : php-ldap-5.3.3-40.el6_6.x86_64                                                                                                                                                                                           8/15 
      Verifying  : php-bcmath-5.3.3-40.el6_6.x86_64                                                                                                                                                                                         9/15 
      Verifying  : php-xml-5.3.3-40.el6_6.x86_64                                                                                                                                                                                           10/15 
      Verifying  : php-cli-5.3.3-40.el6_6.x86_64                                                                                                                                                                                           11/15 
      Verifying  : php-mysql-5.3.3-40.el6_6.x86_64                                                                                                                                                                                         12/15 
      Verifying  : php-5.3.3-40.el6_6.x86_64                                                                                                                                                                                               13/15 
      Verifying  : php-gd-5.3.3-40.el6_6.x86_64                                                                                                                                                                                            14/15 
      Verifying  : php-common-5.3.3-40.el6_6.x86_64                                                                                                                                                                                        15/15 
    
    Removed:
      php.x86_64 0:5.3.3-40.el6_6           php-bcmath.x86_64 0:5.3.3-40.el6_6      php-cli.x86_64 0:5.3.3-40.el6_6           php-common.x86_64 0:5.3.3-40.el6_6      php-fpm.x86_64 0:5.3.3-40.el6_6       php-gd.x86_64 0:5.3.3-40.el6_6      
      php-imap.x86_64 0:5.3.3-40.el6_6      php-ldap.x86_64 0:5.3.3-40.el6_6        php-mbstring.x86_64 0:5.3.3-40.el6_6      php-mysql.x86_64 0:5.3.3-40.el6_6       php-odbc.x86_64 0:5.3.3-40.el6_6      php-pdo.x86_64 0:5.3.3-40.el6_6     
      php-pear.noarch 1:1.9.4-4.el6         php-xml.x86_64 0:5.3.3-40.el6_6         php-xmlrpc.x86_64 0:5.3.3-40.el6_6       
    
    Complete!
    
    
    [root@localhost mysql]# rpm -qa | grep webstatic
    [root@localhost mysql]# rpm -e http://mirror.webtatic.com/yum/el6/latest.rpm
    error: package http://mirror.webtatic.com/yum/el6/latest.rpm is not installed
    [root@localhost mysql]# rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
    Retrieving http://mirror.webtatic.com/yum/el6/latest.rpm
    warning: /var/tmp/rpm-tmp.8aTULT: Header V4 DSA/SHA1 Signature, key ID cf4c4ff9: NOKEY
    Preparing...                ########################################### [100%]
       1:webtatic-release       ########################################### [100%]
    [root@localhost mysql]# yum install php55w.x86_64 php55w-bcmath.x86_64 php55w-cli.x86_64 php55w-common.x86_64 php55w-fpm.x86_64 php55w-gd.x86_64 php55w-imap.x86_64 php55w-ldap.x86_64 php55w-mbstring.x86_64 php55w-mysql.x86_64 php55w-odbc.x86_64 php55w-pdo.x86_64 php55w-pear.noarch php55w-xml.x86_64 php55w-xmlrpc.x86_64
    Loaded plugins: fastestmirror, priorities, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
     * atomic: mirrors.neusoft.edu.cn
     * base: mirrors.sina.cn
     * epel: mirrors.opencas.cn
     * extras: mirrors.btte.net
     * updates: mirrors.163.com
     * webtatic: us-east.repo.webtatic.com
    webtatic                                                                                                                                                                                                              | 3.6 kB     00:00     
    webtatic/primary_db                                                                                                                                                                                                   | 115 kB     00:00     
    414 packages excluded due to repository priority protections
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package php55w.x86_64 0:5.5.29-1.w6 will be installed
    ---> Package php55w-bcmath.x86_64 0:5.5.29-1.w6 will be installed
    ---> Package php55w-cli.x86_64 0:5.5.29-1.w6 will be installed
    ---> Package php55w-common.x86_64 0:5.5.29-1.w6 will be installed
    ---> Package php55w-fpm.x86_64 0:5.5.29-1.w6 will be installed
    ---> Package php55w-gd.x86_64 0:5.5.29-1.w6 will be installed
    --> Processing Dependency: libt1.so.5()(64bit) for package: php55w-gd-5.5.29-1.w6.x86_64
    ---> Package php55w-imap.x86_64 0:5.5.29-1.w6 will be installed
    ---> Package php55w-ldap.x86_64 0:5.5.29-1.w6 will be installed
    ---> Package php55w-mbstring.x86_64 0:5.5.29-1.w6 will be installed
    ---> Package php55w-mysql.x86_64 0:5.5.29-1.w6 will be installed
    ---> Package php55w-odbc.x86_64 0:5.5.29-1.w6 will be installed
    ---> Package php55w-pdo.x86_64 0:5.5.29-1.w6 will be installed
    ---> Package php55w-pear.noarch 1:1.9.4-7.w6 will be installed
    ---> Package php55w-xml.x86_64 0:5.5.29-1.w6 will be installed
    ---> Package php55w-xmlrpc.x86_64 0:5.5.29-1.w6 will be installed
    --> Running transaction check
    ---> Package t1lib.x86_64 0:5.1.2-6.el6_2.1 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =============================================================================================================================================================================================================================================
     Package                                                      Arch                                                Version                                                        Repository                                             Size
    =============================================================================================================================================================================================================================================
    Installing:
     php55w                                                       x86_64                                              5.5.29-1.w6                                                    webtatic                                              2.7 M
     php55w-bcmath                                                x86_64                                              5.5.29-1.w6                                                    webtatic                                               33 k
     php55w-cli                                                   x86_64                                              5.5.29-1.w6                                                    webtatic                                              2.6 M
     php55w-common                                                x86_64                                              5.5.29-1.w6                                                    webtatic                                              1.2 M
     php55w-fpm                                                   x86_64                                              5.5.29-1.w6                                                    webtatic                                              1.3 M
     php55w-gd                                                    x86_64                                              5.5.29-1.w6                                                    webtatic                                              144 k
     php55w-imap                                                  x86_64                                              5.5.29-1.w6                                                    webtatic                                               53 k
     php55w-ldap                                                  x86_64                                              5.5.29-1.w6                                                    webtatic                                               36 k
     php55w-mbstring                                              x86_64                                              5.5.29-1.w6                                                    webtatic                                              942 k
     php55w-mysql                                                 x86_64                                              5.5.29-1.w6                                                    webtatic                                              109 k
     php55w-odbc                                                  x86_64                                              5.5.29-1.w6                                                    webtatic                                               52 k
     php55w-pdo                                                   x86_64                                              5.5.29-1.w6                                                    webtatic                                               94 k
     php55w-pear                                                  noarch                                              1:1.9.4-7.w6                                                   webtatic                                              389 k
     php55w-xml                                                   x86_64                                              5.5.29-1.w6                                                    webtatic                                              145 k
     php55w-xmlrpc                                                x86_64                                              5.5.29-1.w6                                                    webtatic                                               44 k
    Installing for dependencies:
     t1lib                                                        x86_64                                              5.1.2-6.el6_2.1                                                base                                                  160 k
    
    Transaction Summary
    =============================================================================================================================================================================================================================================
    Install      16 Package(s)
    
    Total download size: 9.9 M
    Installed size: 37 M
    Is this ok [y/N]: y
    Downloading Packages:
    (1/16): php55w-5.5.29-1.w6.x86_64.rpm                                                                                                                                                                                 | 2.7 MB     00:24     
    (2/16): php55w-bcmath-5.5.29-1.w6.x86_64.rpm                                                                                                                                                                          |  33 kB     00:00     
    (3/16): php55w-cli-5.5.29-1.w6.x86_64.rpm                                                                                                                                                                             | 2.6 MB     00:24     
    (4/16): php55w-common-5.5.29-1.w6.x86_64.rpm                                                                                                                                                                          | 1.2 MB     00:10     
    (5/16): php55w-fpm-5.5.29-1.w6.x86_64.rpm                                                                                                                                                                             | 1.3 MB     00:12     
    (6/16): php55w-gd-5.5.29-1.w6.x86_64.rpm                                                                                                                                                                              | 144 kB     00:01     
    (7/16): php55w-imap-5.5.29-1.w6.x86_64.rpm                                                                                                                                                                            |  53 kB     00:00     
    (8/16): php55w-ldap-5.5.29-1.w6.x86_64.rpm                                                                                                                                                                            |  36 kB     00:00     
    (9/16): php55w-mbstring-5.5.29-1.w6.x86_64.rpm                                                                                                                                                                        | 942 kB     00:08     
    (10/16): php55w-mysql-5.5.29-1.w6.x86_64.rpm                                                                                                                                                                          | 109 kB     00:00     
    (11/16): php55w-odbc-5.5.29-1.w6.x86_64.rpm                                                                                                                                                                           |  52 kB     00:01     
    (12/16): php55w-pdo-5.5.29-1.w6.x86_64.rpm                                                                                                                                                                            |  94 kB     00:00     
    (13/16): php55w-pear-1.9.4-7.w6.noarch.rpm                                                                                                                                                                            | 389 kB     00:03     
    (14/16): php55w-xml-5.5.29-1.w6.x86_64.rpm                                                                                                                                                                            | 145 kB     00:01     
    (15/16): php55w-xmlrpc-5.5.29-1.w6.x86_64.rpm                                                                                                                                                                         |  44 kB     00:00     
    (16/16): t1lib-5.1.2-6.el6_2.1.x86_64.rpm                                                                                                                                                                             | 160 kB     00:01     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Total                                                                                                                                                                                                        105 kB/s | 9.9 MB     01:36     
    warning: rpmts_HdrFromFdno: Header V4 DSA/SHA1 Signature, key ID cf4c4ff9: NOKEY
    Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-andy
    Importing GPG key 0xCF4C4FF9:
     Userid : Andy Thompson <andy @webtatic.com>
     Package: webtatic-release-6-6.noarch (installed)
     From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-andy
    Is this ok [y/N]: y
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Warning: RPMDB altered outside of yum.
      Installing : php55w-common-5.5.29-1.w6.x86_64                                                                                                                                                                                         1/16 
      Installing : php55w-cli-5.5.29-1.w6.x86_64                                                                                                                                                                                            2/16 
      Installing : php55w-pdo-5.5.29-1.w6.x86_64                                                                                                                                                                                            3/16 
      Installing : t1lib-5.1.2-6.el6_2.1.x86_64                                                                                                                                                                                             4/16 
      Installing : php55w-gd-5.5.29-1.w6.x86_64                                                                                                                                                                                             5/16 
      Installing : php55w-odbc-5.5.29-1.w6.x86_64                                                                                                                                                                                           6/16 
      Installing : php55w-mysql-5.5.29-1.w6.x86_64                                                                                                                                                                                          7/16 
      Installing : php55w-5.5.29-1.w6.x86_64                                                                                                                                                                                                8/16 
      Installing : 1:php55w-pear-1.9.4-7.w6.noarch                                                                                                                                                                                          9/16 
      Installing : php55w-ldap-5.5.29-1.w6.x86_64                                                                                                                                                                                          10/16 
      Installing : php55w-imap-5.5.29-1.w6.x86_64                                                                                                                                                                                          11/16 
      Installing : php55w-mbstring-5.5.29-1.w6.x86_64                                                                                                                                                                                      12/16 
      Installing : php55w-xml-5.5.29-1.w6.x86_64                                                                                                                                                                                           13/16 
      Installing : php55w-fpm-5.5.29-1.w6.x86_64                                                                                                                                                                                           14/16 
      Installing : php55w-xmlrpc-5.5.29-1.w6.x86_64                                                                                                                                                                                        15/16 
      Installing : php55w-bcmath-5.5.29-1.w6.x86_64                                                                                                                                                                                        16/16 
      Verifying  : php55w-5.5.29-1.w6.x86_64                                                                                                                                                                                                1/16 
      Verifying  : php55w-odbc-5.5.29-1.w6.x86_64                                                                                                                                                                                           2/16 
      Verifying  : php55w-ldap-5.5.29-1.w6.x86_64                                                                                                                                                                                           3/16 
      Verifying  : php55w-imap-5.5.29-1.w6.x86_64                                                                                                                                                                                           4/16 
      Verifying  : php55w-common-5.5.29-1.w6.x86_64                                                                                                                                                                                         5/16 
      Verifying  : php55w-mbstring-5.5.29-1.w6.x86_64                                                                                                                                                                                       6/16 
      Verifying  : php55w-cli-5.5.29-1.w6.x86_64                                                                                                                                                                                            7/16 
      Verifying  : t1lib-5.1.2-6.el6_2.1.x86_64                                                                                                                                                                                             8/16 
      Verifying  : php55w-gd-5.5.29-1.w6.x86_64                                                                                                                                                                                             9/16 
      Verifying  : php55w-mysql-5.5.29-1.w6.x86_64                                                                                                                                                                                         10/16 
      Verifying  : php55w-xml-5.5.29-1.w6.x86_64                                                                                                                                                                                           11/16 
      Verifying  : php55w-fpm-5.5.29-1.w6.x86_64                                                                                                                                                                                           12/16 
      Verifying  : 1:php55w-pear-1.9.4-7.w6.noarch                                                                                                                                                                                         13/16 
      Verifying  : php55w-xmlrpc-5.5.29-1.w6.x86_64                                                                                                                                                                                        14/16 
      Verifying  : php55w-bcmath-5.5.29-1.w6.x86_64                                                                                                                                                                                        15/16 
      Verifying  : php55w-pdo-5.5.29-1.w6.x86_64                                                                                                                                                                                           16/16 
    
    Installed:
      php55w.x86_64 0:5.5.29-1.w6           php55w-bcmath.x86_64 0:5.5.29-1.w6      php55w-cli.x86_64 0:5.5.29-1.w6           php55w-common.x86_64 0:5.5.29-1.w6      php55w-fpm.x86_64 0:5.5.29-1.w6       php55w-gd.x86_64 0:5.5.29-1.w6      
      php55w-imap.x86_64 0:5.5.29-1.w6      php55w-ldap.x86_64 0:5.5.29-1.w6        php55w-mbstring.x86_64 0:5.5.29-1.w6      php55w-mysql.x86_64 0:5.5.29-1.w6       php55w-odbc.x86_64 0:5.5.29-1.w6      php55w-pdo.x86_64 0:5.5.29-1.w6     
      php55w-pear.noarch 1:1.9.4-7.w6       php55w-xml.x86_64 0:5.5.29-1.w6         php55w-xmlrpc.x86_64 0:5.5.29-1.w6       
    
    Dependency Installed:
      t1lib.x86_64 0:5.1.2-6.el6_2.1                                                                                                                                                                                                             
    
    Complete!
    [root@localhost mysql]# php -v
    PHP 5.5.29 (cli) (built: Sep  4 2015 06:48:00) 
    Copyright (c) 1997-2015 The PHP Group
    Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
    


沪ICP备19023445号-2号
友情链接