Hola
Necesitaba hacer un dowgrade del PHP5.3 al PHP5.2, porque necesitaba el Sugar.
Tenia lo siguiente:
# rpm -qa | grep -i php
php53-cli-5.3.3-1.el5_6.1
php53-xml-5.3.3-1.el5_6.1
php53-mbstring-5.3.3-1.el5_6.1
php53-devel-5.3.3-1.el5_6.1
php53-snmp-5.3.3-1.el5_6.1
php53-pspell-5.3.3-1.el5_6.1
php53-pdo-5.3.3-1.el5_6.1
php53-odbc-5.3.3-1.el5_6.1
php53-gd-5.3.3-1.el5_6.1
php53-pgsql-5.3.3-1.el5_6.1
php53-bcmath-5.3.3-1.el5_6.1
php53-common-5.3.3-1.el5_6.1
php53-mysql-5.3.3-1.el5_6.1
php53-imap-5.3.3-1.el5_6.1
php53-process-5.3.3-1.el5_6.1
php53-soap-5.3.3-1.el5_6.1
php53-xmlrpc-5.3.3-1.el5_6.1
php53-intl-5.3.3-1.el5_6.1
php53-dba-5.3.3-1.el5_6.1
php53-5.3.3-1.el5_6.1
php53-ldap-5.3.3-1.el5_6.1
Para hacer el dowgrade toca primero, permite al paquete yum hacer downgrade:
#yum install yum-allowdowngrade
#yum erase php php-common php-cli
Loaded plugins: allowdowngrade, fastestmirror
Setting up Remove Process
No Match for argument: php
Loading mirror speeds from cached hostfile
* base: mirror.netlinux.cl
* centosplus: mirror.netlinux.cl
* extras: mirror.highspeedweb.net
* updates: mirror.trouble-free.net
base | 1.1 kB 00:00
centosplus | 1.9 kB 00:00
extras | 2.1 kB 00:00
updates | 1.9 kB 00:00
Package(s) php available, but not installed.
No Match for argument: php-common
Package(s) php-common available, but not installed.
Resolving Dependencies
--> Running transaction check
---> Package php53-cli.x86_64 0:5.3.3-1.el5_6.1 set to be erased
--> Processing Dependency: php53-cli = 5.3.3-1.el5_6.1 for package: php53
--> Running transaction check
---> Package php53.x86_64 0:5.3.3-1.el5_6.1 set to be erased
--> Processing Dependency: php53 = 5.3.3-1.el5_6.1 for package: php53-devel
--> Running transaction check
---> Package php53-devel.x86_64 0:5.3.3-1.el5_6.1 set to be erased
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================
Removing:
php53-cli x86_64 5.3.3-1.el5_6.1 installed 6.0 M
Removing for dependencies:
php53 x86_64 5.3.3-1.el5_6.1 installed 3.4 M
php53-devel x86_64 5.3.3-1.el5_6.1 installed 2.9 M
Transaction Summary
====================================================================================================================================
Remove 3 Package(s)
Reinstall 0 Package(s)
Downgrade 0 Package(s)
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : php53 1/3
Erasing : php53-devel 2/3
Erasing : php53-cli 3/3
Removed:
php53-cli.x86_64 0:5.3.3-1.el5_6.1
Dependency Removed:
php53.x86_64 0:5.3.3-1.el5_6.1 php53-devel.x86_64 0:5.3.3-1.el5_6.1
Complete!
Listo desinstalo los paquetes del PHP5.3
Verificamos que paquete PHP tenemos disponible:
#yum list php
Loaded plugins: allowdowngrade, fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.netlinux.cl
* centosplus: mirror.netlinux.cl
* extras: mirror.highspeedweb.net
* updates: mirror.rackspace.com
Available Packages
php.x86_64 5.1.6-27.el5_5.3
Esta disponible la version 5.1.6
Verificamos nuevamente:
#yum clean packages
Loaded plugins: allowdowngrade, fastestmirror
0 package files removed
#
#php -v
-bash: /usr/bin/php: No existe el fichero o el directorio
Ya no tenemos el PHP instalado, ahora falta poder instalar la version que necesitamos.
Pero todavia tenia otras dependencias del PHP 5.3
# rpm -qa | grep -i php
php53-xml-5.3.3-1.el5_6.1
php53-mbstring-5.3.3-1.el5_6.1
php53-snmp-5.3.3-1.el5_6.1
php53-pspell-5.3.3-1.el5_6.1
php53-pdo-5.3.3-1.el5_6.1
php53-odbc-5.3.3-1.el5_6.1
php53-gd-5.3.3-1.el5_6.1
php53-pgsql-5.3.3-1.el5_6.1
php53-bcmath-5.3.3-1.el5_6.1
php53-common-5.3.3-1.el5_6.1
php53-mysql-5.3.3-1.el5_6.1
php53-imap-5.3.3-1.el5_6.1
php53-process-5.3.3-1.el5_6.1
php53-soap-5.3.3-1.el5_6.1
php53-xmlrpc-5.3.3-1.el5_6.1
php53-intl-5.3.3-1.el5_6.1
php53-dba-5.3.3-1.el5_6.1
php53-ldap-5.3.3-1.el5_6.1
Entonces las Borro:
# yum erase php53*
Loaded plugins: allowdowngrade, fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package php53-bcmath.x86_64 0:5.3.3-1.el5_6.1 set to be erased
---> Package php53-common.x86_64 0:5.3.3-1.el5_6.1 set to be erased
---> Package php53-dba.x86_64 0:5.3.3-1.el5_6.1 set to be erased
---> Package php53-gd.x86_64 0:5.3.3-1.el5_6.1 set to be erased
---> Package php53-imap.x86_64 0:5.3.3-1.el5_6.1 set to be erased
---> Package php53-intl.x86_64 0:5.3.3-1.el5_6.1 set to be erased
---> Package php53-ldap.x86_64 0:5.3.3-1.el5_6.1 set to be erased
---> Package php53-mbstring.x86_64 0:5.3.3-1.el5_6.1 set to be erased
---> Package php53-mysql.x86_64 0:5.3.3-1.el5_6.1 set to be erased
---> Package php53-odbc.x86_64 0:5.3.3-1.el5_6.1 set to be erased
---> Package php53-pdo.x86_64 0:5.3.3-1.el5_6.1 set to be erased
---> Package php53-pgsql.x86_64 0:5.3.3-1.el5_6.1 set to be erased
---> Package php53-process.x86_64 0:5.3.3-1.el5_6.1 set to be erased
---> Package php53-pspell.x86_64 0:5.3.3-1.el5_6.1 set to be erased
---> Package php53-snmp.x86_64 0:5.3.3-1.el5_6.1 set to be erased
---> Package php53-soap.x86_64 0:5.3.3-1.el5_6.1 set to be erased
---> Package php53-xml.x86_64 0:5.3.3-1.el5_6.1 set to be erased
---> Package php53-xmlrpc.x86_64 0:5.3.3-1.el5_6.1 set to be erased
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================
Removing:
php53-bcmath x86_64 5.3.3-1.el5_6.1 installed 55 k
php53-common x86_64 5.3.3-1.el5_6.1 installed 2.9 M
php53-dba x86_64 5.3.3-1.el5_6.1 installed 46 k
php53-gd x86_64 5.3.3-1.el5_6.1 installed 316 k
php53-imap x86_64 5.3.3-1.el5_6.1 installed 96 k
php53-intl x86_64 5.3.3-1.el5_6.1 installed 163 k
php53-ldap x86_64 5.3.3-1.el5_6.1 installed 51 k
php53-mbstring x86_64 5.3.3-1.el5_6.1 installed 2.1 M
php53-mysql x86_64 5.3.3-1.el5_6.1 installed 210 k
php53-odbc x86_64 5.3.3-1.el5_6.1 installed 85 k
php53-pdo x86_64 5.3.3-1.el5_6.1 installed 120 k
php53-pgsql x86_64 5.3.3-1.el5_6.1 installed 150 k
php53-process x86_64 5.3.3-1.el5_6.1 installed 64 k
php53-pspell x86_64 5.3.3-1.el5_6.1 installed 20 k
php53-snmp x86_64 5.3.3-1.el5_6.1 installed 33 k
php53-soap x86_64 5.3.3-1.el5_6.1 installed 311 k
php53-xml x86_64 5.3.3-1.el5_6.1 installed 296 k
php53-xmlrpc x86_64 5.3.3-1.el5_6.1 installed 74 k
Transaction Summary
==============================================================================================================================================
Remove 18 Package(s)
Reinstall 0 Package(s)
Downgrade 0 Package(s)
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : php53-bcmath 1/18
Erasing : php53-mysql 2/18
Erasing : php53-pspell 3/18
Erasing : php53-imap 4/18
Erasing : php53-dba 5/18
Erasing : php53-snmp 6/18
Erasing : php53-soap 7/18
Erasing : php53-pgsql 8/18
Erasing : php53-pdo 9/18
Erasing : php53-mbstring 10/18
Erasing : php53-ldap 11/18
Erasing : php53-xml 12/18
Erasing : php53-gd 13/18
Erasing : php53-process 14/18
Erasing : php53-intl 15/18
Erasing : php53-odbc 16/18
Erasing : php53-common 17/18
advertencia:/etc/php.ini guardado como /etc/php.ini.rpmsave
Erasing : php53-xmlrpc 18/18
Removed:
php53-bcmath.x86_64 0:5.3.3-1.el5_6.1 php53-common.x86_64 0:5.3.3-1.el5_6.1 php53-dba.x86_64 0:5.3.3-1.el5_6.1
php53-gd.x86_64 0:5.3.3-1.el5_6.1 php53-imap.x86_64 0:5.3.3-1.el5_6.1 php53-intl.x86_64 0:5.3.3-1.el5_6.1
php53-ldap.x86_64 0:5.3.3-1.el5_6.1 php53-mbstring.x86_64 0:5.3.3-1.el5_6.1 php53-mysql.x86_64 0:5.3.3-1.el5_6.1
php53-odbc.x86_64 0:5.3.3-1.el5_6.1 php53-pdo.x86_64 0:5.3.3-1.el5_6.1 php53-pgsql.x86_64 0:5.3.3-1.el5_6.1
php53-process.x86_64 0:5.3.3-1.el5_6.1 php53-pspell.x86_64 0:5.3.3-1.el5_6.1 php53-snmp.x86_64 0:5.3.3-1.el5_6.1
php53-soap.x86_64 0:5.3.3-1.el5_6.1 php53-xml.x86_64 0:5.3.3-1.el5_6.1 php53-xmlrpc.x86_64 0:5.3.3-1.el5_6.1
Complete!
[root@intranet ~]#
Volvemos a mirar si siguen apareciendo:
# rpm -qa | grep -i php
#
No hay nada del php
Aseguremonos bien, que no haya nada dle PHP:
# rpm -e --nodeps php php-common php-mysql
error: el paquete php no está instalado
error: el paquete php-common no está instalado
error: el paquete php-mysql no está instalado
Antes ayudemonos bajando unas utilerias:
#yum install yum-utils
Loaded plugins: allowdowngrade, fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.netlinux.cl
* centosplus: mirror.netlinux.cl
* extras: mirror.highspeedweb.net
* updates: mirror.trouble-free.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package yum-utils.noarch 0:1.1.16-16.el5.centos set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================
Installing:
yum-utils noarch 1.1.16-16.el5.centos base 71 k
Transaction Summary
==============================================================================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total download size: 71 k
Is this ok [y/N]: y
Downloading Packages:
yum-utils-1.1.16-16.el5.centos.noarch.rpm | 71 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : yum-utils 1/1
Installed:
yum-utils.noarch 0:1.1.16-16.el5.centos
Complete!
Listos
Podemos hacer le YUM INSTALL a la version 5.2
# yum install php 5.2.10
Loaded plugins: allowdowngrade, fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.netlinux.cl
* centosplus: mirror.netlinux.cl
* extras: mirror.highspeedweb.net
* updates: mirror.rackspace.com
Setting up Install Process
No package 5.2.10 available.
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.1.6-27.el5_5.3 set to be updated
--> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php
--> Processing Dependency: php-cli = 5.1.6-27.el5_5.3 for package: php
--> Running transaction check
---> Package php-cli.x86_64 0:5.1.6-27.el5_5.3 set to be updated
---> Package php-common.x86_64 0:5.1.6-27.el5_5.3 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================
Installing:
php x86_64 5.1.6-27.el5_5.3 base 2.3 M
Installing for dependencies:
php-cli x86_64 5.1.6-27.el5_5.3 base 2.2 M
php-common x86_64 5.1.6-27.el5_5.3 base 153 k
Transaction Summary
==============================================================================================================================================
Install 3 Package(s)
Upgrade 0 Package(s)
Total download size: 4.7 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): php-common-5.1.6-27.el5_5.3.x86_64.rpm | 153 kB 00:00
(2/3): php-cli-5.1.6-27.el5_5.3.x86_64.rpm | 2.2 MB 00:14
(3/3): php-5.1.6-27.el5_5.3.x86_64.rpm | 2.3 MB 00:18
----------------------------------------------------------------------------------------------------------------------------------------------
Total 138 kB/s | 4.7 MB 00:34
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-common 1/3
Installing : php-cli 2/3
Installing : php 3/3
Installed:
php.x86_64 0:5.1.6-27.el5_5.3
Dependency Installed:
php-cli.x86_64 0:5.1.6-27.el5_5.3 php-common.x86_64 0:5.1.6-27.el5_5.3
Complete!
You have new mail in /var/spool/mail/root
#
Verificamos:
# php -v
PHP 5.1.6 (cli) (built: Nov 29 2010 16:47:46)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
# rpm -qa | grep -i php
php-common-5.1.6-27.el5_5.3
php-5.1.6-27.el5_5.3
php-cli-5.1.6-27.el5_5.3
#
Continua.... en