All Amazon Packages List : https://docs.aws.amazon.com/linux/al2023/release-notes/all-packages-AL2023.3.html
-
type
dnf install php
-
Dont press enter, Press Tab twice to list all the Versions
-
Choose the required package from that
Required Version : php8.2.9
Syntax : php{version}-{packagename}-{full-version.amz23.arch}
Required command :
dnf install -y php php-gd php-pear php-devel libzip php-curl php-xml php-json php-mbstring php-zip php-pdo git unzip php-pgsql vim php-fpm httpd patch
No match for argument: php8.2-pear-8.2.9-1.amzn2023.0.3.x86_64 No match for argument: php8.2-curl-8.2.9-1.amzn2023.0.3.x86_64 No match for argument: php8.2-json-8.2.9-1.amzn2023.0.3.x86_64
- php-curl
- php-json
dnf install php-pear
this will install the latest php-pear-1:1.10.13-2.amzn2023.0.4.noarch by default.
dnf install -y php8.2-8.2.9-1.amzn2023.0.3.x86_64 php8.2-common-8.2.9-1.amzn2023.0.3.x86_64 php8.2-gd-8.2.9-1.amzn2023.0.3.x86_64 php8.2-devel-8.2.9-1.amzn2023.0.3.x86_64 php8.2-xml-8.2.9-1.amzn2023.0.3.x86_64 php8.2-mbstring-8.2.9-1.amzn2023.0.3.x86_64 php8.2-zip-8.2.9-1.amzn2023.0.3.x86_64 php8.2-pdo-8.2.9-1.amzn2023.0.3.x86_64 php8.2-pgsql-8.2.9-1.amzn2023.0.3.x86_64 php8.2-fpm-8.2.9-1.amzn2023.0.3.x86_64 php-pear vim httpd patch libzip git unzip
dnf install -y php8.2-{8.2.9-1.amzn2023.0.3.x86_64,common,gd,devel,xml,mbstring,zip,pdo,pgsql,fpm} php-pear vim httpd patch libzip git unzip
-
Uninstall the previous version
dnf remove php8.1* (or) dnf remove php*
-
Install the required version
dnf install php8.2-8.2.9-1.amzn2023.0.3.x86_64
-
Restart the Httpd Server
systemctl restart httpd