Well I would hope that you didn't blow the directory away, heh. Though, i've come close to lighting a nasty little fuse on my system... rm -rf /
I was really upset with my system that day.
Regardless, the lastest versions PHP come with GD library bundled.
On my Debian Linux system, I installed PHP4 using "apt-get" as a package manager
PHP is located here on my system:
user@localhost:~$ whereis php
/usr/bin/php
user@localhost:~$ whereis php4
/usr/bin/php4
Then to install GD
user@localhost:~$ apt-cache search php4-gd
php4-gd - GD module for php4
user@localhost:~$ apt-get install php4-gd
and voila.
You may want to reinstall php on your system if you can't find it. If you can, it's better to do a manual installation rather than using a package manager to install for you as you can configure to your needs and wants.
On my WinXP system, I installed php5 as a server module and to get GD working with it, all I had to do was edit my php.ini file. I thought that was just grand!