How to document linux server configuration?

11,366

Solution 1

I assume this is a long term documentation effort, not just trying to capture a snapshot of the current configuration.

The wiki works now and might keep you sane for a while but if your environment changes quickly you will have a serious problem. You will always have to make sure the cron jobs are properly written, run in a timely fashion, get written for new services, are compatible with new versions of software, etc.

Consider using an configuration management tool like Puppet or Cfengine. At least put whatever data you collect under version control (like Mercurial, git, or Subversion).

Your configuration data is coming in from everywhere instead of being centralized. A wiki will always lag the current state of your machines. You need to centralize the configuration data; make it flow from the center out to the edges. But it is true that sometimes you have to go out and capture configuration data. Cfengine can do audits, Puppet might. Look at this Wikipedia article listing other configuration managers.

Solution 2

You might want to try cfg2html, which dumps your configuration to an HTML file, which you can then fetch at regular intervals and serve from a central server.

Solution 3

Next time you tweak a machine, you should install etckeeper on it first. That way you will keep a log of configuration changes.

What distro are you using? There are some quite convenient tools for managing and auditing conffiles, and they generally depend on the package manager.

Solution 4

My suggestion would be just to build a wiki to centralize information and get a script to edit pages so that configuration files are updated on the wiki automatically through a cron job.

If you use moin, you should check http://moinmo.in/ScriptMarket/PutPageScript .

This way you get:

  1. Centralized documentation.

  2. Up-to-date system configuration.

  3. History of configuration changes.

Solution 5

A spreadsheet is basically a two-dimension grid. I consider it not to be the best data structure for such things. I prefer trees, so I use outliners to manage trees.

My favourite one is leo. If you want something that would work on a server that has no X, have a look at htb (seems to be abandoned), or at VOoM vim plugin.

All these tools use plain text files or XML as backend. Teamed with some version control, they make a powerful combination.

Another alternative would be fossil. It is a distributed version control tool with built-in wiki and ticket tracker. It's a single binary which can also work as CGI and serve a web interface, thus making it available over network. fossil as a mini-CMS for a website is very powerful.

Share:
11,366

Related videos on Youtube

Michelle
Author by

Michelle

I am a student at UPMC, France studying computer science.

Updated on September 17, 2022

Comments

  • Michelle
    Michelle over 1 year

    I have about 20 linux servers which I need to document the configuration of. I do not mean the detailed configuration of services, but rather user accounts, databases, databases accounts, ip addresses, physical location, SSH port etc. etc. I know all this data is stored in config files, but I want to centralize it all. I am considering just creating a spreadsheet to record this data, but was wondering if there is something better (perhaps a small php/mysql app) which would be more structured and complete than a hacked together spreadsheet.

    What do you use?

    • hookenz
      hookenz almost 14 years
      I hadn't thought to much about this before but it would be useful. The spreadsheet approach is probably not ideal. It's easy to get it out of date. Automated has to be the way to go.
  • Michelle
    Michelle almost 14 years
    Thanks but cfg2html is overkill for my requirements. Great script though!
  • Michelle
    Michelle almost 14 years
    I like this solution, very flexible. It would be nice if there were already some scripts available to update the wiki.
  • ThorstenS
    ThorstenS almost 14 years
    +1 I also use cfengine2 (and mediawiki for further documentation)
  • gokva
    gokva about 12 years
    ok but how to make a report of the data in puppet?