Kusprayitna Blogs

Hidup untuk berbagi ilmu :: IT Linux Windows Database Oracle PHP OpenSource

Mengganti (upgrade/downgrade) aplikasi di centos secara cepat dengan yum-plugin-replace

Posted by kusprayitna on July 6th, 2012

Beberapa waktu ini saya melakukan upgrade aplikasi PHP dari versi 5.1 (bawaan default centos 5) ke 5.3, ternyata banyak kendala yang terjadi, antara lain :

  1. Tidak semua aplikasi web open source seperti joomla (joomla 1.0) support
  2. Harus melakukan tweaking script yang cukup lumayan banyak
Untuk itu saya memutuskan untuk mengganti php 5.3 menjadi versi php 5.2
Cara sederhana yang dilakukan adalah :
1. Install yum-plugin-replace
# yum Install yum-plugin-replace
2. Downgrade PHP 5.3 ke PHP 5.2
# yum replace php53 --replace-with php52
# yum replace php53 --replace-with php52
Loaded plugins: fastestmirror, priorities, replace
Loading mirror speeds from cached hostfile
 * base: ftp.oss.eznetsols.org
 * epel: epel.idrepo.or.id
 * extras: ftp.oss.eznetsols.org
 * ius: archive.linux.duke.edu
 * updates: ftp.oss.eznetsols.org
Replacing packages takes time, please be patient...

WARNING: Unable to resolve all providers: ['config(php53-common)', 'curl.so', 'f                                                                             ileinfo.so', 'phar.so', 'php-fileinfo', 'php-pecl(Fileinfo)', 'php-pecl(json)',                                                                              'php-pecl(phar)', 'php-pecl(zip)', 'php-pecl-Fileinfo', 'php-pecl-json', 'php-pe                                                                             cl-phar', 'php-pecl-zip', 'php53-common', 'php-pcntl', 'php53-cli', 'config(php5                                                                             3-pdo)', 'php-pdo_sqlite', 'php53-pdo', 'config(php53)', 'php53', 'config(php53-                                                                             ldap)', 'php53-ldap', 'config(php53-mbstring)', 'php53-mbstring', 'config(php53-                                                                             mysql)', 'php-pdo_mysql', 'php53-mysql', 'config(php53-gd)', 'php53-gd', 'config                                                                             (php53-imap)', 'php53-imap', 'config(php53-xml)', 'wddx.so', 'php53-xml']

