php7的最后一个版本在centos9上由于openssl新版本不兼容了, 得安装低版本的openssl才能安装
先安装旧版本的liberssl
wget https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.6.0.tar.gz -O - | tar xz
cd libressl-3.6.0
./configure--prefix=/usr/local/liberssl
make check
make install
./configure --prefix=/opt/php7/usr --with-openssl=/usr/local/liberssl/bin --with-openssl-dir=/usr/local/liberssl/bin
然后测试编译php7.4发现一大堆的错误, MMP, 还是直接用remi源安装吧.
dnf install -y http://rpms.remirepo.net/enterprise/remi-release-9.rpm
dnf -y --enablerepo=remi install php74* --skip-broken
ln -s /etc/opt/remi/php74/ /opt/php7
echo "zend_extension='/opt/ioncube/ioncube_loader_lin_7.4.so'">> /opt/php7/php.ini
systemctl restart php74-php-fpm
php目录/etc/opt/remi/php74/
php.ini目录/etc/opt/remi/php74/php.ini
php-fpm目录/etc/opt/remi/php74/php-fpm.d
php二进制地址 /usr/bin/php74 /usr/bin/php74-cgi /usr/bin/php74-phar