Recently I started a small project to build an incremental sql database of meta information related to debian packages. In the process I discovered that the newly available feature of sqlite3 to add custom collation doesn't work well with the sqlite3 bindings present in python 2.5 . The reason is that in order to load a collation at run time, you must explicitly enable the extension loading mechanism. The binding present in python 2.5 (fixed in python 2.6) do not expose this C function.
ruby, rails and redmine on debian as a user
Rails/redmine installation on debian etch as a user requires a bit of googling. This is what I have done.
First, as root, install these packages:
apt-get install rubygems -t etch-backports
aptitude install libopenssl-ruby1.8 libfcgi-ruby1.8
you need the backports version of gems as the version in etch is not compatible anymore with redmine.
Then you should follow these instructions: http://www.redmine.org/wiki/redmine/HowTo_Install_Redmine_in_a_home_directory_on_Debian
my new freerunner !
The other day I got a new, shiny freerunner. This is my
use vlogger with apache2
vlogger [1] is a nice piece of software to deal with large number of virtual hosts. It is meant to work with apache by piping the logs to the vlogger process that will then take care of storing them in you log directory.
I found an excellent howto that describes how to install vlogger in debian [2] .
To better integrate it with webalizer you can use this small bash snippet to generate conf files automatically for all your vhosts. This assumes that your log files are stored in /var/log/apache2 and that you don't have any other directories there but those generated by vlogger.
use postfix to setup a satellite host and maquerading
It's actually pretty easy. On the client side you need to specify your hostname, your origin and the relay host. For example:
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = dev.localnet.xen, dev, localhost
relayhost = [mail.localnet.xen]
mynetworks = 127.0.0.0/8
Mydestination must not be set otherwise mail will be delivered locally. Server side you need first rewrite
name-based virtual hosting with ssl
I've been looking for a solution to this problem for a long time. Basically apache2 is not able to do name-based virtual hosting if you also want to use ssl. The reason for this problem is very simple. In order to know then hostname, apache2 I need to establish a secure channel, but to establish a secure channel, if I have more then one virtual host, then I need to know the hostname, that is, to provide the client the correct certificate. There is also a better explanation on the apache website [1].
openvpn day
Today I spent large part of the day to configure a vpn to access our servers. Instead of leaving port 22 wide open, I prefer to use a vpn to access the internal network and to do ordinary administration tasks. This way I'll also be able to use graphical tools that I don't feel like to use over the internet.
lvm and friends
Not a tutorial, just few lines to write down what I've done.
This command gives you information about all virtual groups
Then, to create a logical group :
the -l option specifies the number of extent to allocate for this lv . You can see the number of available extents for a vg with the command above. This is useful to know when you want to create a lv using all the available space.
Then let's create an xfs fs on this lv : <code>
MD1000 performance
This is data related with a dell 2950 + md1000 that I'm configuring. /dev/sda is the onboad raid controller with 3 300G sas disks (raid5). /dev/sdb is the md1000 with 5 1T sata disk (raid5). First when configuring the md1000 you must create the logical volume from the bios. I've created a fairly standard raid5 array using with all disks.
The crude data without any optimization is as follows:
<code lang=sh> promethium:~# hdparm -tT /dev/sda
/dev/sda: Timing cached reads: 5872 MB in 2.00 seconds = 2940.90 MB/sec
configuring sympa with postfix
Last week I took over the task of migrating sympa from a vserver machine to a xen vm. In the process I upgraded the sympa version and changed the MTA, from sendmail (ahhhhhhhhhh) to postfix. In my opinion sympa is designed to do far too many things just to be a mailing list manager. In particular, it has its own mail spool, it organizes mail delivering (via the MTA) and bounces.