[lug] System configuration files

rm at fabula.de rm at fabula.de
Tue Jul 29 14:25:57 MDT 2003


On Tue, Jul 29, 2003 at 02:16:08PM -0600, Zan Lynx wrote:
> Don't use /var for configuration files.  /var is for changing data
> files.  /etc is the place for configuration data.  /etc is like the
> Registry in Windows.

Don't you insult my /etc!!! ;-)

But, yes, /etc is the most logical place. And more and more
packages follow the ->

> I like programs that use /etc/<package> for their files.

approach. This is probably due to the fact that what once was
/etc/bloink.cfg is now a pile of files.

> Many packages use autoconf.  You can configure where they put their
> configuration files by using the options to ./configure.  When you build
> the package, try ./configure --help first and see what options you have.

Hmm, i use autoconf a lot (and actually write autoconf enabled build
scripts) but i don't think there's a "standard" option for configuration 
files. But i'd need to have a closer look at the autoconf docs [and
there's a autoconf god on this mailing list i.a.].

> When you build a lot of packages, you'll probably want to create a
> configure shell script so you don't need to repeat all your options each
> time.

Do you mean a shell script that calls configure with the same/consistent
options? There are several Unix(tm)/Linux(tm) distros that do exactly 
that: Debian, when built from package sources basically modifies patches
the original source tree and calls configure with the "right" options.
The different flavours of BSD do similar things during their package
compilation.

 hth Ralf Mattes

> On Tue, 2003-07-29 at 14:04, Jeff Schroeder wrote:
> > 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
> > _______________________________________________
> > Web Page:  http://lug.boulder.co.us
> > Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> > Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
> -- 
> Zan Lynx <zlynx at acm.org>





More information about the LUG mailing list