You would usually build and install it on the prefix $HOME
. That means the binary would go into $HOME/bin
, libraries into $HOME/lib
and so on. Then you insure that these directories appear on $PATH
, $LD_LIBRARY_PATH
, $MAN_PATH
, etc (usualy by editting your shell startup files) and it will work transparently.
Here's a recipe that will work with many programs
$ cd $HOME
$ mkdir src
$ cd src
$ wget http://host.name/path/to/program.tgz
$ tar xzfv program.tgz
$ cd program
$ ./configure --PREFIX=$HOME
$ make
$ make install
Note that unlike installing on /usr/local
there is never any need for root privilege.