Note: Tidy 1.0 is just for PHP 4.3.x, while Tidy 2.0 is just for PHP 5.
If » PEAR is available on your *nix-like system you can use the pear installer to install the tidy extension, by the following command: pecl install tidy.
You can always download the tar.gz package and install tidy by hand:
Example #1 tidy install by hand in PHP 4.3.x
gunzip tidy-xxx.tgz tar -xvf tidy-xxx.tar cd tidy-xxx phpize ./configure && make && make install