This may be normal depending on the package.  Continue? [y/N] y
Resolving Dependencies
--> Running transaction check
---> Package php52.i386 0:5.2.17-6.ius.el5 set to be updated
--> Processing Dependency: libtool-ltdl for package: php52
---> Package php52-cli.i386 0:5.2.17-6.ius.el5 set to be updated
---> Package php52-common.i386 0:5.2.17-6.ius.el5 set to be updated
---> Package php52-gd.i386 0:5.2.17-6.ius.el5 set to be updated
---> Package php52-imap.i386 0:5.2.17-6.ius.el5 set to be updated
---> Package php52-ldap.i386 0:5.2.17-6.ius.el5 set to be updated
---> Package php52-mbstring.i386 0:5.2.17-6.ius.el5 set to be updated
---> Package php52-mcrypt.i386 0:5.2.17-6.ius.el5 set to be updated
---> Package php52-mysql.i386 0:5.2.17-6.ius.el5 set to be updated
---> Package php52-odbc.i386 0:5.2.17-6.ius.el5 set to be updated
--> Processing Dependency: libodbc.so.1 for package: php52-odbc
---> Package php52-pdo.i386 0:5.2.17-6.ius.el5 set to be updated
---> Package php52-xml.i386 0:5.2.17-6.ius.el5 set to be updated
---> Package php53.i386 0:5.3.3-5.el5 set to be erased
---> Package php53-cli.i386 0:5.3.3-5.el5 set to be erased
---> Package php53-common.i386 0:5.3.3-5.el5 set to be erased
---> Package php53-gd.i386 0:5.3.3-5.el5 set to be erased
---> Package php53-imap.i386 0:5.3.3-5.el5 set to be erased
---> Package php53-ldap.i386 0:5.3.3-5.el5 set to be erased
---> Package php53-mbstring.i386 0:5.3.3-5.el5 set to be erased
---> Package php53-mcrypt.i386 0:5.3.3-1.el5 set to be erased
---> Package php53-mysql.i386 0:5.3.3-5.el5 set to be erased
---> Package php53-pdo.i386 0:5.3.3-5.el5 set to be erased
---> Package php53-xml.i386 0:5.3.3-5.el5 set to be erased
--> Running transaction check
---> Package libtool-ltdl.i386 0:1.5.22-7.el5_4 set to be updated
---> Package unixODBC-libs.i386 0:2.2.11-10.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch       Version                  Repository       Size
================================================================================
Installing:
 php52                i386       5.2.17-6.ius.el5         ius             1.4 M
 php52-cli            i386       5.2.17-6.ius.el5         ius             2.6 M
 php52-common         i386       5.2.17-6.ius.el5         ius             256 k
 php52-gd             i386       5.2.17-6.ius.el5         ius             127 k
 php52-imap           i386       5.2.17-6.ius.el5         ius              63 k
 php52-ldap           i386       5.2.17-6.ius.el5         ius              44 k
 php52-mbstring       i386       5.2.17-6.ius.el5         ius             1.1 M
 php52-mcrypt         i386       5.2.17-6.ius.el5         ius              40 k
 php52-mysql          i386       5.2.17-6.ius.el5         ius              94 k
 php52-odbc           i386       5.2.17-6.ius.el5         ius              62 k
 php52-pdo            i386       5.2.17-6.ius.el5         ius              76 k
 php52-xml            i386       5.2.17-6.ius.el5         ius             112 k
Removing:
 php53                i386       5.3.3-5.el5              installed       3.2 M
 php53-cli            i386       5.3.3-5.el5              installed       6.1 M
 php53-common         i386       5.3.3-5.el5              installed       2.9 M
 php53-gd             i386       5.3.3-5.el5              installed       307 k
 php53-imap           i386       5.3.3-5.el5              installed        84 k
 php53-ldap           i386       5.3.3-5.el5              installed        43 k
 php53-mbstring       i386       5.3.3-5.el5              installed       2.0 M
 php53-mcrypt         i386       5.3.3-1.el5              installed        36 k
 php53-mysql          i386       5.3.3-5.el5              installed       177 k
 php53-pdo            i386       5.3.3-5.el5              installed       108 k
 php53-xml            i386       5.3.3-5.el5              installed       262 k
Installing for dependencies:
 libtool-ltdl         i386       1.5.22-7.el5_4           base             37 k
 unixODBC-libs        i386       2.2.11-10.el5            base            551 k

Transaction Summary
================================================================================
Install      14 Package(s)
Upgrade       0 Package(s)
Remove       11 Package(s)
Reinstall     0 Package(s)
Downgrade     0 Package(s)

