Debian

How to install Exim4 on a local (LAN) host to use an SMTP smarthost for sending mail

First of all: install exim Smiling
apt-get install exim4 bsd-mailx
Now we have to reconfigure it, because by default it won't deliver any mails to any external address:
dpkg-reconfigure exim4-config

How to test recursively various archive files

The following simple command will browse through the tree of the current directory for various archive files and test their integrity. If the test fails, it'll print the file's path. You can easily extend it by adding more filename patterns and tests.
find . -type f \( \( -iname '*.zip' -o -iname '*.jar' -o -iname '*.war' -o -iname '*.ear' -o -iname '*.odt' -o -iname '*.ods' -o -iname '*.odp' -o -iname '*.docx' -o -iname '*.xlsx' -o -iname '*.pptx' -o -iname '*.xpi' \) -not -exec sh -c "unzip -t -P '' '{}' > /dev/null 2>&1" \; -o \( -iname '*.tar.gz' -o -iname '*.tgz' \) -not -exec sh -c "tar tzf '{}' > /dev/null 2>&1" \; -o -iname '*.tar.bz2' -not -exec sh -c "tar tjf '{}' > /dev/null 2>&1" \; -o -iname '*.tar' -not -exec sh -c "tar tf '{}' > /dev/null 2>&1" \; -o -iname '*.rar' -not -exec sh -c "unrar t -p- '{}' > /dev/null 2>&1" \; \) -print

Managing SSL certificates for various JVMs on Debian Squeeze

In case of the Sun/Oracle JVM (JRE/JDK) the SSL certificates are store in this keystore: /etc/java-6-sun/security/cacerts. To update it, use the keytool utility that comes with the JRE/JDK.

How to configure SSL (aka. ldaps) for libnss-ldap/auth-client-config in Ubuntu

The LDAPClientAuthentication page in the Ubuntu Community wiki describes the basic setup pretty well. However if you bring encryption (SSL/TLS) into the game, it's a quite different story.

Munin plugin to monitor DNS response times

With this Munin plugin you can monitor the DNS response times of specific queries. It uses dig to execute the DNS queries. You can specify multiple hostnames to query for and a separate DNS server for each query. Quite useful. I've added the hostnames (that you query for) to the labels in the generated Munin reports in the attached (modified) version of the plugin.

How to install Oracle Database Express Edition 11g Release 2 (11.2) on Debian Squeeze x86_64

There's a very good how to on installing this particular Oracle RDBMS version on Ubuntu 11.10 here. However Ubuntu is not Debian, there're a few differences. Mostly you've to skip a few steps:

How to log (eg. iptables) messages based on message body in a separate file using rsyslogd

In Debian the default /etc/rsyslog.conf includes all *.conf files from /etc/rsyslog.d. The contents of these config files are read by rsyslogd before the default rules, so you easily override any defaults.

Network connection problems in Debian Squeeze after the net.ipv6.bindv6only change

Well, this is a classic one. Smiling The maintainer of the netbase package proposed a fundamental change in how network sockets should be managed regarding IPv4 vs. IPv6 (ie. IPv4-mapped IPv6 addresses). He suggested that the default of the net.ipv6.bindv6only kernel variable should be set to 1 (whereas the current default is 0). After "some" discussion (he and two other guys had something to say about the topic in a one and a half month period) he made the change on 6th December 2009.

How to install an up-to-date ffmpeg in Debian Squeeze from debian-multimedia.org

It's really not that difficult, requires only a few tries with various repositories and APT configurations. First of all let's make something clear: when I say "up-to-date", I mean the latest release. To get this, we've to install ffmpeg from the sid (aka. unstable) packages of www.debian-multimedia.org.

Update (2011.12.23): I've added a few corrections to this post after applying it to a number of Debian Squeeze servers.

Making PHP session expire (in Drupal and in general)

(...) Modern Linux distro's, say Ubuntu (8.10) comes with a default PHP configuration of session.gc_probability = 0. This means that in general, session GC will never run(!). There is a unix cron job that runs every half hour and checks for old sessions to delete (see more at /etc/cron.d/php5) but this is done only if you're using the standard "files" as your session handler (check out the directive of session.save_handler on your machine to learn what php default sessions handler is but make sure to check that your application doesn't overwrite this), so for Drupal users using plain Debian/Ubuntu, stock LAMP packages and stock Drupal applications, this means that the PHP garbage collection, despite your best intentions, will also never run. (...)

Syndicate content