HowTo's

From PostgreSQL_wiki
Revision as of 23:24, 16 March 2010 by 10.68.71.30 (talk) (Mac)
Jump to: navigation, search

Webhuis HowTo's.

Common

Uwork apt (lenny)

Uwork maakt gebruik van apt-cache ten behoeve van de snelheid bij nstallaties.

Key voor Webhuis packages

Uwork maakt gebruik van in eigen beheer samengestelde packages, waarvoor een key noodzakelijk is.

wget http://packages.webhuis.nl/debian/dists/webhuis-key.asc
apt-key add webhuis-key.asc

sources.list

deb http://mirror.webhuis.nl:3142/ftp.nl.debian.org/debian/ lenny main
deb-src http://mirror.webhuis.nl:3142/ftp.nl.debian.org/debian/ lenny main
deb http://mirror.webhuis.nl:3142/security.debian.org/ lenny/updates main
deb-src http://mirror.webhuis.nl:3142/security.debian.org/ lenny/updates main
deb http://mirror.webhuis.nl:3142/volatile.debian.org/debian-volatile lenny/volatile main
deb-src http://mirror.webhuis.nl:3142/volatile.debian.org/debian-volatile lenny/volatile main
# root@udell:~# cat /etc/papersize
a4
# root@udell:~# dpkg-reconfigure libpaper1
Replacing config file /etc/papersize with new version
# root@udell:~# cat /etc/papersize
letter
# root@udell:~# dpkg-reconfigure libpaper1
Replacing config file /etc/papersize with new version
# root@udell:~# cat /etc/papersize
a4

Dit werkt nog niet voor AMD-64:

#
#  Packages Webhuis
#
deb     http://mirror.webhuis.nl:3142/packages.webhuis.nl/debian     etch non-free

Tips and Tricks: HowTo's#apt_key_update



Mac

Configuratie van applicaties

Uwork zit in het proces van uitbreiden en verbeteren van geautomatiseerde configuratie van applicaties. Uwork genereert reeds complete en complexe configuraties voor samba-ldap en de vpn-router op basis van racoon. De pagina Configuratie van applicaties bevat de princioes waarop de configuratie plaatsvindt.

Tips and Tricks

Lenny

Problems:

slurpd vervangen
DNS

master slave werkt niet goed

Lenny maakt standaard gebruik van ipv6 en name resolution loopt fout:

dc01:~# cat /etc/resolv.conf
#search uwork.nl
nameserver 38.99.20.68
nameserver 208.69.39.2
#nameserver 10.20.31.35
dc01:~# ping opendns.org
ping: unknown host opendns.org
Lenny NT access denied
hvm op lenny

werkt niet, daardoor is win2008 niet op lenny te installeren

xm create /etc/xen/win2008-32g-install.cfg

No login prompt when using `xm console`

Using a lenny domU, make sure you have hvc0 listed in inittab, like 1:2345:respawn:/sbin/getty 38400 hvc0. There happened to be a lot of changes of default console unit used by Xen (tty1, xvc0, hvc0 etc) but for a Lenny domU (version > 2.6.26-9) it's hvc0.

Solved

Netwerk domU

De netwerkinterface van de domU werkt niet op de Intel machine. De vpn-router werkt wel, maar de toegevoegde machines niet.

De interface op de dom0 in /etc/network/interfaces moeten de naam xen-brx krijgen scripts gaan analoog.

xm console werkt niet op de Intel machine

Het opstarten van het console blijft steken.

Oplossing: Lenny xen werkt met een andere console definitie. Toevoegen in de <domain>.cfg:

extra       = 'console=hvc0 xencons=tty'
apt key update

apt-get update levert een error op:

W: GPG error: http://mirror.webhuis.nl etch Release: The following signatures couldn't be verified because
the public key is not available:  NO_PUBKEY 9AA38DCD55BE302B
W: GPG error: http://mirror.webhuis.nl etch/updates Release: The following signatures couldn't be verified because
the public key is not available: NO_PUBKEY 9AA38DCD55BE302B
W: You may want to run apt-get update to correct these problems