Total download size: 6.4 M
Is this ok [y/N]: y
Downloading Packages:
(1/14): libtool-ltdl-1.5.22-7.el5_4.i386.rpm             |  37 kB     00:00
(2/14): php52-mcrypt-5.2.17-6.ius.el5.i386.rpm           |  40 kB     00:00
(3/14): php52-ldap-5.2.17-6.ius.el5.i386.rpm             |  44 kB     00:00
(4/14): php52-odbc-5.2.17-6.ius.el5.i386.rpm             |  62 kB     00:00
(5/14): php52-imap-5.2.17-6.ius.el5.i386.rpm             |  63 kB     00:01
(6/14): php52-pdo-5.2.17-6.ius.el5.i386.rpm              |  76 kB     00:02
(7/14): php52-mysql-5.2.17-6.ius.el5.i386.rpm            |  94 kB     00:03
(8/14): php52-xml-5.2.17-6.ius.el5.i386.rpm              | 112 kB     00:02
(9/14): php52-gd-5.2.17-6.ius.el5.i386.rpm               | 127 kB     00:03
(10/14): php52-common-5.2.17-6.ius.el5.i386.rpm          | 256 kB     00:03
(11/14): unixODBC-libs-2.2.11-10.el5.i386.rpm            | 551 kB     00:03
(12/14): php52-mbstring-5.2.17-6.ius.el5.i386.rpm        | 1.1 MB     00:17
(13/14): php52-5.2.17-6.ius.el5.i386.rpm                 | 1.4 MB     00:21
(14/14): php52-cli-5.2.17-6.ius.el5.i386.rpm             | 2.6 MB     00:33
--------------------------------------------------------------------------------
Total                                            65 kB/s | 6.4 MB     01:42
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : libtool-ltdl                                            1/25
  Installing     : unixODBC-libs                                           2/25
  Installing     : php52-common                                            3/25
warning: /etc/php.ini created as /etc/php.ini.rpmnew
  Installing     : php52-pdo                                               4/25
  Installing     : php52-cli                                               5/25
  Installing     : php52-imap                                              6/25
  Installing     : php52-odbc                                              7/25
  Installing     : php52                                                   8/25
  Installing     : php52-mysql                                             9/25
  Installing     : php52-mbstring                                         10/25
  Installing     : php52-mcrypt                                           11/25
  Installing     : php52-gd                                               12/25
  Installing     : php52-ldap                                             13/25
  Installing     : php52-xml                                              14/25
  Erasing        : php53-imap                                             15/25
  Erasing        : php53-gd                                               16/25
  Erasing        : php53-ldap                                             17/25
  Erasing        : php53-mcrypt                                           18/25
  Erasing        : php53-mbstring                                         19/25
  Erasing        : php53                                                  20/25
  Erasing        : php53-common                                           21/25
  Erasing        : php53-xml                                              22/25
  Erasing        : php53-pdo                                              23/25
  Erasing        : php53-cli                                              24/25
  Erasing        : php53-mysql                                            25/25

Removed:
  php53.i386 0:5.3.3-5.el5                php53-cli.i386 0:5.3.3-5.el5
  php53-common.i386 0:5.3.3-5.el5         php53-gd.i386 0:5.3.3-5.el5
  php53-imap.i386 0:5.3.3-5.el5           php53-ldap.i386 0:5.3.3-5.el5
  php53-mbstring.i386 0:5.3.3-5.el5       php53-mcrypt.i386 0:5.3.3-1.el5
  php53-mysql.i386 0:5.3.3-5.el5          php53-pdo.i386 0:5.3.3-5.el5
  php53-xml.i386 0:5.3.3-5.el5

Installed:
  php52.i386 0:5.2.17-6.ius.el5           php52-cli.i386 0:5.2.17-6.ius.el5
  php52-common.i386 0:5.2.17-6.ius.el5    php52-gd.i386 0:5.2.17-6.ius.el5
  php52-imap.i386 0:5.2.17-6.ius.el5      php52-ldap.i386 0:5.2.17-6.ius.el5
  php52-mbstring.i386 0:5.2.17-6.ius.el5  php52-mcrypt.i386 0:5.2.17-6.ius.el5
  php52-mysql.i386 0:5.2.17-6.ius.el5     php52-odbc.i386 0:5.2.17-6.ius.el5
  php52-pdo.i386 0:5.2.17-6.ius.el5       php52-xml.i386 0:5.2.17-6.ius.el5

Dependency Installed:
  libtool-ltdl.i386 0:1.5.22-7.el5_4     unixODBC-libs.i386 0:2.2.11-10.el5

Complete!

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>