Hi, I need update the PHP 5.4.16 (cli) to PHP 5.6 in Centos 7, I did :
# rpm -Uvh https://dl.fedoraproject.org/pub/epel/e ... noarch.rpm
Retrieving https://dl.fedoraproject.org/pub/epel/e ... noarch.rpm
Preparing... ################################# [100%]
package epel-release-7-9.noarch is already installed
# yum -y update php
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.pymesolutionsweb.com
* epel: archive.linux.duke.edu
* extras: centos.firehosted.com
* updates: centos.vwtonline.net
No packages marked for update
Will you help me please with that, please?
yum -y update php
Re: yum -y update php
what exact version do you need of php-cli?
http://mirrors.oit.uci.edu/centos/7/os/ ... x86_64.rpm
there's this, so you should get it simply with
if that doesn't work, what does
return?
http://mirrors.oit.uci.edu/centos/7/os/ ... x86_64.rpm
there's this, so you should get it simply with
Code: Select all
yum install php-cli
Code: Select all
rpm -qa | grep ^php
Re: yum -y update php
We do not ship php other than the 5.4.16 that's in the repos.
There are several ways to get a newer version but they are all only recommended if you actually require the functionality from the newer versions. Redhat take care of making sure that the 5.4.16 in base is up to date with security updates so running 5.4.16 is not a security concern - it is fully patched and should be secure as long as you regularly yum update
The main two replacements are to either use SCL - this provides parallel installable copies of things but they have a 3 year shelf life where security updates from newer versions will be backported to the older versions that SCL supply. Using an SCL package requires special steps involving the use of the scl enable ... command.
The other mechanism is to use a third party repo called IUS Community. The guys that run IUS work for Rackspace though it's not an official Rackspace project. They supply packages that are named differently than the versions that CentOS supply so that you do not accidentally upgrade your php/mysql/whatever from the stable version that CentOS supplies to a new version just by the act of installing the repo. So their php 5.6 packages are called php56u-* and you must remove all the distro supplied php* packages and install the php56u* equivalents. IUS packages are supported for the lifetime of the upstream version of the code - so php56u packages will be supported and updated until php.net decide they are end of life and at that point the IUS packages will receive no more updates.
You won't find anything in EPEL that conflicts with packages from the CentOS repos - that's part of their rules. So no point looking there for php or for anything else that CentOS already ships.
There are several ways to get a newer version but they are all only recommended if you actually require the functionality from the newer versions. Redhat take care of making sure that the 5.4.16 in base is up to date with security updates so running 5.4.16 is not a security concern - it is fully patched and should be secure as long as you regularly yum update
The main two replacements are to either use SCL - this provides parallel installable copies of things but they have a 3 year shelf life where security updates from newer versions will be backported to the older versions that SCL supply. Using an SCL package requires special steps involving the use of the scl enable ... command.
The other mechanism is to use a third party repo called IUS Community. The guys that run IUS work for Rackspace though it's not an official Rackspace project. They supply packages that are named differently than the versions that CentOS supply so that you do not accidentally upgrade your php/mysql/whatever from the stable version that CentOS supplies to a new version just by the act of installing the repo. So their php 5.6 packages are called php56u-* and you must remove all the distro supplied php* packages and install the php56u* equivalents. IUS packages are supported for the lifetime of the upstream version of the code - so php56u packages will be supported and updated until php.net decide they are end of life and at that point the IUS packages will receive no more updates.
You won't find anything in EPEL that conflicts with packages from the CentOS repos - that's part of their rules. So no point looking there for php or for anything else that CentOS already ships.
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
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
-
- Posts: 140
- Joined: 2015/06/02 13:04:03
Re: yum -y update php
My personal use for upgrading, installing PHP is the 3rd party repository called Remi. After installing the repository, you'll have different repo files for the different PHP versions that you can enable/disable as you like. But keep in mind, if you enable like both PHP 5.6 and 7.0 and you execute yum install php, then the higher version will be applied so enable only the exact versions you'll need. Available versions in Remi are: 5.5, 5.6, 7.0 and 7.1.
Also installing... it is fairly easy. To enable PHP 7.1 do:
Also installing... it is fairly easy. To enable PHP 7.1 do:
Code: Select all
rpm -Uvh "https://rpms.remirepo.net/enterprise/remi-release-7.rpm"
yum-config-manager --enable remi-php71
yum install php