LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   CentOS 5.2 package installation and directory structure (https://www.linuxquestions.org/questions/linux-newbie-8/centos-5-2-package-installation-and-directory-structure-666046/)

oceanarches 08-28-2008 08:29 AM

CentOS 5.2 package installation and directory structure
 
I don't understand the linux filesystem, and I haven't yet found a good source of information to describe good (best?) choices for file management and structure.

Admittedly, I am doing a complete hack job and would like to do better.

Could someone offer advice and/or a good resource to help me learn where to store/access system files, programs, etc.???

Specifically, where should I download packages? Is this different from where they should be installed? What about commercial software programs?

Thanks!

trickykid 08-28-2008 08:44 AM

System or OS configuration files usually will reside in /etc.

Programs or binary files (executables) will usually reside in /usr/bin or /usr/local/bin by default.

/usr/sbin and /sbin are usually executables or commands that are for privileged users like root that usually store system binaries, not 3rd party applications and such.

Basic commands like ls, echo, gzip and others that are used by all accounts usually reside in /bin

You can download packages anywhere you want. If it's an RPM, most will install then delete. They'll usually follow the defaults from above, installing in /usr/bin or the like depending on what you're installing.

If you're installing by source (tar.gz files), some will compile in or from /usr/local/src and keep the source around in case they need to recompile, reconfigure and or upgrade, keep track of the version installed, etc.

I'm surprised you didn't find anything, this is a very common question. There's tons of posts that literally ask this same thing here on this site and plenty of sites that describe the filesystem hierarchy in *nix systems.

odcheck 08-28-2008 08:50 AM

ok,I think you need a nice book, or some useful links
like http://tldp.org and so on.

Redhat Based Distro like CentOs uses rpm Packages for installation.
command to learn: rpm
Then there are files with install scripts an so on, described in makefile's tar.gz, bz2, stuff like
that. Most of those applications bring a README along, with command switches.

FHS = Filesystem Hierarchy System (should be most standard on nearly all Linux Distros)
/etc config-files
/opt = install place for optional software
/srv = additional services
/tmp = temp.files
/var = common place for variable files like log-file from apache and so on
/lib = libraries that are used by services, programs, and so on
/usr = UNIX System Resources
/home = standard folder for homedirectories if a user is added with useradd or adduser command (most common)
.
.
.

The question you've got is very huge so not easy to answer in a single post.
I hope that someone else in this forum will post some good LINKS.

regards

oceanarches 08-29-2008 04:21 PM

great feedback
 
Thanks for the feedback (internet was down yesterday, so I'm a bit slow in response).

This is really helpful information. I was surprised that I wasn't finding a good overview too! Somehow, I must have not been looking in the right places. I have 4 books; but perhaps none are intro enough. I'll keep looking. In the meantime, your feedback will be useful.

Thanks,
Rachael

jay73 08-29-2008 07:24 PM

Unless you are running a server, you really shouldn't be too concerned with file systems. You need swap (like windows virtual memory), a / partition where the system files reside and preferably a /home partition to store user's personal data. I also like to use a separate /var partition to prevent log or mail files filling up the / partition. All the rest will be placed under /. If you install packages through your package manager, it will install most of them to /usr/bin and /usr/share and one or more of the lib directories; its config files go into /etc and/or the user's home directory. If you compile from source, most packages will end up in /usr/local by default.

John VV 08-29-2008 08:52 PM

have a look here
http://www.linux.com/base/ldp/howto/...EX/index.htmlt
and in particular
http://www.linux.com/base/ldp/howto/HOWTO-INDEX/os.html

oceanarches 09-03-2008 11:58 AM

great links
 
A very helpful resource. Thanks for the intro/info!


All times are GMT -5. The time now is 02:56 PM.