Oplossing:

gpg --keyserver subkeys.pgp.net --recv 9AA38DCD55BE302B
gpg --export --armor 9AA38DCD55BE302B | apt-key add -
lvextend

Voorbeeld uitbreiden logical volume:

# lvextend -L+400M /dev/dev-xen/winxp.img
subversion

Localtime is gewijzigd van file naar symbolic link, dat resulteert in de volgende fout:

# cfengine2:/var/backups/cfengine2# svn commit -m "handmatig 20090921"
svn: Commit failed (details follow):
svn: Entry '/var/backups/cfengine2/etc/localtime' has unexpectedly changed special status

Oplossing:

# cfengine2:/var/backups/cfengine2# svn pd svn:special etc/localtime
property 'svn:special' deleted from 'etc/localtime'.
# cfengine2:/var/backups/cfengine2# svn rm etc/localtime
D         etc/localtime 
# cfengine2:/var/backups/cfengine2# svn commit -m "handmatig 20090921"
Transmitting file data ...
Committed revision 224.
TLS bij ldap
http://rustykruffle.com/tech-stuff/ubuntu/ultimate-home-server-ldap-gnutls-nightmare/

try

ldd $(which slapd)

you may see, that slapd is build with gnutls and not openssl :-)

You have two different solutions to fix this:

1. use the tool certtool from gnutls in package gnutls-bin. doc is in gnutls-doc or use the doc from the qemu/kvm packages and look their for vnc.

2. create a copy of /etc/ssl/certs/cacert.pem and reorder your certificates. gnutls expects just the opposite order as openssl :-(

De oplossing:

   - Comment out TLSCipherSuite settings on upgrade from all versions prior
     to 2.4.7-5, and throw a debconf error to the user notifying them of
     this, since all OpenSSL cipher suite values are incompatible with
     GnuTLS.
Clock

Problem

domU verzuipt in clocksource meldingen en is niet responsief.

Workaround In your domU /etc/sysctl.conf add the line:

xen.independent_wallclock=1.

On the dom0, edit the configuration file of the domU (e.g. /etc/xen/foobar.cfg and add (or expand) the extra-line:

extra="clocksource=jiffies".

These settings can be activated without rebooting the domU. After editing the configuration files, issue

# sysctl -p and echo "jiffies"> /sys/devices/system/clocksource/clocksource0/current_clocksource

on the domU prompt.

# sysctl -p
# echo "jiffies"> /sys/devices/system/clocksource/clocksource0/current_clocksource

Because the clock won't be relying on the dom0 clock anymore, you probably need to use ntp on the domU to synchronize it properly to the world.

Na een reboot staat de clock op jiffies zonder het echo commando. In Xen luistert de domU zonder ntp naar de clock van de dom0

tty

Domain is na create niet te benaderen.

PTY allocation request failed on channel 0
stdin: is not a tty
                  

Voeg aan de xen-create het volgende toe:

--role=udev
xen-create-image --verbose --force --hostname=mi-m --ip=10.37.41.11 --netmask=255.255.255.128 --gateway=10.37.41.1 --size=8gb
                 --debootstrap --dist=lenny --mirror=http://mirror.webhuis.nl:3142/ftp.nl.debian.org/debian --role=udev
lib/modules

Op de AMD-64:

ontbreekt, vpn-router werkt niet

Op de Intel machine werkt het wel.

Oplossing: De dom0 was verkeerd geinstalleerd. Volg de wiki van debian.org en installeer xen-linx-system

Scripts

Verwijderen ^M in directory tree

Het verwijderen van de vermaledijde "control M, of ^M" in alle bestanden in een hele directory gaat als volgt:

find -type f -name "*.txt" -exec sed -i 's/^M//g' {} \;

Verwijderen bepaalde ASCII code in een bestand

Het is bedrijfszekerder om ASCII codes met directe referentie aan de code te wijzigen of te verwijderen:

sed -i 's/\x00//g' asg-dump.txt