<?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>Noemi Millman &#124; Triopter &#187; darwinports</title>
	<atom:link href="http://triopter.com/archive/category/darwinports/feed/" rel="self" type="application/rss+xml" />
	<link>http://triopter.com</link>
	<description>Hello.  My name is Noemi Millman, and Triopter is my web development agency.  We handcraft beautiful, dynamic websites.</description>
	<lastBuildDate>Fri, 06 Aug 2010 16:32:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Updating DarwinPorts / MacPorts</title>
		<link>http://triopter.com/archive/updating-darwinports-macports/</link>
		<comments>http://triopter.com/archive/updating-darwinports-macports/#comments</comments>
		<pubDate>Sun, 15 Apr 2007 19:36:58 +0000</pubDate>
		<dc:creator>Noemi Millman</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[darwinports]]></category>

		<guid isPermaLink="false">http://triopter.com/archive/updating-darwinports-macports/</guid>
		<description><![CDATA[OK, updating your DarwinPorts is pretty simple, but there are a couple of gotchas I thought I&#8217;d mention, since I came across them today.

Start with a selfupdate: $ sudo port selfupdate to get the latest version of DarwinPorts itself and the latest installable software list.
Do not, and I repeat do not, run $ sudo port [...]]]></description>
			<content:encoded><![CDATA[<p>OK, updating your DarwinPorts is pretty simple, but there are a couple of gotchas I thought I&#8217;d mention, since I came across them today.</p>
<ol>
<li>Start with a selfupdate: <code>$ sudo port selfupdate</code> to get the latest version of DarwinPorts itself and the latest installable software list.</li>
<li>Do not, and I repeat <strong>do not</strong>, run <code>$ sudo port upgrade all</code>.  It will try to install every port that exists.  Which could take months.</li>
<li><strong>Do</strong>run <code>$ sudo port upgrade outdated</code>, which will find all your installed ports that have new versions, and upgrade them.</li>
<li>Most of the upgrades insgtall pretty quickly, but <code>gcc</code> takes forever to compile.  Hours upon hours (4 hours for me on a dual G5 with lots of RAM) .  Use Activity Monitor to check CPU usage see whether it&#8217;s still actually working or has hung &#8212; a couple of the other ports hung for me &#8212; I had to cancel the process and start over (thankfully, if you run <code>upgrade oudated</code> it will skip the ones that already installed successfully).</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://triopter.com/archive/updating-darwinports-macports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Six Steps to a Subversion Server on OS X with Darwinports</title>
		<link>http://triopter.com/archive/six-steps-to-a-subversion-server-on-os-x-with-darwinports/</link>
		<comments>http://triopter.com/archive/six-steps-to-a-subversion-server-on-os-x-with-darwinports/#comments</comments>
		<pubDate>Fri, 29 Dec 2006 06:32:32 +0000</pubDate>
		<dc:creator>Noemi Millman</dc:creator>
				<category><![CDATA[darwinports]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://triopter.com/archive/six-steps-to-a-subversion-server-on-os-x-with-darwinports/</guid>
		<description><![CDATA[I&#8217;ve tried on at least three separate occasions to set up a CVS repository on my computer, but each time I&#8217;ve completely given up, mostly because getting the darn thing configured properly just seems to be beyond my abilities.
But besides that, CVS is really obsolete at this point, and Subversion has really taken over its [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve tried on at least three separate occasions to set up a CVS repository on my computer, but each time I&#8217;ve completely given up, mostly because getting the darn thing configured properly just seems to be beyond my abilities.</p>
<p>But besides that, CVS is really obsolete at this point, and Subversion has really taken over its status as the de facto standard for free, open-source revision control software.</p>
<p>Installation was yet another project that turned out to be super-easy with a little help from Darwinports.</p>
<p>Here&#8217;s the full set of steps to install:</p>
<ol>
<li>
<p><a href="http://triopter.com/archive/adventures-in-darwinports-installing-apache2-php5-mysql-41-postgresql-and-django/">Grab Apache 2 off Darwinports</a> and get it running separately from the default OS X Apache 1.3 installation (PHP, MySQL, et al entirely optional).  Darwinports&#8217; Apache automatically includes <code>mod_dav</code>, which you&#8217;ll need.</p>
</li>
<li>
<p>Install Subversion and Apache&#8217;s dav_svn_module:</p>
<p><code>sudo port install subversion +mod_dav_svn</code></p>
<p>Darwinports&#8217; Subversion conveniently includes both server and client.  Spiffy.</p>
</li>
<li>
<p>Decide where your repository is going to live.  I set up a directory under my user directory, with the full path <code>/Users/myusername/svn</code></p>
</li>
<li>
<p>Configure Apache to work with Subversion.  First, add the following to the bottom of the list of <code>LoadModule</code> directives in <code>httpd.conf:</code></p>
<p><code>LoadModule dav_svn_module     modules/mod_dav_svn.so</code></p>
<p>Then add the following to the end of <code>httpd.conf:</code></p>
<p><code>&lt;Location /svn &gt;# I think you can change "/svn" to whatever you want the path to be on your server.<br />
DAV svn<br />
SVNPath /Users/myusername/svn/ # Change this to the path you chose in Step 3, of course<br />
&lt;/Location&gt;</code></p>
<p>If you want to keep your repository private &#8212; i.e. only accessible from the machine it&#8217;s hosted on, you can add a few lines, like so:</p>
<p><code>&lt;Location /svn &gt;# I think you can change "/svn" to whatever you want the path to be on your server.<br />
DAV svn<br />
SVNPath /Users/myusername/svn/ # Change this to the path you chose in Step 3, of course</p>
<p>Order Deny,Allow<br />
Deny from all<br />
Allow from 127.0.0.1<br />
&lt;/Location&gt;</code></p>
</li>
<li>
<p>Create your repository:</p>
<p><code>svnadmin create --fs-type fsfs /Users/myusername/svn</code></p>
</li>
<li>
<p>Restart Apache</p>
</li>
</ol>
<p>Whee, that was easy.</p>
<p>Browse to <code>http://localhost:81/svn</code> (substitute the appropriate port, of course, if you configured Apache differently) &#8212; and if you get something that looks like a really simple webpage, you&#8217;re set.</p>
<p>I&#8217;m kind of in love with Darwinports right now, in case you haven&#8217;t noticed.  Next challenge: actually configuring a Subversion repository.  I&#8217;m seriously crossing my fingers that this is easier than CVS.</p>
]]></content:encoded>
			<wfw:commentRss>http://triopter.com/archive/six-steps-to-a-subversion-server-on-os-x-with-darwinports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adventures in DarwinPorts (Installing Apache2, PHP5, MySQL 4.1, PostgreSQL, and Django)</title>
		<link>http://triopter.com/archive/adventures-in-darwinports-installing-apache2-php5-mysql-41-postgresql-and-django/</link>
		<comments>http://triopter.com/archive/adventures-in-darwinports-installing-apache2-php5-mysql-41-postgresql-and-django/#comments</comments>
		<pubDate>Tue, 24 Oct 2006 02:38:58 +0000</pubDate>
		<dc:creator>Noemi Millman</dc:creator>
				<category><![CDATA[darwinports]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://triopter.com/archive/adventures-in-darwinports-installing-apache2-php5-mysql-41-postgresql-and-django/</guid>
		<description><![CDATA[Yeah, that&#8217;s quite a mouthful.
I decided a couple weeks ago that I wanted to learn Django as well as Ruby on Rails.  Django is a little bit less trendy, but seems to have more flexibility, and gives you an entire admin section of your app &#8220;for free&#8221;, as opposed to RoR, for which there [...]]]></description>
			<content:encoded><![CDATA[<p>Yeah, that&#8217;s quite a mouthful.</p>
<p>I decided a couple weeks ago that I wanted to learn <a href="http://www.djangoproject.com/">Django</a> as well as <a href="http://www.rubyonrails.org/">Ruby on Rails</a>.  Django is a little bit less trendy, but seems to have more flexibility, and gives you an entire admin section of your app &#8220;for free&#8221;, as opposed to RoR, for which there are a zillion different ways to hack on user management, and no sense of &#8220;best practices&#8221; for a novice.</p>
<p>Django requires an up-to-date installation of <a href="http://www.python.org/">Python</a>, and a number of other dependencies, including a database API for Python.  The best <a href="http://www.rhonabwy.com/wp/2006/07/20/installing-django-on-macos-x-development-version/">installation instructions</a> I could find for OS X (one of the reasons I use a Mac is the availability of all these great UNIX tools that are so useful for a webmaster) recommended using <a href="http://darwinports.opendarwin.org/">DarwinPorts</a> (soon becoming <a href="http://www.macports.org/">MacPorts</a>) to simplify installation.</p>
<p>DarwinPorts is awesome.</p>
<h2>Getting the Latest Apache / PHP / MySQL</h2>
<p>I peeked through the list of available packages, and decided that as long as I was at it, I might as well add an Apache 2 / PHP 5 / MySQL 4.1 server to run on port 81 alongside the default Apache 1.3 / PHP 4 / MySQL 4.0 that I already had on port 80.</p>
<p>An earlier attempt to do this had run out of steam as I realized I would have to choose, locate, configure, and compile all my Apache modules by hand, which is really beyond my ability and ambition.  But DarwinPorts would allow me to install Apache with a whole bunch of common modules included, and would download and install all the dependencies for each one automatically.</p>
<p>Well, even on my top-of-the-line-a-year-ago machine, this stuff takes a while to compile, but about an hour later (after cursing at myself for misunderstanding the sudo -u mysql command as running MySQL and trying to fix an error by prepending a path to the username) I had a working secondary server.  DarwinPorts not only installs dependencies for each piece, and not only configures everything for you, and not only reminds you of changes to make to your $PATH variable in case the installer couldn&#8217;t, but sometimes it even tells you what commands to run after installing each program to properly do things like initalize databases.  Sweet.</p>
<p>Here&#8217;s how you do this:</p>
<ol>
<li>port install mysql4 +server</li>
<li>port install apache2 +server</li>
<li>port install php5 +mysql4 +apache2</li>
<li>copy httpd.conf.sample to httpd.conf</li>
<li>[optional] change path in DocumentRoot and associated directives</li>
<li>[optional] change Listen 80 to Listen 81 (If you want to run side-by-side with an Apache 1.3 installation on port 80)</li>
<li>add the following to the  directive:<br />
AddType application/x-httpd-php .php<br />
AddType application/x-httpd-php-source .phps</li>
</ol>
<p>Don&#8217;t forget to follow the extra directions DarwinPorts gives you.</p>
<h2>Python, PostgreSQL, and Psycopg Spell Problems</h2>
<p>I easily updated my Python installation, and then I ran into trouble.  You see, the instructions I had for DarwinPorts were for installing with SQLite.  I wanted to use PostgreSQL, partly because I figured it would be a useful thing to learn, and partly because skimming the <a href="http://www.djangoproject.com/documentation/tutorial1/">initial tutorial</a> and <a href="http://www.djangoproject.com/documentation/tutorial1/#c2268">its comments</a> had showed me that PostgreSQL was perhaps the optimal database choice because of its handling of foreign key constraints.</p>
<p>The main installation <a href="http://code.djangoproject.com/wiki/SetupOnTiger">instructions for OS X</a> used PostgreSQL, but compiled it by hand.</p>
<p>So I decided to wing it.  The DarwinPorts available ports list included three versions of the PostgreSQL package, so I picked the latest one (postgresql81), and installed it.  Then I installed the next dependency (py-egenix-mx-base).  No problem.  And then I ran into the final piece, psycopg.</p>
<p>Psycopg is a package that allows Python to interact with PostgreSQL databases.  The instructions were very specific about installing version 1.1, not version 1.0 or 2.0, of psycopg.  Great.  I asked DarwinPorts to install psycopg.</p>
<p>Well, first problem:  the DarwinPorts psycopg package depends on the postgresql8 package, not postgresql81.</p>
<p>Second problem:  every server from which it attempted to download postgresql8 timed out.</p>
<p>I was a little bit flummoxed at this point.</p>
<p>I backtracked, downloaded the source code for psycopg, compiled it by hand using the main OS X installation instructions (I had to tweak a lot of paths to reference DarwinPorts&#8217; installation locations), and boom!  I&#8217;m off and running.</p>
<p>Phew.</p>
<p>I feel like an idiot for not documenting the exact commands I used, for the edification of future generations.  If I ever do this again and am not running down blind alleys looking for solutions to problems caused by my own typos, I promise to do so faithfully.  In the meantime, here are the steps to do it the easy way (assuming the postgresql8 servers are working):</p>
<ol>
<li>sudo port install python24</li>
<li>sudo port install postgresql8</li>
<li>sudo port install py-egenix-mx-base</li>
<li>sudo port install py-psycopg</li>
<li>[optional] sudo port install subversion (If you&#8217;re using the development version of Django, or just want subversion)</li>
<li><a href="http://www.djangoproject.com/documentation/install/#install-the-django-code">Install Django</a></li>
</ol>
<p>Next up, I&#8217;ll tell you what it&#8217;s like to jump from MySQL to PostgreSQL, and all about my experiences with the Django tutorial.</p>
]]></content:encoded>
			<wfw:commentRss>http://triopter.com/archive/adventures-in-darwinports-installing-apache2-php5-mysql-41-postgresql-and-django/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
