CentOS6 PHP 5.3 → 5.5 업그레이드

Jmnote (토론 | 기여)님의 2015년 12월 10일 (목) 14:48 판 (→‎확인 2)
CentOS 6에서 PHP 5.3 → 5.5 업그레이드

1 확인

[root@zetawiki ~]# php -v
PHP 5.3.3 (cli) (built: Jul  9 2015 17:39:00) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
→ php 5.3 설치됨

2 webtatic-release 설치

[root@zetaweb ~]# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
Retrieving https://mirror.webtatic.com/yum/el6/latest.rpm
Preparing...                ########################################### [100%]
   1:webtatic-release       ########################################### [100%]
[root@zetaweb ~]# yum repolist
... (생략)
repo id                       repo name                                                         status
base                          CentOS-6 - Base                                                    6,575
epel                          Extra Packages for Enterprise Linux 6 - x86_64                    11,812
extras                        CentOS-6 - Extras                                                     46
rpmforge                      RHEL 6 - RPMforge.net - dag                                        4,718
updates                       CentOS-6 - Updates                                                   707
varnish-4.0                   Varnish 4.0 for Enterprise Linux                                      34
webtatic                      Webtatic Repository EL6 - x86_64                                     285
repolist: 24,177

3 yum-plugin-replace 설치

[root@zetaweb ~]# yum install yum-plugin-replace
... (생략)
======================================================================================================
 Package                       Arch              Version                    Repository           Size
======================================================================================================
Updating:
 yum-plugin-replace            noarch            0.2.7-1.ius.el6            webtatic             17 k

Transaction Summary
======================================================================================================
Upgrade       1 Package(s)

Total download size: 17 k
Is this ok [y/N]: y
... (생략)
Warning: RPMDB altered outside of yum.
  Updating   : yum-plugin-replace-0.2.7-1.ius.el6.noarch                                          1/2 
  Cleanup    : yum-plugin-replace-0.2.6-1.ius.el6.noarch                                          2/2 
  Verifying  : yum-plugin-replace-0.2.7-1.ius.el6.noarch                                          1/2 
  Verifying  : yum-plugin-replace-0.2.6-1.ius.el6.noarch                                          2/2 

Updated:
  yum-plugin-replace.noarch 0:0.2.7-1.ius.el6                                                         

Complete!

4 php-common 교체

[root@zetaweb ~]# yum replace php-common --replace-with=php55w-common
... (생략)
WARNING: Unable to resolve all providers: ['config(php-common)', 'curl.so()(64bit)', 'fileinfo.so()(64bit)', 'json.so()(64bit)', 'phar.so()(64bit)', 'zip.so()(64bit)', 'config(php)', 'libphp5.so()(64bit)', 'config(php-pdo)', 'pdo.so()(64bit)', 'pdo_sqlite.so()(64bit)', 'sqlite3.so()(64bit)', 'config(php-xmlrpc)', 'xmlrpc.so()(64bit)', 'config(php-mysql)', 'mysql.so()(64bit)', 'mysqli.so()(64bit)', 'pdo_mysql.so()(64bit)', 'config(php-devel)', 'libphp5.so()(64bit)', 'config(php-intl)', 'intl.so()(64bit)', 'config(php-mbstring)', 'mbstring.so()(64bit)', 'config(php-xml)', 'dom.so()(64bit)', 'wddx.so()(64bit)', 'xmlreader.so()(64bit)', 'xmlwriter.so()(64bit)', 'xsl.so()(64bit)', 'config(php-gd)', 'gd.so()(64bit)', 'config(php-process)', 'posix.so()(64bit)', 'sysvmsg.so()(64bit)', 'sysvsem.so()(64bit)', 'sysvshm.so()(64bit)', 'config(php-soap)', 'soap.so()(64bit)', 'bcmath.so()(64bit)', 'config(php-bcmath)', 'config(php-tidy)', 'tidy.so()(64bit)']

This may be normal depending on the package.  Continue? [y/N] y
... (생략)
======================================================================================================
 Package                     Arch               Version                    Repository            Size
======================================================================================================
Installing:
 php55w                      x86_64             5.5.30-2.w6                webtatic             2.7 M
 php55w-bcmath               x86_64             5.5.30-2.w6                webtatic              34 k
 php55w-cli                  x86_64             5.5.30-2.w6                webtatic             2.6 M
 php55w-common               x86_64             5.5.30-2.w6                webtatic             1.2 M
 php55w-devel                x86_64             5.5.30-2.w6                webtatic             2.6 M
 php55w-gd                   x86_64             5.5.30-2.w6                webtatic             144 k
 php55w-intl                 x86_64             5.5.30-2.w6                webtatic             176 k
 php55w-mbstring             x86_64             5.5.30-2.w6                webtatic             943 k
 php55w-mcrypt               x86_64             5.5.30-2.w6                webtatic              25 k
 php55w-mysql                x86_64             5.5.30-2.w6                webtatic             110 k
 php55w-pdo                  x86_64             5.5.30-2.w6                webtatic              94 k
 php55w-pear                 noarch             1:1.10.1-1.w6              webtatic             350 k
 php55w-process              x86_64             5.5.30-2.w6                webtatic              35 k
 php55w-soap                 x86_64             5.5.30-2.w6                webtatic             196 k
 php55w-tidy                 x86_64             5.5.30-2.w6                webtatic              29 k
 php55w-xml                  x86_64             5.5.30-2.w6                webtatic             145 k
 php55w-xmlrpc               x86_64             5.5.30-2.w6                webtatic              44 k
