Basic steps to install the Fileinfo PECL module
tar -zxf Fileinfo-1.0.4.tgz
From the command line, enter vi /usr/local/lib/php.ini. Scroll down until you hit the extensions section of the file and then press i to enter vi’s insert mode. Add extension=fileinfo.so and then press <esc> to exit insert mode and return to command mode. Type :wq<return> to exit vi and save your changes.
The final step to activate the Fileinfo extension is to restart the web server. From the command line enter:
# /etc/init.d/httpd stop
# /etc/init.d/httpd start
To confirm Fileinfo extension is installed properly, please use following command.
# php -m | grep fileinfo
It should give output as "fileinfo"
While running configure command if you see "libmagic" error -
checking for magic files in default path... not found
configure: error: Please reinstall the libmagic distribution
Solution : Please make sure file and file-devel are installed. (Please use the latest rpmforge-release package)
# yum install file
# yum install file-devel
Then just rerun the "./configure" command and complete the install