Page 1 of 1

Update PHP

Posted: 2018/08/07 14:47:14
by aeltaib
Hello,

I'm new with Centos, and I have a server with Centos 6.5 without network, how update PHP ver.5 to ver.7.

Please tell info with details, because I googled a lot without good info.

Re: Update PHP

Posted: 2018/08/07 16:10:29
by TrevorH
Running CentOS 6.5 is not safe. The current version is 6.10. If you're not able to get to the internet then you could set up a local mirror as per our wiki article https://wiki.centos.org/HowTos/CreateLocalMirror or you could download the 6.10 DVD iso, copy that to the machine and mount it on one of the directories mentioned in /etc/yum.repos.d/CentOS-Media.repo then yum --disablerepo-\* --enablerepo=c6-media update

To get a higher php version on CentOS 6 you will need to use either an SCL or the IUS third party yum repo. IUS have php70u* and php71u* packages for CentOS 6, SCL only has rh-php70*, nothing newer. You'll need to copy those packages locally and install them with yum --disablerepo=\* install /path/to/your/rpms/*.rpm or set up a mirror for those other repos too.