Linux add PHP 7.4 to Webmin/Virtualmin

Viewed 7778

My current setup of Webmin/Virtualmin has PHP 5.6 and 7.2. More and more composer packages have a requirement of PHP 7.4. I don't want to have 7.4 as the default PHP, I have sites on the server that need 5.6 (I know, not great but it's the way it is), so I'm trying to get 7.4 installed in the same structure as 7.2, in the /opt/rh folder.

The version of Linux is "CentOS Linux release 7.8.2003 (Core)"

I've tried to do this about 5 times and failed each time, there is just no information (that I can find) out there to say how to do this. Any help would be massively appreciated.

2 Answers

If you need to keep default version of PHP, make sure to install PHP 7.4 from [remi-safe] repos.

Install Remi Release repo and clear cache:

yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm && yum clean all

Install PHP 7.4 packages:

yum -y install php74-php-{cli,pdo,fpm,zip,gd,xml,mysqlnd}

It's clearly described on our documentation page on how to install different versions of PHP for Virtualmin.

Related