Da auf meinem Rootserver zum wiederholten Mal Probleme mit der zweiten Festplatte (/dev/sdb) auftraten, wurde diese soeben im Rechenzentrum getauscht (ein Lob an Hetzner für den schnellen Support). Da die Platte Bestandteil eines Software RAID1-Verbunds ist, kurz die Schritte zum Entfernen und anschließenden Reaktivieren der Platte.
Zuerst alle Partitionen der Platte auf faulty setzen und anschließend aus dem jeweiligen Array entfernen:
On a server, I use logcheck to get an email based on logfile analysis if anything goes wrong and doesn’t fit the usual patterns. In addition, I use sSMTP to forward all sent mails to my mailserver. Unfortunately, this solution ends up in sending a mail like the following every hour because of a bug in logcheck’s ignorefile for sSMTP.
Dec 12 22:02:06 hostname sSMTP[22391]: Sent mail for logcheck@hostname (221 2.0.0 Bye) uid=101 username=logcheck outbytes=639
To fix this, I replaced the contents of the file /etc/logcheck/ignore.d.server/ssmtp with the following lines:
^w{3} [0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} [a-zA-Z0-9]+ sSMTP[[0-9]+]: Sent mail for logcheck@.*$
^w{3} [0-9] [0-9]{2}:[0-9]{2}:[0-9]{2} [a-zA-Z0-9]+ sSMTP[[0-9]+]: Sent mail for logcheck@.*$
I removed the other lines, because sSMTP shouldn’t do anything else on the system and if it would, I’d like to be informed. If you need more ignore patterns you might have to keep/edit some of the original lines.
Lately, I wanted set up a Ubuntu Hardy DomU on an existing Debian Etch Dom0 box. Usually, setting up Debian-based DomUs is very simple with xen-create-image and debootstrap (there are tons of tutorials out there dealing with this topic), but unfortunately Etch’s version of debootstrap doesn’t support Ubuntu Hardy. I spent a surprisingly long time on searching the net until I found a solution for this problem on a french site: Installer et configurer Xen sur Debian 4.0 Etch (it’s a complete howto for Xen on Debian Etch, but it deals with the Hardy part too). The author created a backport of the debootstrap package, which enables you to debootstrap Hardy.
First, you have to create the hardy.d directory (symlink) for xen-tools.
$ cd /usr/lib/xen-tools
$ ln -s ubuntu.d hardy.d
There’s a debian repository holding the backport package, however I got problems to use that repository on an amd64 box, so I downloaded and installed the package manually.
Update: This post is quite old and does not work out of the box with the current ISPMail tutorials. I posted an update here.
When it comes to mail servers, I really like the setup Christoph Haas describes in his Document Howto: ISP-style Email Server with Debian-Etch and Postfix 2.3. One thing I was missing on a server was the ability to automatically generate config files for fetchmail and sieve from the database in order to get mail from other servers and being able to apply server side filters on incoming mail. This howto is based on the mentioned tutorial.
The additional setup is quite simple: 2 more database tables hold the data for fetchmail and sieve rules and a set of PHP scripts called by cron every few minutes fetches the data and writes it into the appropriate config files. For fetchmail, a script creates a .fetchmailrc file in /home/vmail/. For sieve, another script creates a .dovecot.sieve config file for every user who got sieve rules in the database.
As I work on many projects and experiments on my local windows development environment (XAMPP), I normally put all web stuff in the htdocs directory and usually I’m happy with it. For several projects (like CMS installations or experiments with frameworks) it’s very handy to have a separated virtual host in order to be able to have an own document root for that application. You just don’t have to bug with different paths and subdirectories and can focus on developing instead of setting base URLs etc.
For example, if I develop MVC applications which are meant to run in a host’s document root, I want to work with paths like http://<host>/<controller>/<action> without having to deal with subdirectories like http://<host>/directory/subdirectory/public/<controller>/<action>.
It just facilitates developing and even tough it’s a little more work at setting up a new project, usually it’s worth it. Here’s a quick and dirty how to achieve this in two steps.
Ich wollte soeben auf meinem frisch installierten Ubuntu 8.04 folgendermaßen Ruby On Rails installieren, um mal wieder zu versuchen, mich darin einzuarbeiten ;-)
Die Installation der Pakete über apt verlief gewohnt problemlos, aber gems erwartete mich mit einer netten Fehlermeldung:
maff@mafftop:~$ sudo gem install rails --include-dependencies
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find rails (> 0) in any repository
Hmm, komisch. Gerade Rails wird nicht gefunden? Das kanns doch fast nicht sein. Also hab ich ein bisschen gesucht und einen Post gefunden, der das Problem beheben soll. Also hab ich mal schön Schritt für Schritt alles nachgemacht :-) Durch ein gem env wird das Installationsverzeichnis von gems ausgespuckt, in dem der cache-Pfad gelöscht werden soll:
maff@mafftop:~$ sudo gem install rails --include-dependencies
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed rake-0.8.1
Successfully installed activesupport-2.0.2
Successfully installed activerecord-2.0.2
Successfully installed actionpack-2.0.2
Successfully installed actionmailer-2.0.2
Successfully installed activeresource-2.0.2
Successfully installed rails-2.0.2
7 gems installed
Installing ri documentation for rake-0.8.1...
Installing ri documentation for activesupport-2.0.2...
Installing ri documentation for activerecord-2.0.2...
Installing ri documentation for actionpack-2.0.2...
Installing ri documentation for actionmailer-2.0.2...
Installing ri documentation for activeresource-2.0.2...
Installing RDoc documentation for rake-0.8.1...
Installing RDoc documentation for activesupport-2.0.2...
Installing RDoc documentation for activerecord-2.0.2...
Installing RDoc documentation for actionpack-2.0.2...
Installing RDoc documentation for actionmailer-2.0.2...
Installing RDoc documentation for activeresource-2.0.2...
Im Laufe einer Servererweiterung bin ich von Lighttpd wieder auf Apache zurück. Nicht dass ich mit Lighty nicht zufrieden gewesen wäre (v.A. in Bezug auf Geschwindigkeit, Speicherauslastung und einfacher Konfiguration), aber der Apache kann einfach mehr, speziell wenn es um DAV und SVN geht. Hab jetzt Apache mit PHP über mod-fcgid laufen und dazu endlich meines eigenes SVN-Repository + Trac :-)