when i started to fool around with linux i had some major problems. first of all: how to uninstall things? what of all the software do i really need? the packet managers of big modern distros like suse, redhat, ubuntu tend to clutter your hd with all sorts of software you are most likely to never use. another problem was to identify which software can be deleted and which belongs to the "system", i.e. which is crucial and should not be removed. so i ended up installing linux over and over again whenever i thought i lost track of what's going on on my hd. so i was looking for a way to seperate "system software" from "private software". we all know the ./configure-make-make install routine but you do not have root permissions on all linux/unix systems you'll work with (most likely you will have no root permissions). so this thread is mostly about how to make local installations and is intended for the beginner because most of them won't do a ./configure --help. this is what i did:
1. my home dir is on a seperate partition. like: /dev/hda1 is swap, /dev/hda2 is / and /dev/hda3 is /home. the root partition is only 4.5GB (500MB is swap). i am aware that most partition howtos prefer to give /usr a seperate partition but the /home dir of modern linux systems is adequate as well.
2. install linux with the packages you need for maintaining the system, your prefered editor, X11, maybe even your desktop enviroment (like kde, gnome)--though i do not recommend them--and the like.
3. after installation you will not touch your root partition any more!...well sometimes but only on rare occasion. this also reduces the time you are logged in as root which is a good habit. the / remains as is. everything else goes in your home directory. this is the reason why i don't like the mainstream distros (e.g. suse, redhat, ubuntu). you do an apt-get or something and stuff is installed on your system. lot's of dependencies you must install along the package you want. it's like i'd like to install OpenOffice and YAST tells me that i really need this icq client to do so and with a lot of extra stuff i never asked for. you don't need half the things these distros are trying to make you believe...distrust them!
4. creating space for your local installations. i use to create a ~/.local director (mkdir ~/.local).
5. installing software locally. unpack the tarballs:
if tar.gz do:
$ tar xvzf <package>.tar.gz
if tar.bz2 do:
$ tar xvjf <package>.tar.bz2
now before you compile your packages in the ./configure-make-make install manner we have to fine tune the first step. instead of ./configure do
$ ./configure --prefix=/home/<YourHomeDir>/.local
the --prefix option tells ./configure not to install in the default dir's but everything in your .local dir. the installation will create folder in .local as it would do in /usr or /usr/local. so you will soon recognize the familiar bin, etc, lib, share directories etc. after configuration you can now compile the source code:
and after make finished you do not need to login as root! just type:
after you did this and tried to start the program you just installed you might encounter a problem because we haven't so far told the system where to look for the software. we need to set the PATH and MANPATH variables.
7. setting PATH and MANPATH variables. you have to put the following definitions in your .bashrc, .xinitrc or better in your .bash_profile.
8. now log out. if you put the lines above in your .xinitrc it should be sufficient to log out from your X session. however, the system will not find your selfcompiled packages whenever you work in runlevel 3 because in this runlevel the .xinitrc won't be read by your machine. if you put the lines in .bashrc or .bash_profile you need to log out completely. you cant switch to runlevel 3 and do an exit or simply reboot. now the system should have no troubles finding your freshly installed package(s).
the big plus is you can delete whatever is in your ~/.local and your system will not get messed up! this keeps your root partition clean. also, you can make an image of your home directory and if you are forced to do a reinstallation you will be up and running in your enviroment in no time.
well, that's it. let me know if this was of any help or if something was not clear enough...
good luck, vadkutya