Unix Rechte und Besitzer zurücksetzen
Kleiner Reminder:
find dir -type f -print0 | xargs -0 -r chmod 0644 find dir -type d -print0 | xargs -0 -r chmod 0755 chown -R root:root dir
Kleiner Reminder:
find dir -type f -print0 | xargs -0 -r chmod 0644 find dir -type d -print0 | xargs -0 -r chmod 0755 chown -R root:root dir

sysbench downloaden: http://sourceforge.net/projects/sysbench/
Notwendige Pakete:
apt-get install automake libmysqlclient15-dev
Kompilieren:
./configure sed -i configure.ac -e 's/AC_PROG_LIBTOOL/AC_PROG_RANLIB/' # fix ./autogen.sh # fix make make install
apt-get install daemonlogger daemonlogger -i eth0 -o eth3
Wenn man beispielsweise heute um 20:15 Uhr ein bestimmtes Script starten möchte, kommt man meist um ein Crontab nicht herum. Mit diesem kleinen Script übergibt man als Parameter ein Datum und/oder Uhrzeit und das Script wartet dann bis zu diesem Zeitstempel, bevor das Script beendet wird und das darauf folgende Programm gestartet wird – somit spart man sich das aufwändige editieren der Crontab-Files.
Uhrzeit:
root@test:~$ ./tsleep.sh 14:30; reboot i sleep until 2009-12-12 14:30:00 ...
Datum:
./tsleep.sh 2009-12-24; reboot i sleep until 2009-12-24 00:00:00 ...
Datum mit Uhrzeit:
root@test:~$ ./tsleep.sh 2009-12-24 13:45:12; reboot i sleep until 2009-12-24 13:45:12 ...
Der Zeitstempel wird in Sekunden umgerechnet und über eine while-Schleife sekündlich mit dem aktuellen Datum abgeprüft. Ist das aktuelle Datum gleich oder älter dem Zeitstempel, wird das Script beendet und das darauf folgende Program gestartet. Als Zeitstempel kann man alles verwenden was date futtert.
Eine alternative wäre die Differenz der aktuellen Zeit und des Zeitstempels in Sekunden umzurechnen und dann
Sollte jemand Fehler finden oder das Script verbessern, würde ich mich freuen, wenn Ihr mir das mitteilt ;).
#!/bin/bash if [[ -z "$1" ]]; then echo "Usage: $0 <timestamp>" >&2 exit 1 elif [[ -z "$2" ]]; then date="$1" else date="$1 $2" fi date_end=$(date --date="$date" +%s 2>/dev/null); if [[ ! $? -eq 0 ]]; then echo "error: invalid date" 2>&1 exit 1 fi if [[ $date_end -le $(date +%s) ]]; then echo "error: end time is lower or eqal start time" >&2 exit 1 fi echo "i sleep until $(date --date="$date" "+%Y-%m-%d %H:%M:%S") ..." while [[ $(date +%s) -le $date_end ]]; do sleep 1 done exit 0
wget http://blog.kevin-k.com/wp-content/uploads/2009/12/tsleep.sh chmod +x tsleep.sh
Alternativ gibt es auch at, das Befehle direkt von Standard-Input oder einer Datei ließt und zu einer bestimmten Uhrzeit ausführt.
After the installation of debian lenny on my i2o controller (via manual bootloader installation), the system halts:
iop0: DMA / IO allocation for I2O controller failed
The problem is that the dpt_i2o module is loaded before i2o_core, so that i2o_core module cannot allocate the i2o controller.
The simplest solution is to to blacklist the dpt_i2o module, so that module is not loaded at startup and i2o_core can successfull allocate the i2o controller.
For lilo, add this in your /etc/lilo.conf:
image=/vmlinuz
...
append="blacklist=dpt_i2o"Do not forget to run “lilo” afterwards.
For grub, you must add the the following kernel parameter:
... kernel /vmlinuz ro root=/dev/i2o/hda1 blacklist=dpt_i2o
I do not use grub, so please correct me if the param is somehow wrong.
Its a little bit tricky, but this is how it works:
Go to http://www.vmware.com/go/getserver and login (or register).
get the download-url of the file (right-click…):

To download via wget, you need to get the cookie named “ObSSOCookie” from your browser.

Use this command to download the file:
wget --no-check-certificate --header="Cookie: ObSSOCookie=<content>" "<url>" -O vmware-server.tar.gz
Example:
wget –no-check-certificate –header=”Cookie: ObSSOCookie=content” “https://www.vmware.com/freedownload/p/download.php?product=server20&a=DOWNLOAD_FILE&baseurl=http://download2.vmware.com/software/server/&filename=VMware-server-2.0.1-156745.i386.tar.gz” -O vmware-server.tar.gz
Happy downloading ;).
apt-get install build-essential psmisc gcc-4.1 linux-headers-$(uname -r) tar xfzv VMwareTools-7.8.4-126130.tar.gz ./vmware-tools-distrib/vmware-install.pl CC=/usr/bin/gcc-4.1 /usr/bin/vmware-config-tools.pl
gcc-4.1 ist notwendig, wenn der Kernel (z.b. aus den Repositories) mit einer anderen GCC Version kompiliert wurde, als auf dem System vorhanden:
Your kernel was built with “gcc” version “4.1.3″, while you are trying to use
“/usr/bin/gcc” version “4.3.2″. This configuration is not recommended and
VMware Tools may crash if you’ll continue. Please try to use exactly same
compiler as one used for building your kernel. Do you want to go with compiler
“/usr/bin/gcc” version “4.3.2″ anyway?
aptitude --without-recommends install mysql-server-5.0
I get the following message in syslog from snmpd:
Jun 22 17:10:43 test snmpd[9508]: cannot open /proc/net/snmp ... Jun 22 17:10:45 test snmpd[9508]: cannot open /proc/net/dev ...
The problem is, that snmpd has no rights to access the proc-filesystem to gather information about interfaces and so.
check the rights of the user and group of snmpd:
root@test:~$ cat /proc/$(pidof snmpd)/status | grep -i -e "^[u|g]id" Uid: 106 106 106 106 Gid: 0 0 0 0
In my case, the problem was that i was running a grsec kernel (stupid default kernel of my root) and access to proc by users was permitted by the kernel.
to change this, you must change your kernel config (see grsecurity for instructions).
another solution is to change the user or group to a special grsec user/group. but event this is not working correct under some distributions, but patching the source code of snmpd may help.