¿Cómo actualizar versión de PHP en Linux (centOS)?

Introducción

Algunas aplicaciones requieren de una versión mínima de PHP para operar, por lo que actualizar la versión de PHP es una de las tareas básicas necesarias.Los repositorios oficiales de Linux suelen no tener actualizadas a las ultimas versiones algunas herramientas cómo MySQL, PHP, etc por lo que es necesario utilizar otros repositorios para instalar versiones actualizadas. 

A continuación se muestra como realizar este proceso.

Instalación

Verificamos la versión de PHP instalada:

php -v

En este caso se tiene instalada la versión 5.4.16, si queremos actualizar la vesión esto no se realizará automáticamente por que no tenemos el repositorio correcto. En este ejemplo instalaremos la versión PHP 7.2.

EPEL(Extra Packages for Enterprise Linux) es un repositorio usado para instalar paquetes de software de terceros en sistemas basados en RedHat como RHEL y CentOS. Lo instalamos con el siguiente comando:

sudo yum -y install epel-release

Utilizaremos el repositorio Remi que es un grupo de paquetes gestionado por Remi Collet (por ello su nombre). Este repositorio busca suministrar recursos adicionales de software a las distribuciones Fedora y Enterprise Linux (REHL, CentOS, etc.)

Instalamos repositorio Remi para php 7:

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

Instalamos yum- utils para poder utilizar el comando yum-config-manager:

yum install yum-utils

Activamos el repositorio Remi remi-php72:

sudo yum-config-manager --enable remi-php72

Actualizamos el gestor de paquetes:

sudo yum update

Reinstalamos php:

sudo yum install php

Verificamos versión php:

php -v

Con estos pasos logramos actualizar exitosamente a la versión 7.2 de PHP.

0 0 votes
Ten 5 estrellas!!
guest
8 Comentarios
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
67betgame
67betgame
15 days ago

67betgame? Alright, let’s do this. Placing a bet and seeing what’s up. Fingers crossed for a W. Good luck to everyone else playing 67betgame.

wim44
wim44
15 days ago

Yo, anyone ever heard of wim44? Just giving it a go. Interface is clean and easy to navigate. Hoping for some decent payouts. Will update if I hit anything big wim44.

slotviplogin
slotviplogin
15 days ago

Tried logging in to slotviplogin today, smooth as butter. Games loaded quick and no glitches. Feels good to be a VIP! Definitely worth a look slotviplogin.

87bet1
87bet1
28 days ago

87bet1, eh? Been bouncing around a few sites, might as well add another to the list. Anyone got any good experiences? Gotta chase them wins somehow. Check this out: 87bet1

87agame
87agame
28 days ago

87agame, huh? Never heard of it before, but the name sounds kinda cool. Might give it a shot if the odds are good. Worth a peek! 87agame

87abetcom
87abetcom
28 days ago

Yo, heard about 87abetcom! Seems pretty legit, might check it out. Looking for a new place to throw down. 87abetcom

taixiugamevn
taixiugamevn
1 month ago

Taixiugamevn? Cái này thì quá quen thuộc rồi, chơi tài xỉu thì cứ phải tìm mấy trang uy tín thế này mà chơi. Đỡ bịp bợm. Safe choice taixiugamevn.

79mgame
79mgame
1 month ago

Yo, 79mgame! I’ve been hitting this site up for a while now. Pretty solid selection, keeps me coming back. Check it out, 79mgame, you might dig it.