Update PHP

General support questions
Post Reply
aeltaib
Posts: 1
Joined: 2018/08/07 13:58:09

Update PHP

Post by aeltaib » 2018/08/07 14:47:14

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.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Update PHP

Post by TrevorH » 2018/08/07 16:10:29

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.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply