Updating Apache on MacOSX Yosemite

Why? I want to set up a local dev environment for localhosting WordPress, among other things, without installing MAMP.

As of this writing, Yosemite 10.10 comes with the following software versions installed:

Apache - 2.4.9; current: 2.4.10
MySQL/MariaDB: not installed; current: 5.6/10
PHP: 5.5.14; current: 5.6.2

Using Homebrew, I will update the above software. Additionally, I will not be installing phpMyAdmin or similar, since I want to get more comfortable with using MySQL on the command line.

Apache

brew tap homebrew/apache

When I enter the following, I got an error:

brew info homebrew/apache/httpd24
==> Dependencies
Error: No available formula for zlib

Homebrew instructs me to do the following, which fixes the dependency issue:

brew tap homebrew/dupes

brew info homebrew/apache/httpd24 now tells me I need the following dependencies installed:

Required: apr-util, pcre, homebrew/dupes/zlib

Fine.

brew install apr-util
What is apr-util? “The Apache Portable Runtime Utility Library provides a predictable and consistent interface to underlying client library interfaces. This application programming interface assures predictable if not identical behaviour regardless of which libraries are available on a given platform.”

brew install pcre
What is prce? “The PCRE package contains Perl Compatible Regular Expression libraries. These are useful for implementing regular expression pattern matching using the same syntax and semantics as Perl 5.”

brew install zlib
What is zlib? “The Zlib package contains compression and decompression routines used by some programs.”

Finally, install Apache:

brew install httpd24

Well, not quite yet. This generated the following error:

make: *** [install-recursive] Error 1

Homebrew recommends running brew update && doctor and trying again before anything else, which I did, and which corrected the error.

Caveats from Homebrew (for future reference):

To have launchd start httpd24 at login:
mkdir -p ~/Library/LaunchAgents
ln -sfv /usr/local/opt/httpd24/*.plist ~/Library/LaunchAgents
Then to load httpd24 now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.httpd24.plist

I will continue my adventures upgrading MySQL and PHP in another blog post, since this one has gotten rather unwieldly.

References

StackOverflow discussion on upgrading Apache in Mavericks.

apr-util definition from Linux from Scratch.

pcre, from LFS, who has the best file explanations out there.

zlib, from LFS.

This entry was posted in local.config and tagged , , . Bookmark the permalink.

One Response to Updating Apache on MacOSX Yosemite

  1. Pingback: Installing MariaDB and Updating PHP on Yosemite - Newbie Coder

Leave a Reply

Your email address will not be published. Required fields are marked *