[lug] System configuration files

Jeff Schroeder jeff at neobox.net
Tue Jul 29 14:04:23 MDT 2003


Hey all!

I've rolled my own Linux distribution, basically by compiling all the 
software packages I need from their source code, and as I continue 
developing this distro I find myself running into problems with system 
configuration files.

For example, if you want to configure Apache you need to modify 
httpd.conf, which is usually in /var/httpd/conf (or maybe 
/usr/local/httpd/conf, or even /opt/apache/conf).  MySQL's main 
configuration file is usually in /usr/local/var/my.cnf.  An FTP server 
relies on /etc/ftpaccess.  And so on, and so on.

I'd like to bring all these configuration files into one place, where 
they can be easily managed by simply going into a subdirectory with the 
application name and editing the appropriate files.  Obviously one 
would still need some understanding of the file formats and so on, but 
it would certainly save one from needing to know the disparate 
locations of all these files.

My initial thought was to place everything in /etc/conf/<package>, but 
in reading the Filesystem Hierarchy Standard-- which applies to Unix 
and Linux systems-- it seems a more logical choice would be somewhere 
in /var.  However, there's no indication (at least in the FHS) of this 
sort of idea, so I thought I'd toss it to the collective brainpower of 
the LUG.

My idea, then, is to build a directory structure where software 
configuration files are in /var/conf/<package>, thus:

/var/conf/apache
/var/conf/mysql
/var/conf/wu-ftpd

Et cetera.  Within those directories would be all the configuration 
files; note this does NOT include log files, PID/lock files, and other 
runtime-generated data... ONLY the configuration.  More than likely 
these directories would only be accessible to the super-user.  If a 
particular program expects its configuration file in a certain place, 
there would simply be a symlink back to the /var/conf area.

As an important side note, moving all configuration files to one place 
would allow the /usr (and possibly root) partition to be read-only, 
which is often considered a Good Thing.  In fact, one could imagine a 
system where only /home and /var are writeable at all.  Moreover, 
backing up the entire system's configuration would involve dumping a 
single directory-- making it trivial to replicate systems or take 
measures to avoid catastrophe.

What do you guys think?  Are there any "mainstream" Linux distros out 
there which utilize something like this?  Am I breaking any religious 
rules by (apparently) defining my own filesystem structure?  Is there a 
Better Way?

TIA,
Jeff



More information about the LUG mailing list