Excellent software and practical tutorials
existCentos7If you want to install the fileinfo extension of php7.4, first download the tarball. If you installed PHP using yum, you can use yum to install the extension.
wget https://www.php.net/distributions/php-7.4.3.tar.gz
Unzip your PHP tarball. If you don't have it, download the tarball of the same version.
tar -zxvf php-7.4.3.tar.gz
Enter the fileinfo directory
cd php-7.4.3/ext/fileinfo
Call phpize to generate a compilation configuration file
/usr/local/php/bin/phpize
Compile extension library
./configure --with-php-config=/usr/local/php/bin/php-config
Install
make && make install
Add the extension to the configuration file
vi /usr/local/php/etc/php.ini
Add the extension in php.ini:
extension=fileinfo.so
Restart PHP
service php-fpm restart