Administrare server open source

Platforma de hosting cu software liber, gratuit, open source.

Comentariile sunt închise pentru Upgrade PHP de la 5.1 la 5.2 in Centos

Repository-ul din CentOS are in momentul de fata 5.1.6 ca versiune PHP. E o versiune relativ noua, dar nu suficient de noua daca avem aplicatii care necesita versiuni noi sau daca dorim sa evitam unele buguri.

Pentru a rezolva problema trebuie sa apelam la un repository nou, repository-ul pentru testare. Pentru asta vom crea fisierul /etc/yum.repos.d/CentOS-Testing.repo care va contine urmatoarele linii:

[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
includepkgs=php*

Dupa crearea fisierului rulam comanda „yum check-update„:

[root@lamp] # yum check-update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: ftp.nb.lug.ro
 * base: ftp.nb.lug.ro
 * extras: ftp.nb.lug.ro
 * updates: ftp.nb.lug.ro
Reducing CentOS-5 Testing to included packages only
Finished
 
php.i386             5.2.10-1.el5.centos     c5-testing
php-cli.i386         5.2.10-1.el5.centos     c5-testing
php-common.i386      5.2.10-1.el5.centos     c5-testing
php-devel.i386       5.2.10-1.el5.centos     c5-testing
php-gd.i386          5.2.10-1.el5.centos     c5-testing
php-imap.i386        5.2.10-1.el5.centos     c5-testing
php-mbstring.i386    5.2.10-1.el5.centos     c5-testing
php-mcrypt.i386      5.2.9-2.el5.centos.3    c5-testing
php-mysql.i386       5.2.10-1.el5.centos     c5-testing
php-odbc.i386        5.2.10-1.el5.centos     c5-testing
php-pdo.i386         5.2.10-1.el5.centos     c5-testing
php-pear.noarch      1:1.8.1-2.el5.centos    c5-testing
php-pgsql.i386       5.2.10-1.el5.centos     c5-testing
php-snmp.i386        5.2.10-1.el5.centos     c5-testing
php-xmlrpc.i386      5.2.10-1.el5.centos     c5-testing
[root@lamp] #

Dupa cum se poate observa, s-a gasit versiunea noua de PHP (5.2.10) in repository-ul c5-testing. Pentru upgradarea pachetelor folosim comanda „yum update„:

[root@lamp] # yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: ftp.nb.lug.ro
 * base: ftp.nb.lug.ro
 * extras: ftp.nb.lug.ro
 * updates: ftp.nb.lug.ro
Reducing CentOS-5 Testing to included packages only
Finished
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package php.i386 0:5.2.10-1.el5.centos set to be updated
---> Package php-cli.i386 0:5.2.10-1.el5.centos set to be updated
---> Package php-common.i386 0:5.2.10-1.el5.centos set to be updated
---> Package php-devel.i386 0:5.2.10-1.el5.centos set to be updated
---> Package php-gd.i386 0:5.2.10-1.el5.centos set to be updated
---> Package php-imap.i386 0:5.2.10-1.el5.centos set to be updated
---> Package php-mbstring.i386 0:5.2.10-1.el5.centos set to be updated
---> Package php-mcrypt.i386 0:5.2.9-2.el5.centos.3 set to be updated
---> Package php-mysql.i386 0:5.2.10-1.el5.centos set to be updated
---> Package php-odbc.i386 0:5.2.10-1.el5.centos set to be updated
---> Package php-pdo.i386 0:5.2.10-1.el5.centos set to be updated
---> Package php-pear.noarch 1:1.8.1-2.el5.centos set to be updated
---> Package php-pgsql.i386 0:5.2.10-1.el5.centos set to be updated
---> Package php-snmp.i386 0:5.2.10-1.el5.centos set to be updated
---> Package php-xmlrpc.i386 0:5.2.10-1.el5.centos set to be updated
--> Finished Dependency Resolution
 
Dependencies Resolved
 
.................................................
 
Updated:
  php.i386 0:5.2.10-1.el5.centos           php-cli.i386 0:5.2.10-1.el5.centos
  php-common.i386 0:5.2.10-1.el5.centos    php-devel.i386 0:5.2.10-1.el5.centos   
  php-gd.i386 0:5.2.10-1.el5.centos        php-imap.i386 0:5.2.10-1.el5.centos
  php-mbstring.i386 0:5.2.10-1.el5.centos  php-mcrypt.i386 0:5.2.9-2.el5.centos.3 
  php-mysql.i386 0:5.2.10-1.el5.centos     php-odbc.i386 0:5.2.10-1.el5.centos
  php-pdo.i386 0:5.2.10-1.el5.centos       php-pear.noarch 1:1.8.1-2.el5.centos   
  php-pgsql.i386 0:5.2.10-1.el5.centos     php-snmp.i386 0:5.2.10-1.el5.centos
  php-xmlrpc.i386 0:5.2.10-1.el5.centos   
 
Complete!
[root@lamp] #

Acum avem PHP 5.2.10, in locul versiunii default PHP 5.1.6. Mai trebuie doar un restart pentru serverul web.

Linux

Comments are closed.