Author: jbmurphy

  • 1000 visitors in a month!

    I have been using this Analytics Widget on my dashboard and I  just hit 1000 visits in a month! I know that is nothing in compared to a real site, but it is a milestone (in my mind)!

  • My PowerShell cheat sheet

    I am trying to  be a better PowerSheller. I thought I would create a post with queries I have figured out. I hope to keep adding more. We needed to change a whole bunch of distribution groups – append them with “-NewName”. This query created our origianl list, the last 50 distribution groups created, with columns representing the…

  • Support for .vcf files in WordPress

    Our developers created a website that had vCard files for each staff member. The problem was that when people clicked on them, rather than downloading them, some web browsers displayed the content of the file. Ended up that apache did not know how to handle “.vcf” files. The change below is now part of my standard…

  • Comparing master and slave MySQL WordPress DBs

    My VPS host – Rackspace contacted me the other day to tell me that my host server became unresponsive. After it came back online I went to my MySQL replicated slave to check the status. The /var/log/mysqld.log said: Error reading packet from server: Client requested master to start replication from impossible position This article siad…

  • Drop all MySQL DBs (except mysql & information_schema)

    For some reason I can not remember the following command. I have been using it a lot lately when testing MySQL replication. mysql –skip-column-names –batch -e “show databases” | grep -E -v “mysql|information_schema” | xargs -I “@@” mysql -e “drop database @@” This will drop all DBs except the default mysql and information_schema dbs. Then…

  • WordPress 3.2 requirements and CentOS 5.6

    Current requirements PHP version 4.3 or greater MySQL version 4.1.2 or greater WordPress 3.2 requirements: PHP version 5.2.4 or greater MySQL version 5.0 or greater. Default PHP on Cent0S 5.6 = PHP 5.1.6. CRAP Updated: See this post on how to install an updated PHP on CentOS 5.6

  • How to update ESXi 4.1 without vCenter

    I wanted to update a standalone ESXi box from 4.1 to 4.1 Update 1. Here is how I went about it: Downloaded the update on a windwos box from here and unziped it Open the viClient datastore browser and upload the unzipped folder. If you put it off the root of your datastore, the path…

  • Script to compare RPMs on two different CentOS servers

    I wanted to make sure that the same RPMs were installed on several servers. I wasn’t worried about versions of RPMs because everything should be kept up to date via yum. So I sat down and wrote the script below. It has been on my ToDo list for quite a while! This script connects to…

  • AutoSSH on CentOS

    I have been interested in MySQL replication over ssh and I wanted a way to make sure that the tunnel is always up. Everyone says to use AutoSSH. AutoSSH is not in EPEL, but is in rpmforge (Is that that same as DAG? Didn’t they merge?). I installed rpmforge: I don’t like to do the…

  • Mirror all MySQL DBs to the local machine

    Continuing on my quest to get MySQL replicating over ssh, I am using the following bash function to replicate all remote DBs locally:   Line 2 connects to the local AutoSSH tunnel and gets a list of all the remote DBs. Then we loop through the DBs and if there is not a DB locally…