CentOS 8
https://www.tecmint.com/install-php-on-centos-8/
Then install these packages:
dnf -y install php-gd php-ldap php-mysqlnd php-pecl-mcrypt php-pecl-zip
CentOS 7
Use this link but substitute in 7.4 for the desired release to activate.
Look at Remi's RPM repository blog
Remember to merge in local changes to /etc/php.ini