Installing HTML Tidy:
yum install libtidy
Add the module to your php.ini:
$EDITOR /usr/local/lib/php.ini
You’ll need to scroll down to the extensions area, I just keep searching for extension till I find it.
Add this line:
extension=tidy.so
Save, and restart your Apache web service:
service httpd restart
Test via phpinfo(); to make sure it’s working.