Apache, MySQL, PHP on OS X 10.9 Mavericks with MacPorts

I shared my LAMP/MAMP build script on Github.


Monitoring Drupal with Sensu

I gave a presentation called Monitoring Drupal with Sensu at DrupalCorn 2013.

Annotated slideset is up at the link above.


Installing sensu-admin on RHEL6

Sensu-Admin is a nice GUI for the Sensu monitoring framework. However, installing it on Red Hat Enterprise Linux 6 ends in pain, since RHEL6 comes with an older version of ruby (1.8).

You might be creative and get most of the required gems installed but ultimately there will be gems that simply require ruby 1.9:

Gem::InstallError: nokogiri requires Ruby version >= 1.9.2.
An error occurred while installing nokogiri (1.6.0), and Bundler cannot continue.

Fortunately, Red Hat has created Software Collections which provides a modern distribution of the major languages, including ruby 1.9.3.

I enabled the Red Hat Software Collections 1 Beta channel in Red Hat Network and proceeded to install ruby 1.9.3. Note that the RHEL Server Optional channel is also enabled, as is EPEL.

# yum install ruby193 ruby193-ruby-devel ruby193-rubygem-rake

Then I set paths for ruby 1.9:

# Setup PATH, LD_LIBRARY_PATH and MANPATH for ruby-1.9
ruby19_dir=$(dirname `scl enable ruby193 "which ruby"`)
export PATH=$ruby19_dir:$PATH
ruby19_ld_libs=$(scl enable ruby193 "printenv LD_LIBRARY_PATH")
export LD_LIBRARY_PATH=$ruby19_ld_libs:$LD_LIBRARY_PATH
ruby19_manpath=$(scl enable ruby193 "printenv MANPATH")
export MANPATH=$ruby19_manpath:$MANPATH

Check that the correct ruby is being found:

$ which ruby

Now to install the dependencies needed for the gems needed for sensu-admin:

# yum install make gcc gcc-c++ libxml2-devel libxslt-devel openssl-devel mysql-devel sqlite-devel

Install all the necessary gems:

# cd path/to/sensu-admin
# bundle install

Edit sensu-admin/db/seeds.rb to modify the default username and password. Then use rake to install:

# rake db:migrate
# rake db:seed

Open port 3000 in your firewall:

iptables -I INPUT 4 -p tcp --dport 3000 -m state --state NEW -j ACCEPT

And start the thin webserver which will run on port 3000:

rails s

Point a web browser to http://yourserver:3000 and you'll see the sensu-admin logon screen:

Reference: Puppet template for ruby 1.9.3 environment variables

Solved: Apple Mail, Smart Mailboxes, and Exchange Junk Email

One of the nice features of Mail, the bundled OS X mail client, is Smart Mailboxes. A smart mailbox is a filtered view of your mail based on your own criteria.

I have both IMAP and Exchange accounts and use Mail for both.

The trouble I was having was creating a view of recent mail from all inboxes that did not include mail from the Exchange Junk E-Mail box. When I created a rule for "Message is not in Mailbox" and specified the "Junk E-Mail" box from my Exchange account and saved the smart mailbox attributes, it wouldn't take. In other words, the next time I opened the smart mailbox settings it said "No mailbox selected":

To solve this problem, I went to Mail / Preferences / Junk Mail and changed my selection for "When junk mail arrives" from "Mark as junk mail , but leave it in my Inbox" to "Move it to the Junk mailbox".

Now my smart mailbox works as expected and remembers its rules. And I don't have to use Outlook.

Reference: Smart Mailboxes not working with Exchange Folders?


Subscribe to SysArchitects RSS