If the source packages you want to compile use 'configure' scripts, run ./configure --prefix=/home/{yourusername}/localapps (or similar path) in the package's source directory. The package will use the given path as its root dir and create bin,etc,usr,var and possibly other dirs under the given path when you run the 'make install' for the package.
You also need to set the environment var LD_LIBRARY_PATH to point any 'lib' dirs under the path given by --prefix. To set LD_LIBRARY_PATH, enter the command:
export LD_LIBRARY_PATH="/home/{yourusername}/localapps/usr/lib:/home/{yourusername}/localapps/lib"
To check that the LD_LIBRARY_PATH var is set, enter 'echo $LD_LIBRARY_PATH' at a command prompt and make sure it contains all the paths you need.
To know which paths to add to the LD_LIBRARY_PATH var, look for dirs containing {filename}.so files/links under your localapps dir. Add as many different paths as needed to the line.
And finally, you will need to add paths to your PATH environment var as well. Look for bin and sbin dirs under the localapps dir and add all that you find to your with the command:
export PATH="/home/{yourusername}/localapps/bin:{yourusername}/localapps/usr/bin:$PATH"
Don't forget to add the $PATH to the end of the PATH= line, or your shell will not be able to find the system wide programs.
To make these vars permanent, edit the .bash_profile file in you home dir and add the 2 lines to the end of file.
There are other ways to accomplish this as well, but this is a quick and relatively easy way.
Good Luck
|