<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>elytra.netelytra.net | elytra.net</title>
	<atom:link href="http://elytra.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://elytra.net</link>
	<description>design and development for the web</description>
	<lastBuildDate>Mon, 20 Feb 2012 00:22:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>GIS with GDAL and python</title>
		<link>http://elytra.net/2011/04/16/gis-with-gdal-and-python/</link>
		<comments>http://elytra.net/2011/04/16/gis-with-gdal-and-python/#comments</comments>
		<pubDate>Sat, 16 Apr 2011 16:32:31 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[gis]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.elytra.net/?p=192</guid>
		<description><![CDATA[This project uses the the opensource Geospatial Data Abstraction Library (GDAL) to automate the production of spider-like feature layers extracted from a larger dataset. The GDAL libraries provide a single abstract data model for a large variety of data formats. It also comes with a variety of useful commandline utilities for data translation and processing. I used the python bindings to develop this commandline tool. While this script is tied to this particular dataset and task, it should be easily modifiable to automate other similar tasks that would otherwise require significant repetitive input from a GIS analyst. These powerful tools are worth checking out.]]></description>
			<content:encoded><![CDATA[<p><a href="https://github.com/a-pasquale/gdal-spider-generator">This project</a> uses the the opensource <a href="http://www.gdal.org/">Geospatial Data Abstraction Library</a> (GDAL) to automate the production of spider-like feature layers extracted from a larger dataset.  The GDAL libraries provide a single abstract data model for a large variety of data formats. It also comes with a variety of useful commandline utilities for data translation and processing.  </p>
<p>I used the <a href="http://pypi.python.org/pypi/GDAL/">python bindings</a> to develop this commandline tool.  While this script is tied to this particular dataset and task, it should be easily modifiable to automate other similar tasks that would otherwise require significant repetitive input from a GIS analyst.  These powerful tools are worth checking out.</p>
]]></content:encoded>
			<wfw:commentRss>http://elytra.net/2011/04/16/gis-with-gdal-and-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using WordPress in multiple environments</title>
		<link>http://elytra.net/2011/04/10/using-wordpress-in-multiple-environments/</link>
		<comments>http://elytra.net/2011/04/10/using-wordpress-in-multiple-environments/#comments</comments>
		<pubDate>Sun, 10 Apr 2011 13:28:46 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.elytra.net/?p=178</guid>
		<description><![CDATA[When developing software, it&#8217;s important to have different environments so that modifications made by developers don&#8217;t affect others outside their own &#8220;sandbox&#8221; or the &#8220;production&#8221; server. Best practices generally dictate three tiers: a local development environment for each developer, a staging environment to integrate changes from multiple developers, and a production environment. WordPress is one of the best blogging platforms available, but it isn&#8217;t really designed to be used in multiple environments. It isn&#8217;t too difficult to setup multiple environments, though. Configuration variables can be read in from environment variables that tell WordPress which environment it is in. With Apache, add the environment variables to your .htaccess file: SetEnv WP_DB your_database_name SetEnv WP_USERNAME your_username SetEnv WP_PASSWORD your_password Then you can grab these settings in the WordPress configuration file, wp-config.php: // The name of the database for WordPress define('DB_NAME', $_ENV['WP_DB']); // MySQL database username define('DB_USER', $_ENV['WP_USERNAME']); // MySQL database password define('DB_PASSWORD', $_ENV['WP_PASSWORD']); // For developers: WordPress debugging define('WP_DEBUG', $_ENV['WP_DEBUG']); // Override the wp_options and set the site define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME']); define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME']); You can also set these environment variables using nginx: include fastcgi_params; fastcgi_param WP_DB your_database; fastcgi_param WP_USERNAME your_username; fastcgi_param WP_PASSWORD your_password; You probably also need to tell [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.elytra.net/wordpress/wp-content/uploads/2011/04/tiers.png" rel="lightbox[178]"><img class="alignleft size-medium wp-image-185" title="tiers" src="http://www.elytra.net/wordpress/wp-content/uploads/2011/04/tiers-300x75.png" alt="" width="300" height="75" /></a>When developing software, it&#8217;s important to have different environments so that modifications made by developers don&#8217;t affect others outside their own &#8220;sandbox&#8221; or the &#8220;production&#8221; server.  Best practices generally dictate three tiers: a local development environment for each developer, a staging environment to integrate changes from multiple developers, and a production environment.</p>
<p>WordPress is one of the best blogging platforms available, but it isn&#8217;t really designed to be used in multiple environments.  It isn&#8217;t too difficult to setup multiple environments, though.  Configuration variables can be read in from environment variables that tell WordPress which environment it is in.</p>
<p>With Apache, add the environment variables to your .htaccess file:</p>
<p><code> SetEnv WP_DB your_database_name<br />
SetEnv WP_USERNAME your_username<br />
SetEnv WP_PASSWORD your_password</code></p>
<p>Then you can grab these settings in the WordPress configuration file, wp-config.php:<br />
<code><br />
// The name of the database for WordPress<br />
define('DB_NAME', $_ENV['WP_DB']);<br />
// MySQL database username<br />
define('DB_USER', $_ENV['WP_USERNAME']);<br />
// MySQL database password<br />
define('DB_PASSWORD', $_ENV['WP_PASSWORD']);<br />
// For developers: WordPress debugging<br />
define('WP_DEBUG', $_ENV['WP_DEBUG']);<br />
// Override the wp_options and set the site<br />
define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME']);<br />
define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME']);</code></p>
<p>You can also set these environment variables using nginx:<br />
<code><br />
include fastcgi_params;<br />
fastcgi_param WP_DB your_database;<br />
fastcgi_param WP_USERNAME your_username;<br />
fastcgi_param WP_PASSWORD your_password;</code></p>
<p>You probably also need to tell php to load your environment variables in php.ini:<br />
<code>variables_order = "EGPCS"</code></p>
<p>Now you can have multiple environments set up to use with your version control without any additional direct configuration of WordPress.</p>
]]></content:encoded>
			<wfw:commentRss>http://elytra.net/2011/04/10/using-wordpress-in-multiple-environments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plone for Social Networking</title>
		<link>http://elytra.net/2011/04/04/plone-for-social-networking/</link>
		<comments>http://elytra.net/2011/04/04/plone-for-social-networking/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 02:03:44 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plone]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[social networking]]></category>

		<guid isPermaLink="false">http://www.elytra.net/wordpress/?p=147</guid>
		<description><![CDATA[I&#8217;ve been collaborating with Chronicle Technologies, a technology consulting firm, on a number of Plone projects recently.  Much of my work has focused on developing a social networking product written in python that provides the community with ability to share content, comment on each other&#8217;s posts, and maintain a profile. In this site for the Fisk-Vanderbilt Bridge Program, you can see some of the highlights.  The directory allows you to browse through a list of community members.  When your mouse hovers over a member&#8217;s picture, a tooltip box appears with more information about the member.  The member profiles also take advantage of some cool jQuery tools, including overlays and tabs to present information in an easily accessible, aesthetically-pleasing way. I also integrated an actionbar into the site to provide easy access to commonly used functions such as adding a new blog post and viewing and editing your profile. Other interesting features of the site include a social networking addon to facilitate sharing content with other social networking sites and a lightbox photo gallery.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been collaborating with <a title="Chronicle Technologies" href="http://www.chronicletech.com/">Chronicle Technologies</a>, a technology consulting firm, on a number of Plone projects recently.  Much of my work has focused on developing a social networking product written in python that provides the community with ability to share content, comment on each other&#8217;s posts, and maintain a profile.</p>
<p>In <a title="Fisk-Vanderbilt Bridge Program" href="http://www.fvbridge.org">this site</a> for the Fisk-Vanderbilt Bridge Program, you can see some of the highlights.  The directory allows you to browse through a list of community members.  When your mouse hovers over a member&#8217;s picture, a tooltip box appears with more information about the member.  The member profiles also take advantage of some cool <a title="jQuery Tools" href="http://flowplayer.org/tools/index.html">jQuery tools</a>, including overlays and tabs to present information in an easily accessible, aesthetically-pleasing way.</p>
<p>I also integrated <a title="Actionbar" href="http://pypi.python.org/pypi/actionbar.panel">an actionbar</a> into the site to provide easy access to commonly used functions such as adding a new blog post and viewing and editing your profile.</p>
<p>Other interesting features of the site include a <a title="Pretty Sociable" href="http://www.no-margin-for-errors.com/projects/prettysociable-mashable-like-sharing/">social networking addon to facilitate sharing</a> content with other social networking sites and a lightbox photo gallery.</p>
]]></content:encoded>
			<wfw:commentRss>http://elytra.net/2011/04/04/plone-for-social-networking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multiplication</title>
		<link>http://elytra.net/2011/04/02/multiplication/</link>
		<comments>http://elytra.net/2011/04/02/multiplication/#comments</comments>
		<pubDate>Sat, 02 Apr 2011 14:12:45 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[haml]]></category>
		<category><![CDATA[heroku]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sinatra]]></category>

		<guid isPermaLink="false">http://www.elytra.net/wordpress/?p=67</guid>
		<description><![CDATA[I built this simple web application to generate multiplication worksheets and puzzles for my kids who have been busy memorizing their multiplication tables.  I looked for something similar, but couldn&#8217;t find anything that quite fit what I was looking for.  There is a form that allows you select with numbers to use when producing the tables and two different worksheet options. Anyway, I threw this together using ruby, the Sinatra web framework, and the haml templating language.  This is a pretty powerful toolset and I was very pleased at the ease with which everything came together.   It&#8217;s deployed on heroku using git. You can browse the source code on github if you are curious.]]></description>
			<content:encoded><![CDATA[<p><a href="http://multiply.heroku.com"><img class="alignright size-medium wp-image-80" title="Multiplication" src="http://www.elytra.net/wordpress/wp-content/uploads/2011/04/Screen-shot-2011-04-02-at-9.57.44-AM-300x179.png" alt="Multipication puzzle" width="300" height="179" /></a>I built <a href="http://multiply.heroku.com">this simple web application</a> to generate multiplication worksheets and puzzles for my kids who have been busy memorizing their multiplication tables.  I looked for something similar, but couldn&#8217;t find anything that quite fit what I was looking for.  There is a form that allows you select with numbers to use when producing the tables and two different worksheet options.</p>
<p>Anyway, I threw this together using <a title="Ruby" href="http://www.ruby-lang.org/en/">ruby</a>, the <a href="http://www.sinatrarb.com/">Sinatra</a> web framework, and the <a href="http://haml-lang.com/">haml</a> templating language.  This is a pretty powerful toolset and I was very pleased at the ease with which everything came together.   It&#8217;s deployed on <a href="http://heroku.com/">heroku</a> using <a href="http://git-scm.com/">git</a>.  You can browse the <a href="https://github.com/a-pasquale/Multiplication-Worksheets">source code on github</a> if you are curious.</p>
]]></content:encoded>
			<wfw:commentRss>http://elytra.net/2011/04/02/multiplication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blackjack</title>
		<link>http://elytra.net/2011/04/02/blackjack/</link>
		<comments>http://elytra.net/2011/04/02/blackjack/#comments</comments>
		<pubDate>Sat, 02 Apr 2011 13:39:47 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[haml]]></category>
		<category><![CDATA[heroku]]></category>
		<category><![CDATA[redis]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sinatra]]></category>

		<guid isPermaLink="false">http://www.elytra.net/wordpress/?p=71</guid>
		<description><![CDATA[I created this blackjack game as part of a tutorial to teach a student some basics of ruby programming and web development. UPDATE: Here&#8217;s a link to Sam&#8217;s version of the game. It&#8217;s a little more polished then my initial implementation. I think he&#8217;s still planning to add more features. Anyway, nice work! It has an object-oriented model that can be reused in other card games. Inheritance is used to add blackjack-specific logic to the basic deck and hand objects and implement the scoring method. The Sinatra web framework was used to provide the underlying scaffolding to create the web application. I&#8217;ve used Sinatra for a few projects recently and been really pleased with it. It is lightweight and makes it possible to create web applications quickly and easily without making a lot of assumptions about how you are going to use it. Sinatra supports the haml templating language, which is such a pleasure to use compared to most of the other templating languages I&#8217;ve used. It has a great asthetic and is clear and easy to understand, resulting in some beautiful code. It even lets you use regular Ruby code in a simple way. I chose redis to persist [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://glowing-planet-402.heroku.com/blackjack"><img class="alignleft size-medium wp-image-72 rounded shadow" title="Blackjack" src="http://www.elytra.net/wordpress/wp-content/uploads/2011/04/Screen-shot-2011-04-02-at-9.12.11-AM-216x300.png" alt="" width="216" height="300" /></a> I created <a href="http://glowing-planet-402.heroku.com/blackjack">this blackjack game</a> as part of a tutorial to teach a student some basics of <a title="Ruby" href="http://www.ruby-lang.org/en/">ruby</a> programming and web development.</p>
<p>UPDATE: Here&#8217;s a <a href="http://doubledown.heroku.com/" title="Double Down">link to Sam&#8217;s version</a> of the game.  It&#8217;s a little more polished then my initial implementation.  I think he&#8217;s still planning to add more features.  Anyway, nice work!</p>
<p>It has an object-oriented model that can be reused in other card games.  Inheritance is used to add blackjack-specific logic to the basic deck and hand objects and implement the scoring method.</p>
<p>The <a href="http://www.sinatrarb.com/">Sinatra</a> web framework was used to provide the underlying scaffolding to create the web application.  I&#8217;ve used Sinatra for a few projects recently and been really pleased with it.  It is lightweight and makes it possible to create web applications quickly and easily without making a lot of assumptions about how you are going to use it.</p>
<p>Sinatra supports the <a href="http://haml-lang.com/">haml</a> templating language, which is such a pleasure to use compared to most of the other templating languages I&#8217;ve used.  It has a great asthetic and is clear and easy to understand, resulting in some beautiful code.  It even lets you use regular Ruby code in a simple way.</p>
<p>I chose <a href="http://redis.io/">redis</a> to persist the game data.  Mostly, this decision was because I wanted to try out a new noSQL database, but redis seems a decent fit because it allows data to be stored as a list associated with a key.  This is similar to the internal structure implemented in Ruby and operations like pop and push to move the cards from the deck to the player&#8217;s hand just work the way they should.</p>
<p>The <a href="https://github.com/a-pasquale/Card-Games">source code</a> for this game is managed using <a href="http://git-scm.com/">git</a> and deployed with <a href="http://heroku.com/">heroku</a> and <a href="http://redistogo.com/">redis to go.</a> I&#8217;ve been impressed with the heroku deployment platform.  It fits right into the workflow, is free for small projects like this, and seems easily scalable once more capacity is needed.</p>
<p><a href="http://haml-lang.com/"><img class="alignright size-full wp-image-94" title="haml" src="http://www.elytra.net/wordpress/wp-content/uploads/2011/04/haml.gif" alt="haml" width="124" height="129" /></a><a href="http://www.ruby-lang.org/en/"><img class="alignright size-full wp-image-74" title="Ruby" src="http://www.elytra.net/wordpress/wp-content/uploads/2011/04/ruby_logo.jpg" alt="Ruby" width="211" height="100" /></a><br />
<a href="http://www.sinatrarb.com/"><img class="alignright size-full wp-image-73" title="Sinatra" src="http://www.elytra.net/wordpress/wp-content/uploads/2011/04/sinatra_logo.gif" alt="" width="156" height="108" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://elytra.net/2011/04/02/blackjack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Community Plone Site</title>
		<link>http://elytra.net/2011/04/01/seminar/</link>
		<comments>http://elytra.net/2011/04/01/seminar/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 18:50:24 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[deliverance]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plone]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.elytra.net/wordpress/?p=44</guid>
		<description><![CDATA[I worked on this Plone site for a seminar entitled &#8220;Diversity and Innovation&#8221; at the Center for Institutional and Social Change at Columbia Law School. This site showcases many of the capabilities on Plone as a intranet portal and community networking platform.  Unfortunately, access to the bulk of the site is restricted to students, so I&#8217;ll just have to describe some of the things going on behind the scenes. The design and layout of the site is done in vanilla HTML/CSS and integrated with Plone using deliverance, a python-based tool designed to facilitate theming and integration of web applications.  Theming Plone has historically been somewhat challenging, but deliverance is a game-changing tool that revolutionizes theme development.  It also provides to capability to integrate different platforms in a seamless way. The site features a rotating carousel highlighting important content.  Superfish,  a jQuery-based dropdown menu system, makes it easy to navigate the content in the site.  A helpdesk system, Zendesk, is integrated into the theme, allowing the students easy access to support staff.   A number of other useful plugins are installed to facilitate the generation of forms and surveys as well as a discussion board. The aspect that I spent the most [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://seminar.groundshift.org"><img class="alignleft size-medium wp-image-53" title="seminar.groundshift" src="http://www.elytra.net/wordpress/wp-content/uploads/2011/04/seminar.groundshift-300x135.jpg" alt="" width="300" height="135" /></a>I worked on <a title="seminar.groundshift.org" href="http://seminar.groundshift.org">this Plone site</a> for a seminar entitled &#8220;Diversity and Innovation&#8221; at the <a href="http://www.changecenter.org/">Center for Institutional and Social Change</a> at Columbia Law School.</p>
<p>This site showcases many of the capabilities on Plone as a intranet portal and community networking platform.  Unfortunately, access to the bulk of the site is restricted to students, so I&#8217;ll just have to describe some of the things going on behind the scenes.</p>
<p>The design and layout of the site is done in vanilla HTML/CSS and integrated with Plone using <a title="Deliverance" href="http://packages.python.org/Deliverance/index.html">deliverance</a>, a python-based tool designed to facilitate theming and integration of web applications.  Theming Plone has historically been somewhat challenging, but deliverance is a game-changing tool that revolutionizes theme development.  It also provides to capability to integrate different platforms in a seamless way.</p>
<p>The site features a <a href="http://plone.org/products/carousel">rotating carousel</a> highlighting important content.  <a title="Superfish" href="http://users.tpg.com.au/j_birch/plugins/superfish/">Superfish</a>,  a jQuery-based dropdown menu system, makes it easy to navigate the content in the site.  A helpdesk system, <a title="Zendesk" href="http://www.zendesk.com/">Zendesk</a>, is integrated into the theme, allowing the students easy access to support staff.   A number of other useful plugins are installed to facilitate the generation of forms and surveys as well as a discussion board.</p>
<p>The aspect that I spent the most time on, and has become a core product in <a title="Plone for Social Networking" href="http://www.elytra.net/wordpress/index.php/2011/04/04/plone-for-social-networking/">several other sites</a> as well, is a community social networking area.  Each student has a profile and can post content to their own blog/wall.  The students can tag their content in various ways that allows it to be aggregated in other areas of the site using Plone&#8217;s most powerful content type system.</p>
]]></content:encoded>
			<wfw:commentRss>http://elytra.net/2011/04/01/seminar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress on OS X with Nginx, PHP, and mysql</title>
		<link>http://elytra.net/2011/03/31/hello-world/</link>
		<comments>http://elytra.net/2011/03/31/hello-world/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 01:58:20 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[homebrew]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.elytra.net/wordpress/?p=1</guid>
		<description><![CDATA[Recently, I wanted to do some WordPress development on my Mac.  I&#8217;ve got Ubuntu installed on a virtual machine, but I decided to get the stack running on OS X. I&#8217;ve been using Nginx for a while now as a web server, caching proxy, and load balancer for some Plone sites.   It&#8217;s been fantastic &#8211; fast, reliable, easy to configure &#8211; greatly simplifying my life as a sysadmin.  I was interested to see how it would work for serving wordpress. If you haven&#8217;t checked out homebrew, you should.   No, it&#8217;s not beer, but a package manager for OS X.  Homebrew is, they claim and I agree, the easiest and most flexible way to install the UNIX tools Apple didn&#8217;t include with OS X. First, install and start the mysql server: Installing PHP is a little more complicated, since there isn&#8217;t an official homebrew formula. Instead, grab this formula: Then, build PHP with mysql and fastcgi support: Tell PHP to listen on port 9000: Installing nginx is as simple as: You&#8217;ll need to modify the nginx.conf, which can be found in /usr/local/etc/nginx, and add this configuration: Start the Nginx server like this: There are more robust ways to start these services, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.elytra.net/wordpress/wp-content/uploads/2011/03/grey-l.png" rel="lightbox[1]"><img class="alignleft size-full wp-image-12" title="Wordpress" src="http://www.elytra.net/wordpress/wp-content/uploads/2011/03/grey-l.png" alt="Wordpress" width="150" height="150" /></a>Recently, I wanted to do some WordPress development on my Mac.  I&#8217;ve got Ubuntu installed on a virtual machine, but I decided to get the stack running on OS X.</p>
<p>I&#8217;ve been using <a title="Nginx" href="http://wiki.nginx.org/">Nginx</a> for a while now as a web server, caching proxy, and load balancer for some <a title="Plone" href="http://www.plone.org">Plone</a> sites.   It&#8217;s been fantastic &#8211; fast, reliable, easy to configure &#8211; greatly simplifying my life as a sysadmin.  <a href="http://wiki.nginx.org/"><img class="size-medium wp-image-13 alignright" title="nginx logo" src="http://www.elytra.net/wordpress/wp-content/uploads/2011/03/nginx-logo-300x77.png" alt="nginx" width="300" height="77" /></a> I was interested to see how it would work for serving wordpress.</p>
<p>If you haven&#8217;t checked out <a title="homebrew" href="http://mxcl.github.com/homebrew/">homebrew</a>, you should.   No, it&#8217;s not beer, but a package manager for OS X.  Homebrew is, they claim and I agree, the easiest and most flexible way to install the UNIX tools Apple didn&#8217;t include with OS X.<br />
<a href="http://www.elytra.net/wordpress/wp-content/uploads/2011/03/powered-by-mysql-125x64.png" rel="lightbox[1]"><img class="alignright" title="mysql logo" src="http://www.elytra.net/wordpress/wp-content/uploads/2011/03/powered-by-mysql-125x64.png" alt="mysql" width="125" height="64" /></a><br />
First, install and start the mysql server:</p>
<pre class="brush: bash; title: ; notranslate">
brew install mysql
/usr/local/bin/mysqld_safe --datadir=/usr/local/Cellar/mysql/5.5.10/data
</pre>
<p>Installing PHP is a little more complicated, since there isn&#8217;t an official homebrew formula.  Instead, grab this formula:</p>
<pre class="brush: bash; title: ; notranslate">
wget https://github.com/ampt/homebrew/raw/php/Library/Formula/php.rb
mv php.rb `brew --prefix`/Library/Formula
</pre>
<p>Then, build PHP with mysql and fastcgi support:</p>
<pre class="brush: bash; title: ; notranslate">brew install php --with-mysql --with-fpm</pre>
<p>Tell PHP to listen on port 9000:</p>
<pre class="brush: bash; title: ; notranslate">/usr/local/Cellar/php/5.3.6/bin/php-cgi -b 9000</pre>
<p>Installing nginx is as simple as:</p>
<pre class="brush: bash; title: ; notranslate">
brew install nginx
</pre>
<p>You&#8217;ll need to modify the nginx.conf, which can be found in /usr/local/etc/nginx, and add this configuration:</p>
<pre class="brush: bash; title: ; notranslate">
server {
    listen       8080;
    server_name  localhost;

    location / {
        root   /path/to/wordpress;
        index  index.php index.html index.htm;
    }

    location ~ .php {
    include fastcgi_params;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME /path/to/wordpress/$fastcgi_script_name;
}
</pre>
<p>Start the Nginx server like this:</p>
<pre class="brush: bash; title: ; notranslate">
/usr/local/sbin/nginx -c /usr/local/etc/nginx/nginx.conf
</pre>
<p>There are more robust ways to start these services, but since this is just a development environment, I prefer not to have them running unless I am actively working with them.  Now you should be ready to <a title="Install WordPress" href="http://codex.wordpress.org/Installing_WordPress">install WordPress</a>.  Happy developing!</p>
]]></content:encoded>
			<wfw:commentRss>http://elytra.net/2011/03/31/hello-world/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

