.gz and .bz archives are usually tarballs of source code.
the usual method would be to untar the archive change into its directory and run a make.
this procedure varies from software to software but there is usually an INSTALL file in the tarball which documents the installation process.
a simple example would be
tar zxvf file.tar.gz
gives the directory file, change into it.
ls in the directory gives a series of files, most of the time there is a shell script called configure which readies your build environment and creates a makefile based on this. (make sure you have all the development tools installed yum groupinstall "Development Tools")
this will do lots of whizzy text stuff, if it completes successfully run
if that completes successfully run
voila software installed.
if the archive is a bz you can change the tar command to
tar xvfj file.tar.bz