How to install tidy
Tidy can be installed either by using the pear command, or by compiling the source yourself. In either case, you'll need the latest libtidy library from

From binary
[root@coggeshall ]# pear install tidy
From source
[john@coggeshall ]# cvs co pecl/tidy
[john@coggeshall ]# cd php-src
[john@coggeshall ]# mv pecl/tidy ext/
[john@coggeshall ]# ./buildconf
[john@coggeshall ]# ./configure --with-tidy=/path/to/libtidy
[john@coggeshall ]# make

Once installed, phpinfo() should show tidy listed