Linux: Use Git to backup/store /etc directory

If more than one person has to manage a server, it might come in handy to have some kind of versioning of the config files.
But also having the possibility to keep track of local configuration changes in your system could be very usefull.

I found 2 tools that can help you:

1. etckepper

etckeeper is a collection of tools to let /etc be stored in a git, mercurial, darcs, or bzr repository. It hooks into apt (and other package managers including yum and pacman-g2) to automatically commit changes made to /etc during package upgrades. It tracks file metadata that revison control systems do not normally support, but that is important for /etc, such as the permissions of /etc/shadow. It’s quite modular and configurable, while also being simple to use if you understand the basics of working with revision control.

2. Changetrack:

Changetrack logs modifications of a set of files, and allows recovery of the tracked files from any stage of development. The changes are presented in a powerful web-based form, a text file, or an email message. A handful of options allow situation-specific configuration, but the code is readily available for more complex modifications.

Apache2: apr_sockaddr_info_get() failed for HOSTNAME

If your apache2 outputs this warning when starting, read along how to fix it:

Problem is that Apache2 is told to use a hostname that the system can not resolve.
Simple solution is to put HOSTNAME to the /etc/hosts file, like this:

If you have the problem that your /etc/hosts is ignored, check this article:
Linux: /etc/hosts gets ignored

Linux: /etc/hosts gets ignored

I had the problem that my /etc/hosts wasn’t read by the system.

First: Use ping to test local Hostname lookups, because dig calls the nameservers directly.

There are two files that can configure in which order the lookup system are tried.
The two systems are the local hosts file and the normal DNS system.


“order hosts,bind” tells the system to use the hosts file first, and then try bind == DNS system.


“hosts: files dns” tells the system to use the hosts files first, and then try DNS system.

Try which file has to be edited, because it is not clear which is used.