apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName

By default Ubuntu doesn’t specify a ServerName in the Apache configuration, because it doesn’t know what the name of your server is. It tries a reverse lookup on your IP address, which returns nothing, so it just has to use the IP address as the ServerName. To fix it, either add a ServerName directive outside … Read more

Command line program to test DHCP service

Even if you don’t use a Nagios monitoring server, you can grep the check_dhcp binary or compile it from source and use the check to test a DHCP-Server. E.g. ./check_dhcp -v -s <dhcp_server_address> -r <expected_ip_address> -m <mac_address_touse>

What is the debian-sys-maint MySQL user (and more)?

What is debian-sys-maint used for? One major thing it is used for is telling the server to roll the logs. It needs at least the reload and shutdown privilege. See the file /etc/logrotate.d/mysql-server It is used by the /etc/init.d/mysql script to get the status of the server. It is used to gracefully shutdown/reload the server. … Read more

Automate the installation of postfix on Ubuntu

You can use pre-seeding for this, using the debconf-set-selections command to pre-answer the questions asked by debconf before installing the package. For example: debconf-set-selections <<< “postfix postfix/mailname string your.hostname.com” debconf-set-selections <<< “postfix postfix/main_mailer_type string ‘Internet Site'” apt-get install –assume-yes postfix

Apache2 config variable is not defined

[Fri Nov 29 17:35:43.942472 2013] [core:warn] [pid 14655] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined This message is displayed because you directly executed the apache2 binary. In Ubuntu/Debian the apache config relies on the envvar file which is only activated. If you start apache with the init script or apachectl. Your original problem is that … Read more

Is there a proper way to clear logs?

You can use: > /var/log/mail.log That will truncate the log without you having to edit the file. It’s also a reliable way of getting the space back. In general it’s a bad thing to use rm on the log then recreating the filename, if another process has the file open then you don’t get the … Read more