Linux – Lästiges consolen-„beep“ deaktivieren

am Mai 12, 2012 in console, Linux

Man kann den oft sehr lästigen „beep“ auf der Linux-Console folgenderweise deaktiviern: Falls der X-Server läuft: xset b off dies deaktiviert den consolen-beep für alle Programme Auf der console: setterm -blength 0 oder echo ’set bell-style none‘ >> ~/.inputrc mehr dazu in den jeweiligen man-pages: man xset man setterm Damit dies jedoch permanent gespeicher wird, müsste man einen der oben genannten Befehle ins Start-scrip einbauen.   Eine weitere Möglichkeit wäre, das PC-Speaker Modul zu deaktivieren: rmmod pcspkr so hält es aber leider nur bis zum nächsten reboot, deshalb um fix zu deaktivieren, black-listen wir das Modul: blacklist pcspkr  

Backup & Restore einer MySQL Datenbank

am Mai 12, 2012 in Datenbanken, MySQL

Eine MySQL-DB kann man folgenderweise unter Linux sichern: Alle Datenbanken auf dem MySQL-Server: mysqldump -u dbusername -p –all-databases >alldb-bkp.sql ..inklusive Drop-Table: mysqldump –add-drop-table -u dbusername -p –all-databases >alldb-drop-bkp.sql   um nur eine bestimmte Datenbank zu sichern: mysqldump -u dbusername -p [Datenbank] > db-bkp.sql ..ebenfalls inklusive Drop-Table: mysqldump –add-drop-table -u dbusername -p [Datenbank] > db-drop-bkp.sql   Wiederherstellung einer DB: mysql -u dbusername -p databasename < db-drop-bkp.sql.sql

Win7/W2K8 – alle Events per cli löschen

am Mai 11, 2012 in Microsoft, Win7-W2K8

Seit Windows7 sind im eventlog mehrer logs vorhanden. Um dort alle zu löschen, benötigt man einen guten „klick-Finger“ oder einen einfachen Befehl: for /f „delims= “ %i in (‚wevtutil el‘) do @wevtutil cl „%i“ Mit diesem Befehl löscht man alle logs 🙂

Backup des Win7/W2K8 – Profils mit robocopy

am Mai 11, 2012 in Microsoft, Win7-W2K8

Sicher hat schon jemand probiert, das Benutzer-Profil von Windows7 oder Server 2008 mit robocopy zu sichern, und dabei festgestellt, daß eine Art „loop“ entsteht (im Ziel-Ordner). Das problem sind die „Junction points“. Abhilfe dazu ist der schalter „/XJ“: Explanation /E Copy all subdirectories, even empty ones. /ZB Use restartable mode; if access denied use Backup mode. /R:0 Number of Retries on failed copies, in this case 0. /W:0 Wait time between retries, in this case 0. /XJ Exclude Junction points /NFL No File List – don’t log file names. /XD Exclude selected directories; space delimited /XF Exclude selected files; space delimited Beispiel das eigene Benutzer-profil zu sichern: robocopy.exe c:UsersFreddy z:ProfileBackup /E /ZB /R:0 /W:0 /XJ /NFL /XD „Temporary Internet Files“ Temp cache WER/XF *cache* Achtung: die cmd.exe...

Autologon Win7 – W2K8

am Mai 11, 2012 in Microsoft, Win7-W2K8

here’s how to get the missing checkbox back and configure Autologon: reg add „HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon“ /v AutoAdminLogon /t REG_SZ /d „1“ /f control userpasswords2 You may find that you need to configure the default domain, as well. If so, enter the following (all on one line) at a CMD prompt, edited to user your domain name: reg add „HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon“ /v DefaultDomainName /t REG_SZ /d „domain“ /f #################################################### Once you join a server to a domain, Windows will automatically delete the AutoAdminLogon value from the HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon registry key. This causes the userpasswords2 control to hide the „Users must enter a user name and password to use this computer“ check box shown above....

Linux als Router

am Mai 11, 2012 in Linux

Um Linux als Router zu verwenden sind nur wenige Befehle notwendig: routing einschalten: echo 1 > /proc/sys/net/ipv4/ip_forward nat aktivieren (nicht immer erforderlich): iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE man könnte logischerweise alles in einem Script einbinden: #!/bin/sh ifup eth0 ifup eth0:1 route add default gw 10.0.0.254 eth0 #### für bessere security: iptables -t nat -P POSTROUTING DROP ##### iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward Falls man nicht sicher ist, ob bereits Regeln vorhanden sind (iptables), und diese löschen möchte, diesen Befehl eingeben: Löscht alle Regeln: iptables -F (oder iptables –flush) Löscht nur die Regeln der Kette INPUT: iptables -F INPUT Weitere Links: http://www.oreilly.de/german/freebooks/linag2/netz1103.htm...

ESXi5.0 „Logs are stored on non-persistent storage“

am Nov 15, 2011 in ESXi5.0

Nach einem Upgrade von ESX4.1 auf ESXi5.0 erschien am Anmeldebildschirm folgende Meldung: Logs are stored on non-persistent storage. Consult product documentation to configure log server or a scratch partition Abhilfe: Im vClient, beim Host, unter Erweiterte Einstellungen/Syslog folgendes eintragen: Syslog.global.logDir: [] /scratch/log ich habe unteranderem den VMware Syslog Collector installiert, um diesen zu konfigurieren, folgendes eintragen: Syslog.global.logHost: udp://[servername]:514 danach verschwand bei mir die Fehlermeldung.

VMware Tools können nicht installierd werden…“A previous installation of VMware Tools has been detected“…

am Jun 15, 2011 in VMware

Failure to install VMware Tools: Cannot find the answer BINDIR in the installer database Details If a VMware Tools installation is stopped before it can set the BINDIR (which occurs after the first prompted question), the installer is stopped prematurely and displays the following message: A previous installation of VMware Tools has been detected. The previous installation was made by the tar installer (version 4). Keeping the tar4 installer database format. You have a version of VMware Tools installed. Continuing this install will first uninstall the currently installed version. Do you wish to continue? (yes/no) [yes] If you select yes, the following error message appears: Error: Unable to find the binary installation directory (answer BINDIR) in the installer database file „/etc/vmware-tools/locations“. Uninstall failed. Please correct the failure and re run the install....