dbus fix – ubuntu 11.10 (oneiric)
In case you have installed Ubuntu oneiric and notice a dbus error at boot, here is the fix:
1) create directories /run and /run/lock,
2) move contents of /var/run into /run and /var/lock into /run/lock,
3) delete directories /var/run and /var/lock
4) create replacement simlinks; e.g. ‘ln -s /run /var/run’ and ‘ln -s /run/lock /var/lock’
Reboot, and things should be back to normal.
Transparent switching from apache2-mpm-prefork to apache2-mpm-worker (Debian Squeeze)
If you install this configuration in /etc/apache2/conf.d + libapache2-mod-fcgid, then you can use either version of apache2 with php5.
First add the programs indicated and then add the script below to /etc/apache2/conf.d:
apt-get install apache2-mpm-worker libapache2-mod-fcgid
a2enmod fcgid
aptitude install php5-cgi php5-cli
###00-fcgi###
<Directory /var/www>
AddHandler fcgid-script .php
FCGIWrapper /usr/lib/cgi-bin/php5 .php
Options +ExecCGI
</Directory>
Alias /aptitude /usr/share/doc/aptitude/html/en
Alias /apt /usr/share/doc/apt-doc
<Directory /usr/share>
AddHandler fcgid-script .php
FCGIWrapper /usr/lib/cgi-bin/php5 .php
Options ExecCGI FollowSymlinks Indexes
</Directory>
<IfModule mod_actions.c>
Action application/x-httpd-php /cgi-bin/php5
</IfModule>
With the above additions, you can run apache2-mpm-worker or apt-get install apache2-mpm-prefork and either will run. Of course if you prefer to use the php apache module with apache2-mpm-prefork, you can add that with apt and remove the above script from conf.d
Bash search and replace ip script
You can search and replace and IP address in bind (named.conf) or name server records with this script:
Assign values as indicated.
#!/bin/bash
x=`cat oldip`
a=`cat newip`
cmd=”sed -e”
$cmd “s#$x#$a#g” oldconfigfie > new.configfile
Handy script to parse Postfix maillogs for failed login IP addresses
You can use the script below to parse your maillog (mail.log on Debian based distros) for failed login attempts and place the results in your hosts.deny file or your IP tables config. The script deletes leading 0 IP addresses and filters out [brackets]. You can change the grep filter phrase to your liking.
grep “failed” /var/log/maillog | grep -Eo “([0-9]{1,3}.){3}[0-9]{1,3}” | sed ‘s/^[0]*//’ | uniq
Centos 5.6
Centos 5.6 is out. Check out the announcement and upgrade info at:
http://lists.centos.org/pipermail/centos-announce/2011-April/017282.html
2.6.38 kernel for squeeze
Installing the new 2.6.38 kernel is pretty straightforward in Debian 6.
First make sure you have the following packages installed:
wget tar bzip2 build-essential libncurses-dev kernel-package fakeroot
Then do this:
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.38.tar.bz2
tar jxvf linux-2.6.38.tar.bz2
cp /boot/config-$(uname -r) /usr/src/linux-2.6.38/.config
cd linux-2.6.38; make menuconfig
make-kpkg clean
fakeroot make-kpkg –initrd –revision=custom.1.0 kernel_image
to install
dpkg -i ../linux-image-2.6.38_custom.1.0_*.deb
Debian 6 Released!
Debian 6 is out.
I notice no problems at all. If you are getting remaining files not updated after apt-get update, try aptitude update and aptitude upgrade. That usually resolves any problems.
Add dotdeb gpg key
wget http://www.dotdeb.org/dotdeb.gpg
cat dotdeb.gpg | apt-key add –
Debian Squeeze sources.list with dotdeb
deb http://ftp.us.debian.org/debian/ squeeze main
deb-src http://ftp.us.debian.org/debian/ squeeze main
deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main
deb http://packages.dotdeb.org squeeze all
deb-src http://packages.dotdeb.org squeeze all
deb-src http://debian.hands.com/debian/ squeeze main non-free contrib
deb http://mirror.home-dn.net/debian-multimedia squeeze main
deb http://liquorix.net/debian sid main
minimal dovecot.conf for Ubuntu, Centos, and Debian
Here is a minimal doveconf for Ubutnu Maverick. It includes sasl. This also works for Debian including squeeze, and Centos. Debian and Centos use dovecot.pem for both ssl_cert_file and ssl_key_file.
protocols = imaps pop3 pop3s imap
mail_privileged_group = mail
disable_plaintext_auth = no
ssl_cert_file = /etc/ssl/certs/dovecot.pem
ssl_key_file = /etc/ssl/private/dovecot.key
auth default {
mechanisms = plain login
passdb pam {
}
userdb passwd {
}
socket listen {
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}