Month: June 2011

  • Install VMware ESX4.1 via PXE

    We recently received 2 new servers that I needed to install the newest ESX on. I downloaded the IOSs, but I did not want to have to burn them. So I decided to try and install ESX via PXE. I did not have an answer file (kickstart), so I wanted to run an interactive install from PXE.…

  • xcopy: permissions,recursive,incremental

    I can never remember xcopy’s flags, so I am creating a post for myself. xcopy SourceDrivePath DestDrivePath /X /C /E /H /Y /D /X Perms /C continue on error /E Recursive with empty folders /H (hidden and system) Copy hidden and system files /Y (yes) No Prompts /D (date) SourceDate is newer then DestDate (incremental)

  • PowerShell Function to get uptime on multiple computers

    I wanted to create a function that I could use to find the uptime of several workstations. I did not want to read a list of machine name from csv, I just wanted pass a list of workstation names and get their uptime back. I also added a ping check to make sure the machine…

  • php53 included in CentOS 5.6

    I wish I read release notes, it would make my life easier. In my previous post, I was worried about CentOS 5.x not having a new enough version of PHP to run the soon to be release WordPress 3.2. Well, RedHat’s 5.6 release notes clearly say: Version 5.3.3 of PHP is now available in Red…

  • “error establishing a database connection” in a previously working WordPress site

    My site just crashed!!! I received the oh-so-helpful error “establishing a database connection” when I went to my site. Other sites on the server were fine.  The site was working fine, and my config had not changed. The httpd error log showed nothing. Then I found this in the MySQL logs (/var/log/mysqld.log) [ERROR] /usr/libexec/mysqld: Table…

  • mysql_secure_installation

    I just learned about the script: /usr/bin/mysql_secure_installation. Very cool. Here are the commands that the script actually runs. I am going to add these to my provisioning script (I already take care of the root password piece): mysql -e “DROP DATABASE test;” mysql -e “DELETE FROM mysql.user WHERE User=’root’ AND Host!=’localhost’;” mysql -e “DELETE FROM…

  • CentOS, NTPD, VMware and sleeping.

    I have a MacPro at home, and I am running VMware Fusion on it. At night, I sleep the machine to save electricity. I have a CentOS guest running and the time is always out of sync. After the VM is restored from sleep, the NTP service is no longer running and my time really…

  • Powershell script to install Cygwin

    I like having Cygwin installed on my machine, and since I always re-image, I needed a script to install Cygwin automatically. This will download and install Cygwin and install the openssh package.

  • OpenVPN on windows with a TUN device

    Since my laptop hard drive  died, I did not have access to my home VPN. I needed to set up OpenVPN on windows. I setup my PKI and installed the portable version of OpenVPN. Tried connecting and got this error: There is a problem in your selection of –ifconfig endpoints [local=X.X.X.X, remote=X.X.X.X]. The local and…

  • Running a BASH script when my Laptop is opened at home – Part 1

    My laptop hard drive died. I was upset only because there was data on my laptop that had not been moved over to my desktop. My desktop has time machine and is rsynced to several other drives and locations. So I lost data. My own fault because I was not diligent in moving data off…