Installing Zend Framework on OS X (Leopard)

Today I needed to use Zend Framework on my iMac’s local web server, so here’s how I installed it. 

I prefer using subversion where possible to download any open source projects, and since Zend have an svn repository available I decided to use that. 

sudo svn co http://framework.zend.com/svn/framework/standard/branches/release-1.7/library/ /usr/lib/php/libraries/zend-framework-1.7/

This will follow the latest updates to version 1.7 – you can simply run svn update anytime a minor version is released.

You can then include this in any of your projects with:

set_include_path(
get_include_path().PATH_SEPARATOR.
'/usr/lib/php/libraries/zend-framework-1.7/');

Although I’ve gone through these steps on my OS X Leopard workstation, they would also work equally well on other Unix / Linux distributions like Ubuntu, Centos, Fedora etc..

Install WordPress and WP plugins with Subversion

In my opinion, the best way to install WordPress (WP) is by using subversion (svn). This can also be used to install WP plug-ins. Subversion makes it incredibly easy to upgrade / update when future versions of the software is released. You simply run either svn update or svn switch.

The following instructions assume you have shell access and subversion installed on your system.

WordPress

Installing WordPress with Subversion

Run the following command to check out the WordPress code to your blog directory:

svn co http://svn.automattic.com/wordpress/branches/2.7/ /path/to/blog/

Follow the 5 minute installation instructions, ignoring steps 1 & 5.

Updating WordPress to the latest minor release with Subversion

Navigate to your wordpress installation directory and run:

svn update

Upgrading WordPress to a new major release with Subversion

Navigate to your word press installation directory and run:

svn sw http://svn.automattic.com/wordpress/branches/2.8/

Replacing the repository url with the version you wish to upgrade to.

Plugins

Installing a plugin with svn:externals

If you install WordPress using subversion, it should already be set up with akismet as an svn:external plugin. If you want to install any other plugin this way, just follow these steps:

cd wp-content/plugins
svn propedit svn:externals .

If this command complains about not having an editor set you may need to run something like

export SVN_EDITOR=vim

before trying again. Otherwise, you should now be in your favourite text editor with the svn:externals file open for editing. Add an additional line for the plugin you wish to install. In this example, I’m going to use the Mollom comment spam protection system. The line should look like:

wp-mollom http://svn.wp-plugins.org/wp-mollom/trunk/

Save and exit the text editor, then run:

svn update

This should check out all the plugin files. You can then configure the plugin in the WordPress admin panel.

Updating a plugin with svn

The beauty of using subversion to install your plugins is that it’s a breeze to update them. From your the top level WordPress directory, just run:

svn update

This will update all of your plugins along with your main WordPress installation. If you want to update the plugins on their own, then just run that command from inside the plugins folder.