Removing:
 php                         x86_64             5.3.3-46.el6_6             @updates             3.5 M
 php-bcmath                  x86_64             5.3.3-46.el6_6             @updates              29 k
 php-cli                     x86_64             5.3.3-46.el6_6             @updates             6.2 M
 php-common                  x86_64             5.3.3-46.el6_6             @updates             2.9 M
 php-devel                   x86_64             5.3.3-46.el6_6             @updates             3.0 M
 php-gd                      x86_64             5.3.3-46.el6_6             @updates             324 k
 php-intl                    x86_64             5.3.3-46.el6_6             @updates             166 k
 php-mbstring                x86_64             5.3.3-46.el6_6             @updates             2.1 M
 php-mcrypt                  x86_64             5.3.3-3.el6                @epel                 46 k
 php-mysql                   x86_64             5.3.3-46.el6_6             @updates             216 k
 php-pdo                     x86_64             5.3.3-46.el6_6             @updates             168 k
 php-pear                    noarch             1:1.9.4-4.el6              @base                2.2 M
 php-process                 x86_64             5.3.3-46.el6_6             @updates              65 k
 php-soap                    x86_64             5.3.3-46.el6_6             @updates             325 k
 php-tidy                    x86_64             5.3.3-46.el6_6             @updates              48 k
 php-xml                     x86_64             5.3.3-46.el6_6             @updates             307 k
 php-xmlrpc                  x86_64             5.3.3-46.el6_6             @updates              77 k
 php-zts                     x86_64             5.3.3-46.el6_6             @updates             3.7 M
Removing for dependencies:
 php-pecl-http1              x86_64             1.7.6-4.el6                @epel                440 k

Transaction Summary
======================================================================================================
Install      17 Package(s)
Remove       19 Package(s)

Total download size: 11 M
Is this ok [y/N]: y
Removed:
  php.x86_64 0:5.3.3-46.el6_6                       php-bcmath.x86_64 0:5.3.3-46.el6_6                
  php-cli.x86_64 0:5.3.3-46.el6_6                   php-common.x86_64 0:5.3.3-46.el6_6                
  php-devel.x86_64 0:5.3.3-46.el6_6                 php-gd.x86_64 0:5.3.3-46.el6_6                    
  php-intl.x86_64 0:5.3.3-46.el6_6                  php-mbstring.x86_64 0:5.3.3-46.el6_6              
  php-mcrypt.x86_64 0:5.3.3-3.el6                   php-mysql.x86_64 0:5.3.3-46.el6_6                 
  php-pdo.x86_64 0:5.3.3-46.el6_6                   php-pear.noarch 1:1.9.4-4.el6                     
  php-process.x86_64 0:5.3.3-46.el6_6               php-soap.x86_64 0:5.3.3-46.el6_6                  
  php-tidy.x86_64 0:5.3.3-46.el6_6                  php-xml.x86_64 0:5.3.3-46.el6_6                   
  php-xmlrpc.x86_64 0:5.3.3-46.el6_6                php-zts.x86_64 0:5.3.3-46.el6_6                   

Dependency Removed:
  php-pecl-http1.x86_64 0:1.7.6-4.el6                                                                 

Installed:
  php55w.x86_64 0:5.5.30-2.w6                       php55w-bcmath.x86_64 0:5.5.30-2.w6                
  php55w-cli.x86_64 0:5.5.30-2.w6                   php55w-common.x86_64 0:5.5.30-2.w6                
  php55w-devel.x86_64 0:5.5.30-2.w6                 php55w-gd.x86_64 0:5.5.30-2.w6                    
  php55w-intl.x86_64 0:5.5.30-2.w6                  php55w-mbstring.x86_64 0:5.5.30-2.w6              
  php55w-mcrypt.x86_64 0:5.5.30-2.w6                php55w-mysql.x86_64 0:5.5.30-2.w6                 
  php55w-pdo.x86_64 0:5.5.30-2.w6                   php55w-pear.noarch 1:1.10.1-1.w6                  
  php55w-process.x86_64 0:5.5.30-2.w6               php55w-soap.x86_64 0:5.5.30-2.w6                  
  php55w-tidy.x86_64 0:5.5.30-2.w6                  php55w-xml.x86_64 0:5.5.30-2.w6                   
  php55w-xmlrpc.x86_64 0:5.5.30-2.w6               

Complete!

5 (참고) PHP Warning 발생

[root@zetaweb ~]# php -v
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/apc.so' - /usr/lib64/php/modules/apc.so: undefined symbol: zend_unmangle_property_name in Unknown on line 0
PHP Warning:  PHP Startup: gearman: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20121212
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: uri_template: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20121212
These options need to match
 in Unknown on line 0
PHP 5.5.30 (cli) (built: Oct 16 2015 09:21:15) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies

6 확인 2

[root@zetawiki ~]# rpm -qa | grep php
php-common-5.5.6-1.el6.remi.x86_64
php-cli-5.5.6-1.el6.remi.x86_64
php-process-5.5.6-1.el6.remi.x86_64
php-pecl-jsonc-1.3.2-2.el6.remi.1.x86_64
php-pear-1.9.4-20.el6.remi.noarch
php-5.5.6-1.el6.remi.x86_64
php-xml-5.5.6-1.el6.remi.x86_64
php-pecl-zip-1.12.2-2.el6.remi.5.5.x86_64
[root@zetawiki ~]# php -v
PHP 5.5.6 (cli) (built: Nov 13 2013 07:48:35) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies

7 같이 보기

8 참고 자료