GD and its options are installed during the compilation of PHP on your server. If you install through an automated means (such as yum) there may be additional packages from the repository you got your install files from.
As for ImageMagick, you can either choose to compile your own (as I do) or you can download precompiled binaries and just link to them on the server. The later is easiest.