This question is a bit broad, but here are a few things to know:
- / and /usr are for apt-/rpm-managed packages.
- /opt is for non-packaged software, *if* this software is self-contained in one directory, such as Java, Netscape Communicator...
- /usr/local is for non-packaged software, that follows the Unix standard: binaries in bin/, libraries in lib/, and so on.
Most source tarballs (tar.gz, tar.bz2) you'll compile will end up in /usr/local. Most of the time, you'll just have to do that:
./configure --help (read available options)
./configure (+ maybe options you want to use)
make (build the software)
make install (install it)
Only this last step needs to be done as root.
Whatever the method for building/installing the software, you're bound to have required/optional dependences. You'll be told about those by error messages while compiling, or errors/warnings during the configure-step. So look closely at warnings and errors.
Install needed dependencies with rpm/apt, or by building them yourself.
Setting environment variables for everyone is done in /etc/profile; same for a group of people, except you'll have to test for the group (gid) yourself.
Setting environment variables for one person is done in this person's .profile file in their home-directory.
User-/group-permissions in Linux (and Unix in general) is done for each file, and does not depend on the location of those files.
read:
man chmod
man chgrp
man chown
I hope this helps.
Yves.
|