I have a centos linux server which is running on php v7.4.11 right now. However, I want to upgrade to the v7.4.13 which was released just a few days ago.
The question is how do I install exact version of php, the commands that I find only specify php74
etc. not the exact version like php7.4.13
etc. When I try to do sudo yum install php74
it only installs php 7.4.11
EDIT:
I have removed the php-cli and then when I try sudo yum install php php-cli
it defaults to php v7.4.11:
Any idea how can I change these default packages to php 7.4.13 instead?
This isn't correct. Your screenshot does not indicate this. The
php74
package by Remi does not reflect the exact PHP 7.4 version in any way. To see the exact version available, you can try:If you do not see PHP 7.4.13, then run
yum clean all
, before running the above command.You're mixing up repositories (Amazon one with Remi's). Moreover, you are mixing up ways of installation: single version vs software collection. Amazon repo is likely to be behind, Remi repository is quite up-to-date always and is brought by one of the core PHP devs.
As a rule, I would recommend "software collection"s available in Remi repositories, so use (extend the command with the exact PHP modules you need):
This installs PHP 7.4 in a separate installation tree under
/opt/remi
.If you really want the default PHP (that is, single/system) version of PHP upgraded, then you must follow through repository wizard choosing "Type of installation = Default". It will then give you all the necessary commands for upgrading the system PHP version.