If you have to install software manually from source, make sure to read its installation instructions carefully, in particular, look for a section about user-specific or local installation which describes the way to install the software in your HOME directory.
If the installation follows the common
make install regime, you can easily change the installation location with the
--prefix option to the configure step:
$> ./configure --prefix=$HOME
Also for other installation regimes there is often a
--prefix option or something similar (e.g.
You can find more information in the documentation about compiling.