I recently purchased a Unifi UVC-G3 network camera for the outside of my house. It works great in standalone mode, but has no recording capability without a Unifi NVR. The Ubiquiti hardware one is about $350, but a lot of people just repurpose a small linux box to do the job. That, to me, seemed silly since I have a Mac Mini that serves as my home media server, and runs my weather station (and a few other things). I also have a Raspberry Pi in the garage that runs Cacti (for network monitoring), and the Unifi wireless controller. This all got me thinking, “wait, I could just run the free version of VMWare ESXi (vSphere) and virtualize all of this on the Mac Mini”. The problem was, was that really possible? I know Apple allows virtualization of it’s OS on Apple hardware, and there are hacks to get it to work on non-Apple hardware, but I’d never actually managed a vSphere server before. Sure, I have tons of VMs at work, but the system is managed by another group, and all the VMs are Windows or Linux. So, I had to try.
I’ve been meaning to do this for a while, but a slashdot linked article about the large number of insecure PHP installs in the world got me off my ass to upgrade my stock Mac OS X php install from 5.3.x to 5.6.x. Thankfully, the process was pretty painless with the scripts provided here.
I did have to modify my http conf (since I’m not running a stock Apple install) to point to the new php, as well as set the new install location in my .profile, both of which were pretty easy. The biggest annoyance with the upgrade to PHP 5.6, however, was having to fix anywhere where objects were being set via reference “=&” rather than just =. So most of my PDO DB queries were being set via “$result =& $db->query(‘select blah from blah where blah’)”. This no longer worked with 5.6, as you can only set variables that way. Why I was doing it that way is because I’m a hack, and most of my PHP is copied and pasted from previous PHP I’ve done… so that practice just spread throughout. *shrugs* I also had to adjust some settings relating to APC no longer being supported, and opcache being the new PHP object cache setup. The real big change is, since I use W3TC, I had to DISABLE the Database and Object caches. Since these rely on no-longer supported APC calls, things would work fine for about an hour, then WordPress would just stop responding altogether (guessing when it would try to issue a garbage cleanup call)1. Interestingly, my site sped up significantly after this change. Cool.
Since my server is a Mac, I had already been running MySQL 5.6 for some time (since OS X doesn’t ship with MySQL anymore), but I wanted to take this opportunity to “upgrade” all my tables from MyISAM to InnoDB. This, actually, was a bit more of a pain than I thought it would be.
- Sadly, the author of this plugin has been rather quiet about adding Zend opcache support [↩]
Kicad on the Mac: It doesn’t work (and/or the last “build” available for Mac is terrible in Mavericks). Maybe this post will have more when/if it does. Even Chris Gammell gave a talk on KiCad a few weeks back and for his mac install, he just put Ubuntu in a VM and installed KiCad there. *sigh*