Gearman examples under Mac OS X

Today I listened in on the O’Reilly webcast Introduction to Gearman by Eric Day of Rackspace. I thought I would follow through on the machine at hand; a Mac with OS X 10.5, however I again got caught up with the gearman PHP extension integration. A look at and older post Getting started with Gearman based on Ubuntu needed an update for Mac.

First I downloaded and installed the latest gearman. This was version 0.12 and includes libgearman 0.7.
You should always check for any more recent updates.

wget http://launchpad.net/gearmand/trunk/0.12/+download/gearmand-0.12.tar.gz
tar xvfz gearmand-0.12.tar.gz
cd gearmand-0.12
./configure
make
sudo make install
ls -l /usr/local/lib/libg*
#-rwxr-xr-x  1 root  wheel  79808 Mar 12 13:33 /usr/local/lib/libgearman.4.dylib
#lrwxr-xr-x  1 root  wheel     18 Mar 12 13:33 /usr/local/lib/libgearman.dylib -> libgearman.4.dylib
#-rwxr-xr-x  1 root  wheel    960 Mar 12 13:33 /usr/local/lib/libgearman.la

gearmand was installed in /usr/local/sbin and gearman installed in /usr/local/bin

Next we needed the gearman PHP extension from pecl

wget http://pecl.php.net/get/gearman-0.7.0.tgz
tar xvfz gearman-0.7.0.tgz
cd gearman-0.7.0
phpize
./configure
make
sudo make install
# Installing shared extensions:     /usr/lib/php/extensions/no-debug-non-zts-20060613/

Take note of the extension location, as I needed this for the next step.

Php was already installed, which was good.

$ which php
/usr/bin/php

However I found no configuration loaded.

$ php --info | grep -i configuration
Configuration File (php.ini) Path => /etc
Loaded Configuration File => (none)
Configuration

What exists is a default example only. In order to include the gearman extension I needed to do the following.

$ sudo cp /etc/php.ini.default /etc/php.ini
$ sudo vi /etc/php.ini

# Set extension directory
extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20060613/"
# Add Gearman extension
extension="gearman.so"

And a confirmation.

$ php --info | egrep -i "(configuration|gearman)"
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /private/etc/php.ini
Configuration
gearman
gearman support => enabled
libgearman version => 0.12

Ready now to try out the PHP examples.

MiFi Installation woes

As I mentioned in MiFi Introduction I took the plunge and purchased a Verizon MiFi. I got this under a 2 year contract for $149.99 and $59.99 per month for 5GB of traffic.

While happy to have a new tech toy, the installation and use of, well that was a painful experience I’d rather not have to endure. Unfortunately I didn’t document all steps with screen shots so I will need to describe what I have.

While it stated the device worked with a Mac, it was clearly not as simple as the instructions stated.

  1. The first problem is, you can’t use the device until you activate it. You can’t activate it unless you already have Internet Access.
  2. The Tips, hits and shortcuts manual also states “VZAccess Manager Installation”, … connect device …, VZAccess installer auto-launches and the drivers will install automatically. You have to read one page further before you get “Mac customers are not required to use VZAccess Manager to use their device”. First, you do have to install the software to use the device (for the first time), there seems no way around that, and second, it does not auto-launch.
  3. Trying to install I read the instructions, “connect to a USB Port, … auto-launches”. This doesn’t happen. Opening in Finder, hoping for an attached device no luck? Now what.
  4. One page further, under Mac OS/X Users, the section that states “not required to use…” also includes a point stating that activation requires MAC OS X 10.4.0 or higher and WWAN Support Update 1.0. It would be nice if you included this as Pre-Requistes in your documentation so it reads chronologically. The docs state this is a free download.
  5. So I downloaded WWAN Support Update 1.0 from the apple web site, got to run it, and it states “Alert: This computer cannot use this update”. What the. I did between my first two attempts to connect to the device, and now run a Software Update, so guessing it was in this because I know no easy way to confirm installed software on a Mac, I truck on.
  6. The Important MiFI 2220 Connection Information
  7. page, shown below states you can access the MiFi Admin Portal at http://192.168.1.1. See Exhibit 1 below. I try that and I get the admin page, and it states “Not Activated”. Did the store not activate the device, or is my attempt to blunder through these steps not correct

  8. Being frustrated I try Verizon Phone Support, the number 1800 922 0204, conveniently absent from the docs FYI. The automated system asks are you a customer, yes I am, what is your number? Well my number is on AT&T, this is just a broadband device, not a phone, trying that doesn’t work. Then trying to get out of the automated system to get an operator an ordeal. Finally a real person.
  9. Real person asks, what is your number, I explain the same story, then I decide to grab the receipt from the store, and I find in small print, under the device name on the receipt a number? Is that my number? I give that and lone behold, that’s the Cell number for the device. Would be nice if they told you that.
  10. I explain my problem, and I’m put on hold, and hold a second time, and more hold a third time to talk to a more technical person.
  11. During this time, I go back over the steps I undertook and lone behold, there is now a device in my Finder. See Exhibit 2. Did it take like 10 mins to find it or what? Perplexing. So while waiting for a tech person, I move on.
  12. I see VZAccess Manager install package, I take this route, and following system reboot on the Mac, the software auto starts, and I’m prompted with the VZAccess Manager screen, See Exhibit 3.
  13. In fine print down the bottom, Activation required. Nice if that was in big letters on first usage of software. A few menu buttons on the top, and a Connect WWan button bottom right. Again, lack of clear UI here.
  14. Clicking Connect WWAN goes though a number of steps, which unfortunately I didn’t keep, but at the end, I finally get an I’m activated message.
  15. To get the device working however, there was also some pain. I had to disconnect my Internet connect, disable Wireless, and talk to the device directly via USB. I could then confirm I could access the Internet. I then had to remove the USB, enable Wireless and connect to get it to communicate via wireless. The activation process needed the USB connection.
  16. I’m finally online, now the need to plug this into my network. The device has an Admin portal at http://192.168.1.1. The first pain, I can’t access this because my Internal network, and multiple devices runs from my router at the same address. Seeing no way around this, I have to reconfigure my internal network, which was a pain. No I can access the Admin Portal. My goal is to change SSID, change password that’s printed on multiple pieces of paper, and also change the address.
  17. On the admin portal, an input box, and button for Login. See Exhibit 4. Nothing in the documentation on this login box, the Verizon tech didn’t know any information about this, so while they were researching I started randomly choosing logins. It was weird that the input was a password protected input (e.g. *****) and there was no username/password. I try the WiFi Password, seems to get truncated. I try admin and lone behold I’m logged in. That’s about as insecure as having nothing.
  18. After all this, I’m finally able to configure the device. See Exhibit 5. I trust it will work when I’m next on the road. Documentation get’s a fail, it’s unclear and incomplete. There needs to be clear and seperate sections for Windows and Mac OS/X, and it needs to detail the installation process correctly and clearly, and probably with some screen prints. I’m not a novice user, and I had difficulty with this process.

Exhibit 1 – Important Information Page

Exhibit 2 – VZAccess Manager Finder

Exhibit 3 – VZAccess Manager

Exhibit 4 – MiFi Administration Portal Login

Exhibit 5 – MiFi Administration Change Password