Instalacion de php 5.2.x en Debian Testing (squeeze)

Enviado por keopx el Mar, 01/06/2010 - 15:17

Para poder funcionar correctamente con Drupal 6.x es necesario el tener una versión anterior a la existente en el repositorio. En este caso es necesario la instalación de la versión de 5.2.x de php. Para ello es necesario desactualizar o eliminar todos los paquetes de php que tengamos. Creamos el siguiente script.

sudo nano quitar_php.sh
php_installed=`dpkg -l | grep  php| awk  '{print $2}' |tr "\n" " "`
echo $php_installed
sudo apt-get purge $php_installed

Y ejecutamos.

sudo sh quitar_php.sh

Ahora procedemos a configurar las preferencias y repositorios para desacargar la nueva versión. /etc/apt/preferences.d/php

sudo nano /etc/apt/preferences.d/php

Y pegamos:

Package: php5
Pin: release a=lenny
Pin-Priority: 991

Package: php5-exactimage
Pin: release a=lenny
Pin-Priority: 991

Package: php5-ffmpeg
Pin: release a=lenny
Pin-Priority: 991

Package: php5-gpib
Pin: release a=lenny
Pin-Priority: 991

Package: php5-lasso
Pin: release a=lenny
Pin-Priority: 991

Package: php5-mapscript
Pin: release a=lenny
Pin-Priority: 991

Package: php5-ming
Pin: release a=lenny
Pin-Priority: 991

Package: php5-uuid
Pin: release a=lenny
Pin-Priority: 991

Package: php5-adodb
Pin: release a=lenny
Pin-Priority: 991

Package: php5-auth-pam
Pin: release a=lenny
Pin-Priority: 991

Package: php5-clamav
Pin: release a=lenny
Pin-Priority: 991

Package: php5-geoip
Pin: release a=lenny
Pin-Priority: 991

Package: php5-idn
Pin: release a=lenny
Pin-Priority: 991

Package: php5-memcache
Pin: release a=lenny
Pin-Priority: 991

Package: php5-memcached
Pin: release a=lenny
Pin-Priority: 991

Package: php5-ps
Pin: release a=lenny
Pin-Priority: 991

Package: php5-radius
Pin: release a=lenny
Pin-Priority: 991

Package: php5-sasl
Pin: release a=lenny
Pin-Priority: 991

Package: php5-suhosin
Pin: release a=lenny
Pin-Priority: 991

Package: php5-svn
Pin: release a=lenny
Pin-Priority: 991

Package: php5-cgi
Pin: release a=lenny
Pin-Priority: 991

Package: php5-cli
Pin: release a=lenny
Pin-Priority: 991

Package: php5-curl
Pin: release a=lenny
Pin-Priority: 991

Package: php5-dbg
Pin: release a=lenny
Pin-Priority: 991

Package: php5-dev
Pin: release a=lenny
Pin-Priority: 991

Package: php5-enchant
Pin: release a=lenny
Pin-Priority: 991

Package: php5-gd
Pin: release a=lenny
Pin-Priority: 991

Package: php5-gmp
Pin: release a=lenny
Pin-Priority: 991

Package: php5-imap
Pin: release a=lenny
Pin-Priority: 991

Package: php5-interbase
Pin: release a=lenny
Pin-Priority: 991

Package: php5-intl
Pin: release a=lenny
Pin-Priority: 991

Package: php5-ldap
Pin: release a=lenny
Pin-Priority: 991

Package: php5-mcrypt
Pin: release a=lenny
Pin-Priority: 991

Package: php5-odbc
Pin: release a=lenny
Pin-Priority: 991

Package: php5-pgsql
Pin: release a=lenny
Pin-Priority: 991

Package: php5-pspell
Pin: release a=lenny
Pin-Priority: 991

Package: php5-recode
Pin: release a=lenny
Pin-Priority: 991

Package: php5-snmp
Pin: release a=lenny
Pin-Priority: 991

Package: php5-sqlite
Pin: release a=lenny
Pin-Priority: 991

Package: php5-sybase
Pin: release a=lenny
Pin-Priority: 991

Package: php5-tidy
Pin: release a=lenny
Pin-Priority: 991

Package: php5-xmlrpc
Pin: release a=lenny
Pin-Priority: 991

Package: php5-xsl
Pin: release a=lenny
Pin-Priority: 991

Package: php5-librdf
Pin: release a=lenny
Pin-Priority: 991

Package: php5-remctl
Pin: release a=lenny
Pin-Priority: 991

Package: php5-symfony1.0
Pin: release a=lenny
Pin-Priority: 991

Package: php5-xapian
Pin: release a=lenny
Pin-Priority: 991

Package: php5-xcache
Pin: release a=lenny
Pin-Priority: 991

Package: php5-xdebug
Pin: release a=lenny
Pin-Priority: 991

Package: php5-common
Pin: release a=lenny
Pin-Priority: 991

Package: php5-mysql
Pin: release a=lenny
Pin-Priority: 991

Package: libapache2-mod-php5
Pin: release a=lenny
Pin-Priority: 991

Package: libapache2-mod-php5filter
Pin: release a=lenny
Pin-Priority: 991

Package: php-pear
Pin: release a=lenny
Pin-Priority: 991

/etc/apt/sources.list

$ sudo nano /etc/apt/sources.list
# deb cdrom:[Debian GNU/Linux testing _testing_ - Official Snapshot i386 CD Binary-1 20100416-11:48]/ testing main

#deb cdrom:[Debian GNU/Linux testing _testing_ - Official Snapshot i386 CD Binary-1 20100416-11:48]/ testing main

deb http://ftp.de.debian.org/debian/ testing main non-free contrib
deb-src http://ftp.de.debian.org/debian/ testing main non-free contrib

deb http://security.debian.org/ testing/updates main contrib non-free
deb-src http://security.debian.org/ testing/updates main contrib non-free

### Chromium
deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main

### Opera
deb http://deb.opera.com/opera testing non-free

### VirtualBox
deb http://download.virtualbox.org/virtualbox/debian lenny non-free

### Multimedia
deb http://www.debian-multimedia.org stable main contrib non-free
#deb http://www.debian-multimedia.org testing main contrib non-free

/etc/apt/sources.list.d/lenny.list

$ sudo nano /etc/apt/sources.list.d/lenny.list
deb http://ftp.de.debian.org/debian/ lenny main non-free contrib
deb-src http://ftp.de.debian.org/debian/ lenny main non-free contrib

/etc/apt/apt.conf

$ sudo nano /etc/apt/apt.conf
APT::Default-Release "testing";
APT::Cache-Limit 100000000;
Apt::Get::Purge;
APT::Clean-Installed;
APT::Get::Fix-Broken;
APT::Get::Fix-Missing;
APT::Get::Show-Upgraded "true";

Ahora actualizamos e instalamos los paquetes.

$ sudo aptitude update
$ sudo aptitude install -t lenny php5

En este caso solo hemos instalado php5, pero podríamos instalar todos lo que necesitásemos. Nos mostrara un listado con las dependencias y deberemos ser cuidadosos a la hora de elegir que paquetes instalamos. Lo mismo sucederá cuando actualicemos el equipo.

Categoria

Añadir nuevo comentario

El contenido de este campo se mantiene privado y no se mostrará públicamente.

HTML Restringido

  • Etiquetas HTML permitidas: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Saltos automáticos de líneas y de párrafos.
  • Las direcciones de correos electrónicos y páginas web se convierten en enlaces automáticamente.