<?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>Kristian Lunde &#187; Mac</title>
	<atom:link href="http://www.klunde.net/category/mac/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.klunde.net</link>
	<description>www.klunde.net</description>
	<lastBuildDate>Wed, 01 Feb 2012 23:57:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Automated backups with Amazon S3</title>
		<link>http://www.klunde.net/2011/05/21/automated-backups-to-amazon-s3/</link>
		<comments>http://www.klunde.net/2011/05/21/automated-backups-to-amazon-s3/#comments</comments>
		<pubDate>Sat, 21 May 2011 21:04:20 +0000</pubDate>
		<dc:creator>Kristian Lunde</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[Real Life]]></category>
		<category><![CDATA[amazonS3]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[jetS3t]]></category>

		<guid isPermaLink="false">http://www.klunde.net/?p=557</guid>
		<description><![CDATA[I recently decided that I my half hearted backups to an external drive wasn&#8217;t really good enough, so I started to look at alternatives. Note, this howto is for Mac and *nix system, if you need a windows version please try to google it. I tried Crash plan, considered a extended dropbox plan but none [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.klunde.net%2F2011%2F05%2F21%2Fautomated-backups-to-amazon-s3%2F" onclick="urchinTracker('/outgoing/api.tweetmeme.com/share?url=http_3A_2F_2Fwww.klunde.net_2F2011_2F05_2F21_2Fautomated-backups-to-amazon-s3_2F&amp;referer=');"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.klunde.net%2F2011%2F05%2F21%2Fautomated-backups-to-amazon-s3%2F&amp;source=kristianlunde&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I recently decided that I my half hearted backups to an external drive wasn&#8217;t really good enough, so I started to look at alternatives. </p>
<p>Note, this howto is for Mac and *nix system, if you need a windows version please try to <a href="http://www.google.no/search?q=automated+backup+to+amazon+s3+windows" onclick="urchinTracker('/outgoing/www.google.no/search?q=automated+backup+to+amazon+s3+windows&amp;referer=');">google it</a>. </p>
<p>I tried <a href="http://www.crashplan.com/" onclick="urchinTracker('/outgoing/www.crashplan.com/?referer=');">Crash plan</a>, considered a extended <a href="http://www.dropbox.com/" onclick="urchinTracker('/outgoing/www.dropbox.com/?referer=');">dropbox</a> plan but none of them seemed like the correct solution (still I love dropbox, its a great app). I ended up registering an Amazon S3 account. </p>
<p>After a quick google search I found this brilliant little blog post <a href="http://smv.unige.ch/members/risoldi/otherdocs/using-amazon-s3-for-personal-backups" onclick="urchinTracker('/outgoing/smv.unige.ch/members/risoldi/otherdocs/using-amazon-s3-for-personal-backups?referer=');">&#8220;Using Amazon S3 for personal backups&#8221;</a> which describe how to use <a href="http://jets3t.s3.amazonaws.com/downloads.html" onclick="urchinTracker('/outgoing/jets3t.s3.amazonaws.com/downloads.html?referer=');">jetS3t</a> to semi automate the synchronization of the iPhoto library on a Mac OSX. </p>
<p>I am not going to repeat the instructions found on the <a href="http://smv.unige.ch/members/risoldi/otherdocs/using-amazon-s3-for-personal-backups" onclick="urchinTracker('/outgoing/smv.unige.ch/members/risoldi/otherdocs/using-amazon-s3-for-personal-backups?referer=');">&#8220;Using Amazon S3 for personal backups&#8221;</a> blog post, I did however have to do a few minor tweaks to get it to work, I also extended the functionality slightly, to enable a fully automated backup solution. </p>
<p>JetS3t has had a few releases since the <a href="http://smv.unige.ch/members/risoldi/otherdocs/using-amazon-s3-for-personal-backups" onclick="urchinTracker('/outgoing/smv.unige.ch/members/risoldi/otherdocs/using-amazon-s3-for-personal-backups?referer=');">&#8220;Using Amazon S3 for personal backups&#8221;</a> article was written, I downloaded <a href="http://jets3t.s3.amazonaws.com/downloads.html" onclick="urchinTracker('/outgoing/jets3t.s3.amazonaws.com/downloads.html?referer=');">jets3t-0.8.1.zip</a>.  Adding the link of the jetS3t directory to the path in .profile didn&#8217;t work for me (I&#8217;m on Mac osX 10.6), so I added it to my .bash_profile file. You can find .bash_profile in /Users/<em>YOUR-USERNAME</em>/, you&#8217;ll have to replace <em>YOUR-USERNAME</em> with your proper username of course. Other than that I followed the examples in <a href="http://smv.unige.ch/members/risoldi/otherdocs/using-amazon-s3-for-personal-backups" onclick="urchinTracker('/outgoing/smv.unige.ch/members/risoldi/otherdocs/using-amazon-s3-for-personal-backups?referer=');">&#8220;Using Amazon S3 for personal backups&#8221;</a>.</p>
<p>Once that was in place and worked properly I started to add some custom scripts.</p>
<p>1. Create a scripts directory in your home directory<br />
2. Create a logs directory in the scripts directory</p>
<div class="geshi no bash">
<ol>
<li class="li1">
<div class="de1">&nbsp;<span class="kw3">cd</span> </div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">mkdir</span> scripts</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">mkdir</span> scripts<span class="sy0">/</span>logs</div>
</li>
</ol>
</div>
<p>2. Navigate to your scripts directory and create a amazon-s3-backup.sh file. </p>
<div class="geshi no bash">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">cd</span> scripts</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">touch</span> amazon-s3-backup.<span class="kw2">sh</span></div>
</li>
</ol>
</div>
<p>3. Use your favourite text editor  to add the following code to the script</p>
<div class="geshi no bash">
<ol>
<li class="li1">
<div class="de1"><span class="co0">#!/bin/bash</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co0">#Backup iPhoto</span></div>
</li>
<li class="li1">
<div class="de1">synchronize.<span class="kw2">sh</span> UP YOUR-IPHOTO-BUCKET <span class="sy0">/</span>Users<span class="sy0">/</span>YOUR-USERNAME<span class="sy0">/</span>Pictures<span class="sy0">/</span>iPhoto\ Library <span class="sy0">&gt;&gt;</span> logs<span class="sy0">/</span>amazon-s3-iphoto-backup.log</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co0">#Backup Documents</span></div>
</li>
<li class="li1">
<div class="de1">synchronize.<span class="kw2">sh</span> UP YOUR-DOCUMENTS-BUCKET <span class="sy0">/</span>Users<span class="sy0">/</span>YOUR-USERNAME<span class="sy0">/</span>Documents <span class="sy0">&gt;&gt;</span> logs<span class="sy0">/</span>amazon-s3-document-backup.log</div>
</li>
</ol>
</div>
<p>Replace <em>YOUR-IPHOTO-BUCKET</em> with the amazon S3 bucket you want to use, and replace <em>YOUR-USERNAME</em> with your username on your mac or *nix system. We pipe the output from the sync process to files in the logs directory, one log file for the iphoto and one log file for the documents process.</p>
<p>4. Edit your crontab. The crontab is a file where you can add files that you want to automatically execute on a regular basis. </p>
<div class="geshi no bash">
<ol>
<li class="li1">
<div class="de1">crontab -e</div>
</li>
</ol>
</div>
<p>5. Add the script to your crontab, I&#8217;ve chosen to run it once a week at 20:00 every Sunday, which is expressed by (0 20 * * 0). </p>
<div class="geshi no bash">
<ol>
<li class="li1">
<div class="de1">&nbsp;<span class="nu0">0</span> <span class="nu0">20</span> <span class="sy0">*</span> &nbsp;<span class="sy0">*</span> <span class="nu0">0</span> <span class="sy0">/</span>Users<span class="sy0">/&lt;</span>em<span class="sy0">&gt;</span>YOUR-USERNAME<span class="sy0">&lt;/</span>em<span class="sy0">&gt;/</span>scripts<span class="sy0">/</span>amazon-s3-backup.<span class="kw2">sh</span></div>
</li>
</ol>
</div>
<p>6. Save your cronjob</p>
<p>There you go, now you&#8217;ll backup your iPhoto library and Documents every Sunday at 20:00 as long as your computer is turned on and online. You can of course tweak when and how often you want to sync to Amazon S3, you can read more about scheduling cron jobs at <a href="http://en.wikipedia.org/wiki/Cron" onclick="urchinTracker('/outgoing/en.wikipedia.org/wiki/Cron?referer=');">wikipedia</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.klunde.net/2011/05/21/automated-backups-to-amazon-s3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Installing Cassandra and Thrift on OSX</title>
		<link>http://www.klunde.net/2009/11/20/installing-cassandra-and-thrift-on-osx/</link>
		<comments>http://www.klunde.net/2009/11/20/installing-cassandra-and-thrift-on-osx/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 21:39:14 +0000</pubDate>
		<dc:creator>Kristian Lunde</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[Cassandra]]></category>

		<guid isPermaLink="false">http://www.klunde.net/?p=410</guid>
		<description><![CDATA[Cassandra is a NoSQL distributed database developed by Facebook, it is built to handle huge amounts of data and to perform CRUD operations quickly. The Cassandra site&#8217;s strap line says: &#8220;The Apache Cassandra Project develops a highly scalable second-generation distributed database, bringing together Dynamo&#8217;s fully distributed design and Bigtable&#8217;s ColumnFamily-based data model. Thrift is also [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.klunde.net%2F2009%2F11%2F20%2Finstalling-cassandra-and-thrift-on-osx%2F" onclick="urchinTracker('/outgoing/api.tweetmeme.com/share?url=http_3A_2F_2Fwww.klunde.net_2F2009_2F11_2F20_2Finstalling-cassandra-and-thrift-on-osx_2F&amp;referer=');"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.klunde.net%2F2009%2F11%2F20%2Finstalling-cassandra-and-thrift-on-osx%2F&amp;source=kristianlunde&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://incubator.apache.org/cassandra/" onclick="urchinTracker('/outgoing/incubator.apache.org/cassandra/?referer=');">Cassandra</a> is a <a href="http://en.wikipedia.org/wiki/NoSQL" onclick="urchinTracker('/outgoing/en.wikipedia.org/wiki/NoSQL?referer=');">NoSQL</a> distributed database developed by <a href="http://www.facebook.com" onclick="urchinTracker('/outgoing/www.facebook.com?referer=');">Facebook</a>, it is built to handle huge amounts of data and to perform <a href="http://en.wikipedia.org/wiki/Create,_read,_update_and_delete" onclick="urchinTracker('/outgoing/en.wikipedia.org/wiki/Create_read_update_and_delete?referer=');">CRUD</a> operations quickly. The Cassandra site&#8217;s strap line says:</p>
<p><i>&#8220;The Apache Cassandra Project develops a highly scalable second-generation distributed database, bringing together  Dynamo&#8217;s fully distributed design and Bigtable&#8217;s ColumnFamily-based data model. </i></p>
<p><a href="http://incubator.apache.org/thrift/" onclick="urchinTracker('/outgoing/incubator.apache.org/thrift/?referer=');">Thrift</a> is also developed by <a href="http://www.facebook.com" onclick="urchinTracker('/outgoing/www.facebook.com?referer=');">Facebook</a> and is a software framework for service development and is used as an interface to Cassandra. The Thrift page site says:</p>
<p><i>&#8220;Thrift is a software framework for scalable cross-language services development. It combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, Smalltalk, and OCaml.&#8221;</i></p>
<p>Both <a href="http://incubator.apache.org/cassandra/" onclick="urchinTracker('/outgoing/incubator.apache.org/cassandra/?referer=');">Cassandra</a> and <a href="http://incubator.apache.org/thrift/" onclick="urchinTracker('/outgoing/incubator.apache.org/thrift/?referer=');">Thrift</a> are apache incubator projects.</p>
<h2>Installing Cassandra</h2>
<h3>1. Download cassandra</h3>
<p>Download from: <a href="http://incubator.apache.org/cassandra/" onclick="urchinTracker('/outgoing/incubator.apache.org/cassandra/?referer=');">http://incubator.apache.org/cassandra/</a>.</p>
<h3>2. Create and set the correct paths in the storage-conf.xml</h3>
<p>You can find the storage-conf.xml file in your cassandra root directory /conf</p>
<p>My configuration file settings in storage-conf.xml:</p>
<div class="geshi no xml">
<ol>
<li class="li1">
<div class="de1">&nbsp; <span class="sc3"><span class="re1">&lt;CommitLogDirectory<span class="re2">&gt;</span></span></span>/Users/kristianlunde/tmp/cassandra-log/commitlog<span class="sc3"><span class="re1">&lt;/CommitLogDirectory<span class="re2">&gt;</span></span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc3"><span class="re1">&lt;DataFileDirectories<span class="re2">&gt;</span></span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;DataFileDirectory<span class="re2">&gt;</span></span></span>/Users/kristianlunde/workspaces/mysapient/cassandra/data<span class="sc3"><span class="re1">&lt;/DataFileDirectory<span class="re2">&gt;</span></span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc3"><span class="re1">&lt;/DataFileDirectories<span class="re2">&gt;</span></span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc3"><span class="re1">&lt;CalloutLocation<span class="re2">&gt;</span></span></span>/Users/kristianlunde/workspaces/mysapient/cassandra/callouts<span class="sc3"><span class="re1">&lt;/CalloutLocation<span class="re2">&gt;</span></span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc3"><span class="re1">&lt;BootstrapFileDirectory<span class="re2">&gt;</span></span></span>/Users/kristianlunde/workspaces/mysapient/cassandra/bootstrap<span class="sc3"><span class="re1">&lt;/BootstrapFileDirectory<span class="re2">&gt;</span></span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc3"><span class="re1">&lt;StagingFileDirectory<span class="re2">&gt;</span></span></span>/Users/kristianlunde/workspaces/mysapient/cassandra/staging<span class="sc3"><span class="re1">&lt;/StagingFileDirectory<span class="re2">&gt;</span></span></span></div>
</li>
</ol>
</div>
<p><strong>Notice:</strong> You have to create all these directories for cassandra to run properly.</p>
<h3>3. Set a log directory in the log4j.properties file</h3>
<p>This file is found in the same directory as the storage-conf.xml</p>
<h3>4. Check that you are running java 6 as default</h3>
<div class="geshi no bash">
<ol>
<li class="li1">
<div class="de1">&nbsp;java -version</div>
</li>
</ol>
</div>
<p>If you are running an earlier version of java you will have to change your version. Java 6 should already be installed on your mac if you keep your os in sync with the automatic updates from apple. You can change your java version by using the <a href="http://www.apple.com/macosx/what-is-macosx/apps-and-utilities.html#java" onclick="urchinTracker('/outgoing/www.apple.com/macosx/what-is-macosx/apps-and-utilities.html_java?referer=');">&#8220;Java Settings&#8221;</a> application located in your <em>/Application/Utilities</em> directory.</p>
<h3>5. Starting Cassandra</h3>
<p>You should be ready to go now, navigate to the root directory of your cassandra installation and start cassandra by typing:</p>
<div class="geshi no pre">
<ol>
<li class="li1">
<div class="de1">bin/cassandra -f</div>
</li>
</ol>
</div>
<p>If you dont see any error messages cassandra is probably running as it should, so it is time to test it out.</p>
<p>Cassandra comes with a CLI interface which allowes you to do simple queries to the database. Notice that the CLI interface is not not as powerful as the thrift interface. You can for instance not execute get queries in <a href="http://arin.me/code/wtf-is-a-supercolumn-cassandra-data-model" onclick="urchinTracker('/outgoing/arin.me/code/wtf-is-a-supercolumn-cassandra-data-model?referer=');">Super Columns</a>, those queries will create a java exception.</p>
<p>To test the CLI interface, run the following command from the cassandra root directory:</p>
<div class="geshi no bash">
<ol>
<li class="li1">
<div class="de1">.<span class="sy0">/</span>bin<span class="sy0">/</span>cassandra-cli &#8211;host localhost &#8211;port <span class="nu0">9160</span></div>
</li>
</ol>
</div>
<p>Inserting values to the keyspace:</p>
<div class="geshi no bash">
<ol>
<li class="li1">
<div class="de1">&nbsp;cassandra<span class="sy0">&gt;</span> <span class="kw1">set</span> Keyspace1.Standard1<span class="br0">&#91;</span><span class="st0">&#39;blog-post&#39;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#39;name&#39;</span><span class="br0">&#93;</span> = <span class="st0">&#39;Installing Cassandra and Thrift OSX&#39;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;Value inserted.</div>
</li>
<li class="li1">
<div class="de1">&nbsp;cassandra<span class="sy0">&gt;</span> <span class="kw1">set</span> Keyspace1.Standard1<span class="br0">&#91;</span><span class="st0">&#39;blog-post&#39;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#39;author&#39;</span><span class="br0">&#93;</span> = <span class="st0">&#39;Kristian Lunde&#39;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;Value inserted.</div>
</li>
</ol>
</div>
<p>	Retrieving data from the keyspace:</p>
<div class="geshi no bash">
<div class="head">cassandra> get Keyspace1.Standard1[&#39;blog-post&#39;]</div>
<ol>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="br0">&#40;</span><span class="re2">column=</span>name, <span class="re2">value=</span>Installing Cassandra and Thrift OSX; <span class="re2">timestamp=</span><span class="nu0">1258748376097</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="br0">&#40;</span><span class="re2">column=</span>author, <span class="re2">value=</span>Kristian Lunde; <span class="re2">timestamp=</span><span class="nu0">1258748405486</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;Returned <span class="nu0">2</span> rows.</div>
</li>
<li class="li1">
<div class="de1">&nbsp;cassandra<span class="sy0">&gt;</span></div>
</li>
</ol>
</div>
<h2>Installing Thrift</h2>
<p><strong>Update:</strong> I found this manual after I had installed thrift: <a href="http://wiki.apache.org/thrift/ThriftInstallationMacOSX" onclick="urchinTracker('/outgoing/wiki.apache.org/thrift/ThriftInstallationMacOSX?referer=');">http://wiki.apache.org/thrift/ThriftInstallationMacOSX</a>, using this install guide will probably fix the issues I had with compiling thrift.</p>
<h3>1. Download Thrift</h3>
<p>Download from <a href="http://incubator.apache.org/thrift/download/" onclick="urchinTracker('/outgoing/incubator.apache.org/thrift/download/?referer=');">http://incubator.apache.org/thrift/download/</a> and extract it.</p>
<h3>2. Check that you have installed the following:</h3>
<ul>
<li>g++ 3.3.5+</li>
<li>Runtime libraries for lex and yacc might be needed for the compiler.</li>
<li>boost 1.33.1+ (1.34.0 for building all tests) <a href="http://www.boost.org/" onclick="urchinTracker('/outgoing/www.boost.org/?referer=');">http://www.boost.org/</a>.</li>
</ul>
<p>I had to install boost manually:</p>
<div class="geshi no bash">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">sudo</span> port <span class="kw2">install</span> boost</div>
</li>
</ol>
</div>
<p><strong>Notice:</strong> the boost installation might take a while, It took about 5 &#8211; 10 minutes on my Macbook PRO (2.53GHz).</p>
<p>You can see the full requirements for thrift at <a href="http://wiki.apache.org/thrift/ThriftRequirements" onclick="urchinTracker('/outgoing/wiki.apache.org/thrift/ThriftRequirements?referer=');">http://wiki.apache.org/thrift/ThriftRequirements</a>.</p>
<h3>3. Start the installation</h3>
<div class="geshi no bash">
<ol>
<li class="li1">
<div class="de1">&nbsp;kristian-lundes-macbook-pro:thrift kristianlunde$ .<span class="sy0">/</span>bootstrap.<span class="kw2">sh</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;configure.ac:<span class="nu0">26</span>: installing `.<span class="sy0">/</span>missing<span class="st0">&#39;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="st0"> configure.ac:26: installing `./install-sh&#39;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;compiler<span class="sy0">/</span><span class="kw2">cpp</span><span class="sy0">/</span>Makefile.am: installing `.<span class="sy0">/</span>depcomp<span class="st0">&#39;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="st0"> configure.ac: installing `./ylwrap&#39;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;kristian-lundes-macbook-pro:thrift</div>
</li>
</ol>
</div>
<div class="geshi no bash">
<ol>
<li class="li1">
<div class="de1">.<span class="sy0">/</span>configure</div>
</li>
</ol>
</div>
<p>This ended up in an error message for me:</p>
<div class="geshi no bash">
<ol>
<li class="li1">
<div class="de1">&nbsp;.<span class="sy0">/</span>configure: line <span class="nu0">20722</span>: syntax error near unexpected token `MONO,<span class="st0">&#39;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="st0"> ./configure: line 20722: ` &nbsp;PKG_CHECK_MODULES(MONO, mono &gt;= 2.0.0, net_3_5=yes, net_3_5=no)&#39;</span></div>
</li>
</ol>
</div>
<p>To fix this I had to copy my pkg.m4 file from /opt/local/share/aclocal/pkg.m4 to my thrift/aclocal directory.</p>
<p>Navigate to your thrift root directory:</p>
<div class="geshi no bash">
<ol>
<li class="li1">
<div class="de1">&nbsp;<span class="kw2">cp</span> <span class="sy0">/</span>opt<span class="sy0">/</span><span class="kw3">local</span><span class="sy0">/</span>share<span class="sy0">/</span><span class="kw2">aclocal</span><span class="sy0">/</span>pkg.<span class="kw2">m4</span> <span class="kw2">aclocal</span></div>
</li>
</ol>
</div>
<p>Thanks to <a href="http://aaronspotlatch.appspot.com/archive/Jul-2008" onclick="urchinTracker('/outgoing/aaronspotlatch.appspot.com/archive/Jul-2008?referer=');">http://aaronspotlatch.appspot.com/archive/Jul-2008</a> and<br />
<a href="http://qslack.com/post/thrift-macosx-104" onclick="urchinTracker('/outgoing/qslack.com/post/thrift-macosx-104?referer=');">http://qslack.com/post/thrift-macosx-104</a> for pointing me in the right direction.</p>
<p>You should now be ready to run make</p>
<div class="geshi no bash">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">make</span></div>
</li>
</ol>
</div>
<p>and</p>
<div class="geshi no bash">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">sudo</span> <span class="kw2">make</span> <span class="kw2">install</span></div>
</li>
</ol>
</div>
<p>You should now be able to run thrift on your mac.</p>
<div class="geshi no bash">
<ol>
<li class="li1">
<div class="de1">thrift</div>
</li>
</ol>
</div>
<p>You should now be ready to build your amazing application with Cassandra if both your installation of Cassandra and Thrift were successful.</p>
<p>I will try to post another blog post shortly on using Cassandra, Thrift and PHP. Stay tuned. </p>
<h3>Resources</h3>
<ul>
<li><a href="http://incubator.apache.org/cassandra/" onclick="urchinTracker('/outgoing/incubator.apache.org/cassandra/?referer=');">The Cassandra Project</a></li>
<li><a href="http://wiki.apache.org/cassandra/FrontPage" onclick="urchinTracker('/outgoing/wiki.apache.org/cassandra/FrontPage?referer=');">The Cassandra Wiki</a></li>
<li><a href="http://wiki.apache.org/thrift/FrontPage" onclick="urchinTracker('/outgoing/wiki.apache.org/thrift/FrontPage?referer=');">The Thrift Wiki</a></li>
<li><a href="http://jetfar.com/installing-cassandra-and-thrift-on-snow-leopard-a-quick-start-guide/" onclick="urchinTracker('/outgoing/jetfar.com/installing-cassandra-and-thrift-on-snow-leopard-a-quick-start-guide/?referer=');">http://jetfar.com/installing-cassandra-and-thrift-on-snow-leopard-a-quick-start-guide/</a></li>
<li><a href="http://posulliv.com/?p=149" onclick="urchinTracker('/outgoing/posulliv.com/?p=149&amp;referer=');">Setting up a Cassandra cluster</a></li>
<li><a href="http://www.onemanclapping.org/2009/11/building-cassandra-thrift-bindings-on.html" onclick="urchinTracker('/outgoing/www.onemanclapping.org/2009/11/building-cassandra-thrift-bindings-on.html?referer=');">http://www.onemanclapping.org/2009/11/building-cassandra-thrift-bindings-on.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.klunde.net/2009/11/20/installing-cassandra-and-thrift-on-osx/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Installing nutch 1.0 on OSX</title>
		<link>http://www.klunde.net/2009/04/07/installing-nutch-10-on-osx/</link>
		<comments>http://www.klunde.net/2009/04/07/installing-nutch-10-on-osx/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 21:15:05 +0000</pubDate>
		<dc:creator>Kristian Lunde</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[nutch]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.klunde.net/?p=275</guid>
		<description><![CDATA[Today I started to work on a little project that required a crawler, and Nutch seemed to do most of what I needed. The nutch team conveniently released Nutch 1.0 late in March 2009, so I had a brand new release to test out. Installing nutch 1.0 on a mac is not as straight forward [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.klunde.net%2F2009%2F04%2F07%2Finstalling-nutch-10-on-osx%2F" onclick="urchinTracker('/outgoing/api.tweetmeme.com/share?url=http_3A_2F_2Fwww.klunde.net_2F2009_2F04_2F07_2Finstalling-nutch-10-on-osx_2F&amp;referer=');"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.klunde.net%2F2009%2F04%2F07%2Finstalling-nutch-10-on-osx%2F&amp;source=kristianlunde&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Today I started to work on a little project that required a crawler, and <a href="http://lucene.apache.org/nutch/" onclick="urchinTracker('/outgoing/lucene.apache.org/nutch/?referer=');">Nutch</a> seemed to do most of what I needed. The nutch team conveniently released Nutch 1.0 late in March 2009, so I had a brand new release to test out. Installing nutch 1.0 on a mac is not as straight forward as I thought, I ran into a lot of unexpected issues and here is my cook book description of how to successfully install nutch 1.0 on your mac.</p>
<ol>
<li>Download the latest source code from the Apache SVN repository <i>http://svn.apache.org/repos/asf/lucene/nutch/</i>. I tried running it from the tarball without success, I also tried to compile the source from the tarball, but a post on the nutch forum clearly states that this will not work.</li>
<li>Set your <b>JAVA_HOME</b> and <b>NUTCH_JAVA_HOME</b> variables, again this is not straight forward, they both need to point to your real installation of Java 1.6 (earlier versions of Java will fail). I sat these variables to: <i>/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home</i>, I could not get the <i>/Library/Java/Home</i> symbolic link to work properly.</li>
<li>Compile the source code using Ant (I built it in Eclipse).</li>
<li>Setup your nutch configuration, by following the <a href="http://zillionics.com/resources/articles/NutchGuideForDummies.htm" class="broken_link" onclick="urchinTracker('/outgoing/zillionics.com/resources/articles/NutchGuideForDummies.htm?referer=');">tutorial by Peter P. Wang</a></li>
<li>Run your first crawl with: <i>./bin/nutch crawl urls -dir crawl -depth 3 -topN 50</i></li>
</ol>
<p>Most of the issues I encountered was related to the Java version and the fact that using <i>/Application/Utilities/Java/Java preferences</i> application do not really change the <b>JAVA_HOME</b> directory <i>/Library/Java/Home</i> properly. So make sure you have set both <b>JAVA_HOME</b> and <b>NUTCH_JAVA_HOME</b>, and that your OSX does not fool you when it pretend to be symbolically linking to the 1.6 installation. </p>
<p>Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klunde.net/2009/04/07/installing-nutch-10-on-osx/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>2.5 applications I really miss in OS X</title>
		<link>http://www.klunde.net/2008/12/03/25-applications-i-really-miss-in-os-x/</link>
		<comments>http://www.klunde.net/2008/12/03/25-applications-i-really-miss-in-os-x/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 21:51:40 +0000</pubDate>
		<dc:creator>Kristian Lunde</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Kate]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[TortoiseSVN]]></category>

		<guid isPermaLink="false">http://www.klunde.net/?p=211</guid>
		<description><![CDATA[In a previous post I wrote about my new life running on a MacBook Pro and OSX. It has now been over a month since I switch over to this unix hybrid, and I am quite liking it. It is very stable, I almost never turn off my mac, but I put it to sleep, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.klunde.net%2F2008%2F12%2F03%2F25-applications-i-really-miss-in-os-x%2F" onclick="urchinTracker('/outgoing/api.tweetmeme.com/share?url=http_3A_2F_2Fwww.klunde.net_2F2008_2F12_2F03_2F25-applications-i-really-miss-in-os-x_2F&amp;referer=');"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.klunde.net%2F2008%2F12%2F03%2F25-applications-i-really-miss-in-os-x%2F&amp;source=kristianlunde&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>In a previous post I wrote about my new life running on a MacBook Pro and OSX. It has now been over a month since I switch over to this unix hybrid, and I am quite liking it. It is very stable, I almost never turn off my mac, but I put it to sleep, this is working fine and my last reboot is over two weeks ago. I have also gotten used to some of the new weird keys on the keyboard and the shortcuts, but I am not yet as efficent on a mac as I am/were on ubuntu/windows.  During the last few weeks I have discovered that Apple and other in most cases provide me with the applications I need, but not always, and here is the list of applications I really miss:</p>
<p>1. <a href="http://tortoisesvn.net/" onclick="urchinTracker('/outgoing/tortoisesvn.net/?referer=');">TortoiseSVN</a><br />
Windows application which integrates itself with Windows Explorer and provide a SVN client. I would say that this is the best graphical SVN client I have ever used. SVNX which I currently use on the mac is not a very good replacement.</p>
<p>2.  Kate / Notepad++<br />
<a href="http://kate-editor.org/" onclick="urchinTracker('/outgoing/kate-editor.org/?referer=');">Kate</a> is a KDE text editor for unix based systems. <a href="http://notepad-plus.sourceforge.net/uk/site.htm" onclick="urchinTracker('/outgoing/notepad-plus.sourceforge.net/uk/site.htm?referer=');">Notpad++</a> is Kates equivalent on Windows. Both editors provide a simple and intuitive user interface, and a lot of syntax highlight files for all the obscure programming languages you can think of.<br />
I know Mac have the TextMate application, but that is third party software and you have to pay €48 or something for a license, and that is probably what I probably will do. The TextMate application is really good and provide most if not all the functionality that Kate and Notepad++ provide.</p>
<p>In my desperation for a good text editor I almost went off and tried to install KDE on Mac, but that was said to be experimental and could break my entire system. So that is a no go for now. The article however was really interesting:</p>
<p>URL: <a href="http://www.simplehelp.net/2007/07/22/how-to-install-kde-4-in-os-x/" onclick="urchinTracker('/outgoing/www.simplehelp.net/2007/07/22/how-to-install-kde-4-in-os-x/?referer=');">http://www.simplehelp.net/2007/07/22/how-to-install-kde-4-in-os-x/</a>.</p>
<p>I still miss my ubuntu system and will probably go off and install parallels or vmware and ubuntu, just to have it accessible <img src='http://www.klunde.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.klunde.net/2008/12/03/25-applications-i-really-miss-in-os-x/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Porting to Mac</title>
		<link>http://www.klunde.net/2008/11/15/porting-to-mac/</link>
		<comments>http://www.klunde.net/2008/11/15/porting-to-mac/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 23:55:20 +0000</pubDate>
		<dc:creator>Kristian Lunde</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.klunde.net/?p=189</guid>
		<description><![CDATA[At Orange Bus we all work on MacBook Pro, and when I started up at Orange Bus it was the very first time I used a Mac and OS X. It is now 12 days since that first experience with an Apple computer and though I am still a bit unfamiliar with certain features I [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.klunde.net%2F2008%2F11%2F15%2Fporting-to-mac%2F" onclick="urchinTracker('/outgoing/api.tweetmeme.com/share?url=http_3A_2F_2Fwww.klunde.net_2F2008_2F11_2F15_2Fporting-to-mac_2F&amp;referer=');"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.klunde.net%2F2008%2F11%2F15%2Fporting-to-mac%2F&amp;source=kristianlunde&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>At Orange Bus we all work on MacBook Pro, and when I started up at Orange Bus it was the very first time I used a Mac and OS X. It is now 12 days since that first experience with an Apple computer and though I am still a bit unfamiliar with certain features I am getting in to it, and I really like it. The stuff that I have most problem with are:</p>
<p><strong>The keyboard</strong><br />
I have some trouble finding the keys and key combinations I am used to from both Ubuntu and WinXP. And it probably does not help that the keyboard on the laptop is English, and my external keyboard at work is Norwegian (I was thinking it would be a good idea to bring a Norwegian keyboard to the UK, yeah right).</p>
<p><strong>Changing windows</strong><br />
Moving between different set of windows and the different set of their instances are still a bit unfamiliar. In particular moving between a set of windows of the same application.</p>
<p><strong>Universal access</strong><br />
Universal access is a piece of software which enhances for instance the readability on the Mac, and the key command to activating the speach on the mac must be some command I am used to from Windows or Ubuntu. I am always turning it on, very annoying.</p>
<p>That was the &#8220;negative&#8221; part about Mac, but that is just things I need to learn. Now let us have a look at the positive stuff in OS X. </p>
<p><strong>Simplicty</strong><br />
I have heard it a million times by mac users, it is so easy to use a mac but I have never really believed them. But they are correct. Using a mac is extremely simple, Apple must have some of the best UI designers in the world. Everything is so amazingly simple. And another thing you just have to love in OS X is how you install software. You open the install file and drag it into the Application folder, and woosh, the application is installed.  I would go as far to say that if you are a novice computer user, Mac would probably be the best choice. Lets compare it to moving around. Using a mac is not much harder than walking, in comparison to Microsoft Windows which would be something like controlling a space shuttle. </p>
<p><strong>Flexibility</strong><br />
Well I have been praising Mac for their simplicity right now, but even though it is very easy to use you still have the possibility to do advanced stuff. For instance, since Mac is based on Unix you have a terminal easily accessible and you can use almost all your regular commands <img src='http://www.klunde.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><strong>Mail</strong><br />
Mail is a Mac application for managing&#8230;.. yes you are right, mail. Well Mail is a okay application it works fine, but it is not as good as Microsoft Outlook, but it is yet another example of how simple and intuitive an Apple product can be. </p>
<p><strong>Quicksilver</strong><br />
Quicksilver is a third party software for easy launch of applications. Type &#8220;ctrl&#8221; + &#8220;space&#8221; and then start typing the name of the application you want to launch, it automatically find the application and launches it when you hit enter. Brilliant!</p>
<p>At this point I can not see one good reason for going back to MS Windows. I am still very fond of Linux distros like Ubuntu, but Mac and OS X have really impressed me. So I suppose I have to line in with all the other Mac fanatics now (no I am not a mac fanatic, at least not yet).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klunde.net/2008/11/15/porting-to-mac/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

