Skip to content

Monthly Archives: December 2008

Passing options to the Exim port on FreeBSD

31-Dec-08

The Exim port on FreeBSD does not have a menu-driven configuration system accessible by running make config, although it does have a plethora of options described in /usr/ports/mail/exim/options.  If using portupgrade, you can pass these options with the -m flag; for example: # portupgrade -m “WITH_CONTENT_SCAN=yes WITH_SASLAUTHD=yes WITH_DOMAINKEYS=yes” exim

MySQL Ports Installation Checklist

30-Dec-08

A brief summary of after-installation MySQL configuration when using FreeBSD’s ports system. Log into the database as root, and run the following commands to remove anonymous accounts: use mysql; delete from user where User=”; delete from db where User=”; flush privileges; SET PASSWORD FOR root@localhost=PASSWORD(‘newgoodstrongpassword’); SET PASSWORD FOR root@127.0.0.1=PASSWORD(‘newgoodstrongpassword’); SET PASSWORD FOR root@host.example.com=PASSWORD(‘newgoodstrongpassword’);

Suexec’ed PHP-FastCGI on Apache2

30-Dec-08

Code Snippets has an example post on how to do Suexec’ed PHP-FastCGI on Apache2.

Perl installation “best” practices

30-Dec-08

An old post, but one whose recommendations seem to work well – especially the part about installing as a non-root user – if you’re faced with an inflexible packaging of a system Perl that you don’t want to touch, like an RPM install. (Not needing to worry about things like this most of the time [...]

Quickly Remove IP Addresses from spamdb

30-Dec-08

To remove all whitelisted entries in – for example - 69.6.0.0/16 run: # spamdb | grep WHITE | egrep ‘\|69\.6\.’ | \ cut -f 2 -d ‘|’ | xargs -L 1 spamdb -d

Using GNU tar to create and restore incremental backups

30-Dec-08

The GNU tar manual has a very complete section on how to use tar to both create and restore from incremental backups: http://www.gnu.org/software/tar/manual/html_node/Incremental-Dumps.html.

Reloading and Testing pf rulesets

30-Dec-08

To test the ruleset in /etc/pf.conf, do the following: sudo pfctl -n -f /etc/pf.conf sudo pfctl -n -v -f /etc/pf.conf The second pfctl command displays the rules you’ve created; however, it can be easy to miss a syntax error warning in the verbosity – the first command will make it easy to spot those. You can [...]

OpenVZ P2V migration

30-Dec-08

A quick guide in the OpenVZ forums on physical-to-virtual migration: OpenVZ Forum: Support => Re: debian+networking

Bash Programming Cheat Sheet

30-Dec-08

A quick overview of Bash shell syntax: JustLinux’s Bash Programming Cheat Sheet.

FreeBSD Jail Upgrade Instructions

29-Dec-08

When upgrading via a patch, installing the patch can be done by adding a “DESTDIR” argument to make:# make install DESTDIR=/u1/jail/192.168.0.12 When upgrading from source (Adapted from Upgrading a Jail from Source):# setenv JAIL /u1/jail/192.168.0.12 # mergemaster -pd -D $JAIL # cd /usr/src && make installworld DESTDIR=$JAIL # mergemaster -svd -D $JAIL