Your Linux Data Center Experts

In the course of a lot of sysadmin tasks it becomes necessary to make some configuration change and then restart a server to make that new change take effect. There are some nice ways available to make sure the change you made won't keep the server from restarting correctly:

The idea is that you can make your change and then check it before restarting the service/server so you know that it will restart.

For apache web servers, when you make a change to it's configuration files, you can do: 'httpd -t' and it will parse the base config and tell you if it's ok and if there any any basic errors that will keep it from starting. Note that if you use mod_perl, mod_python, etc in your config files 'httpd -t' won't work right as it can't load those modules in to parse the rest of the config file.

For the BIND nameserver (named), there are two commands: 'named-checkconf' and 'named-checkzone' for configuration files and zone files respectively. For configuration files: 'named-checkconf /etc/named.conf' and for zone files: 'named-checkzone /var/named/'. These commands are especially nice as bind is very picking about how it's files are parsed and is very poor about telling you where the error is in the syslog. These commands use the same exact routines to parse the files as the named does.

Postfix has a 'check' command that looks for any simple problems that would prevent the server from working right: 'postfix check'. It doesn't parse config files, but it does make sure permissions are correct and so on.

comments powered by Disqus

Join our other satisfied clients. Contact us today.