CentOS Operating Systems

How to update PHP in CentOS/RHEL ?

How to update PHP in CentOS

Today I will write about upgrade of php 5.6 version in linux server via yum command.
It is about how to update php in centos.
It is very easy. You have to login into Terminal as root user.

If you are a remote user, try putty software via SSH.

After successful login as root user try the following commands sequentially,

For CentOS/RHEL 7.x

“#rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm”.

“#rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm”.

 

For CentOS/RHEL 6.x

“#rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm”.

“#rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm”.

 

Then,

“#yum install php56w php56w-opcache”.

“#yum replace –enablerepo=webtatic-testing php-common –replace-with=php56w-common”.

“#service httpd restart”.

 

 

Enjoy.

Leave a Reply

%d bloggers like this: