Topic: Installing php8.1.5 from Remi repository archive space

I need to install php8.1.5 at the request of the customer.

I installed php in my validation environment according to what is written in the topic below.
" Remi's RPM repository - Forum → User support → Problems with php 5.3, how to reinstall 5.2.10? "

But the binary doesn't exist and doesn't seem to work.
I am using Amazon Linux 2 and other php versions have been removed.
What mistakes do you think I have made in my work?

[root@ip-172-16-4-143 ec2-user]# wget https://rpms.remirepo.net/store/php/common/8.1.5/php-common-8.1.5-1.el7.remi.x86_64.rpm
--2022-06-30 00:21:37--  
Resolving rpms.remirepo.net (rpms.remirepo.net)... 109.238.14.107, 2a00:c70:1:109:238:14:107:1
Connecting to rpms.remirepo.net (rpms.remirepo.net)|109.238.14.107|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1283884 (1.2M) [application/x-rpm]
Saving to: ‘php-common-8.1.5-1.el7.remi.x86_64.rpm’

100%[=================================================================================>] 1,283,884    380KB/s   in 3.3s

2022-06-30 00:21:41 (380 KB/s) - ‘php-common-8.1.5-1.el7.remi.x86_64.rpm’ saved [1283884/1283884]

[root@ip-172-16-4-143 ec2-user]# rpm -Uvh php-common-8.1.5-1.el7.remi.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:php-common-8.1.5-1.el7.remi      ################################# [100%]
[root@ip-172-16-4-143 ec2-user]# php -v
bash: php: command not found
[root@ip-172-16-4-143 ec2-user]# whereis php
php: /usr/lib64/php /etc/php.d /etc/php.ini /usr/share/php

Re: Installing php8.1.5 from Remi repository archive space

The PHP stack is not a single package, but rather a large set, around 150.

php-common is only a small package with directory layout and configuration file

You also need the engine (SAPI), so php-cli, php (mod_php still used by default on EL-7) or php-fpm
And probably some extensions (ex: php-mbstring, php-xml, php-pgsql...)

Desktop: Fedora 35 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 36 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Installing php8.1.5 from Remi repository archive space

I noticed that the link path I used for the installation was php-common in your point.

The link below is correct.
https://rpms.remirepo.net/store/php/8.1 … x86_64.rpm

I also installed php-cli and php-sodium additionally and confirmed that it works.

I'm sorry for the rudimentary mistake, thank you for your polite answer.

Re: Installing php8.1.5 from Remi repository archive space

BTW remind that 8.1.5 is outdated an unsecure as 8.1.7 is a security release

https://www.php.net/releases/8_1_7.php
https://www.php.net/releases/8_1_6.php

Also notice that EL-7 (so amzn2) is terribly old (8 years), close to EOL

For modern thing such as PHP > 8, prefer modern distro (EL-8 or even EL-9)

New amazon 2022 is Fedora 34 based (instead of CentOS)
but looks like a Fnrankenstein distro.
https://twitter.com/RemiCollet/status/1 … 6430678017

I recommend to use official UBI (RHEL) / CentOS / Alma / Rocky images

Desktop: Fedora 35 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 36 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi