<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>transfixed but not dead! &#187; UNIX</title>
	<atom:link href="http://transfixedbutnotdead.com/tag/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://transfixedbutnotdead.com</link>
	<description>my ramblings on life, work &#38; anything left in-between</description>
	<lastBuildDate>Tue, 08 May 2012 09:57:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='transfixedbutnotdead.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/0a317653027efb1ab2bf8adde3dcb067?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>transfixed but not dead! &#187; UNIX</title>
		<link>http://transfixedbutnotdead.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://transfixedbutnotdead.com/osd.xml" title="transfixed but not dead!" />
	<atom:link rel='hub' href='http://transfixedbutnotdead.com/?pushpress=hub'/>
		<item>
		<title>Compiling PostgreSQL on Tiger</title>
		<link>http://transfixedbutnotdead.com/2007/01/24/compiling-postgresql-on-tiger/</link>
		<comments>http://transfixedbutnotdead.com/2007/01/24/compiling-postgresql-on-tiger/#comments</comments>
		<pubDate>Wed, 24 Jan 2007 17:08:01 +0000</pubDate>
		<dc:creator>draegtun</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Tiger]]></category>
		<category><![CDATA[UNIX]]></category>

		<guid isPermaLink="false">http://draegtun.wordpress.com/2007/01/24/compiling-postgresql-on-tiger/</guid>
		<description><![CDATA[I&#8217;ve compiled Postgres many times on Linux and never had an issue&#8230; so fingers crossed it would be just as easy on MacOSX. A good place to start is an article on Apple&#8217;s developers site&#8230;. Postgres on Mac OS X However I&#8217;ll be using DarwinPorts (or MacPorts as its now known) instead of fink. In [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&#038;blog=351142&#038;post=13&#038;subd=draegtun&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve compiled Postgres many times on Linux and never had an issue&#8230; so fingers crossed it would be just as easy on MacOSX.</p>
<p>A good place to start is an article on Apple&#8217;s developers site&#8230;. <a href="http://developer.apple.com/internet/opensource/postgres.html">Postgres on Mac OS X</a></p>
<p>However I&#8217;ll be using DarwinPorts (or MacPorts as its now known) instead of fink.  In fact you may ask why don&#8217;t I just install the Darwin port of Postgres?   When it comes to critical apps which are important to me I always prefer to use the source and therefore can apply any compilation settings that I may need.</p>
<p>Here&#8217;s the steps I went thru (via Terminal session).  DarwinPorts being installed is a prerequisite&#8230;.</p>
<p>First off u must become root.    You can do this from an admin account with just &#8220;<code>sudo -s</code>&#8220;.</p>
<p>Next we must install some ports that Postgres will need&#8230;.<br />
<code><br />
    &nbsp;&nbsp;&nbsp;&nbsp;port install readline<br />
    &nbsp;&nbsp;&nbsp;&nbsp;port install gmake<br />
    &nbsp;&nbsp;&nbsp;&nbsp;port install bison<br />
</code></p>
<p>Then we need to create a /usr/local directory (<code>mkdir /usr/local</code>).   Within this we need a &#8220;src&#8221; directory where we can download the Postgres source code to (<code>cd /usr/local ; mkdir src ; cd src</code>).</p>
<p>Download the latest stable PostgreSQL source from www.postgresql.org and unpack it&#8230;. <code>gzcat postgres-source.tar.gz | tar xvf -</code></p>
<p>Now you in a position to compile the source code.   Go into the Postgres directory that was unpacked and do the following steps&#8230;.<br />
<code><br />
&nbsp;&nbsp;&nbsp;&nbsp;./configure --with-includes=/opt/local/include/ --with-libraries=/opt/local/lib --with-bonjour<br />
&nbsp;&nbsp;&nbsp;&nbsp;gmake<br />
&nbsp;&nbsp;&nbsp;&nbsp;gmake install<br />
</code></p>
<p>PostgreSQL as now been compiled and installed.   Next step is to initiate the database storage area.  For this you will need to create a &#8220;postgres&#8221; account on your Mac.  (If unclear then read instructions in the article on how to do this).  Then do this&#8230;..<br />
<code><br />
&nbsp;&nbsp;&nbsp;&nbsp;mkdir /usr/local/pgsql/data<br />
&nbsp;&nbsp;&nbsp;&nbsp;chown postgres /usr/local/pgsql/data<br />
&nbsp;&nbsp;&nbsp;&nbsp;su -l postgres<br />
&nbsp;&nbsp;&nbsp;&nbsp;/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data<br />
</code></p>
<p>We now have a fully working PostgreSQL RDBMS on your Mac.</p>
<p>Next you want to put the following in your login .profile (for the postgres account)&#8230;.</p>
<p><code><br />
        &nbsp;&nbsp;&nbsp;&nbsp;export PGDATA=/usr/local/pgsql/data<br />
        &nbsp;&nbsp;&nbsp;&nbsp;export PATH=$PATH:/usr/local/pgsql/bin<br />
</code></p>
<p>If you now source this profile with you now have the Postgres commands in your $PATH ( <code>. .profile</code> ).</p>
<p>To start the Postgres DB server (postmaster) in the background&#8230;.</p>
<p><code><br />
       &nbsp;&nbsp;&nbsp;&nbsp;pg_ctl -l logfile start<br />
</code></p>
<p>and to stop it&#8230;..</p>
<p><code><br />
       &nbsp;&nbsp;&nbsp;&nbsp;pg_ctl stop<br />
</code></p>
<p>You can now go ahead and create a database in PostgreSQL.</p>
<p>That&#8217;s it for now but will touch on security &amp; auto launching at later date.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/draegtun.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/draegtun.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/draegtun.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/draegtun.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/draegtun.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/draegtun.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/draegtun.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/draegtun.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/draegtun.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/draegtun.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/draegtun.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/draegtun.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/draegtun.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/draegtun.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/draegtun.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/draegtun.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&#038;blog=351142&#038;post=13&#038;subd=draegtun&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://transfixedbutnotdead.com/2007/01/24/compiling-postgresql-on-tiger/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/29cb106071d163d703484e63839d89cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">draegtun</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing X-Window (X11) on the iMac</title>
		<link>http://transfixedbutnotdead.com/2007/01/18/installing-x-window-x11-on-the-imac/</link>
		<comments>http://transfixedbutnotdead.com/2007/01/18/installing-x-window-x11-on-the-imac/#comments</comments>
		<pubDate>Thu, 18 Jan 2007 19:20:00 +0000</pubDate>
		<dc:creator>draegtun</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://draegtun.wordpress.com/2007/01/18/installing-x-window-x11-on-the-imac/</guid>
		<description><![CDATA[Can&#8217;t recall how I got X11 onto my Powerbook (probably from dev discs?) but where is it on my iMac (Tiger) discs? Well if u&#8230;.. insert the first install disc scroll down to u see the &#8220;Optional Installs&#8221; PKG icon &#38; double click on it Follow through options (answering the obvious!) till u get to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&#038;blog=351142&#038;post=12&#038;subd=draegtun&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Can&#8217;t recall how I got X11 onto my Powerbook (probably from dev discs?) but where is it on my iMac (Tiger) discs?</p>
<p>Well if u&#8230;.. </p>
<ol>
<li>insert the first install disc</li>
<li>scroll down to u see the &#8220;Optional Installs&#8221; PKG icon &amp; double click on it</li>
<li>Follow through options (answering the obvious!) till u get to &#8220;Installation Type&#8221;</li>
<li>Click on &#8220;Applications&#8221; in the Package window</li>
</ol>
<p>And u should see this&#8230;..</p>
<p><a href="http://www.flickr.com/photos/67882191@N00/361678655/" title="Photo Sharing"><img src="http://farm1.static.flickr.com/161/361678655_169e74b93d_m.jpg" width="240" height="170" alt="X11 install" /></a></p>
<p>Just check on X11 and install <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Now all I do now is &#8220;ssh -Y username@server&#8221; and I can open an X-window app on the server  (on Panther you needed &#8220;ssh -X username@server&#8221;). </p>
<p>However I prefer to work in iTerm and not the xterm app that came with X11.   For this to work you need to set the DISPLAY variable correctly.  I groked this from <a href="http://http://xanana.ucsc.edu/xtal/sample.bashrc">http://xanana.ucsc.edu/xtal/sample.bashrc</a></p>
<pre>
# Set the DISPLAY variable -- works for Apple X11 with Fast User Switching

if [[ -z $DISPLAY &amp;&amp; -z $SSH_CONNECTION ]]; then
    disp_no=($( ps -awx | grep -F X11.app | awk '{print $NF}' 
                     | grep -e ":[0-9]"  ))
    if [[ -n $disp_no ]];then
        export DISPLAY=${disp_no}.0
    else
        export DISPLAY=:0.0
    fi
    echo "DISPLAY has been set to $DISPLAY"
fi
</pre>
<p>There r ways of getting X11 up headless from iTerm&#8230;   but my usage of X11 is just occasional so I&#8217;ll leave that to another day.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/draegtun.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/draegtun.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/draegtun.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/draegtun.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/draegtun.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/draegtun.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/draegtun.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/draegtun.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/draegtun.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/draegtun.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/draegtun.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/draegtun.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/draegtun.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/draegtun.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/draegtun.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/draegtun.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&#038;blog=351142&#038;post=12&#038;subd=draegtun&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://transfixedbutnotdead.com/2007/01/18/installing-x-window-x11-on-the-imac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/29cb106071d163d703484e63839d89cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">draegtun</media:title>
		</media:content>

		<media:content url="http://farm1.static.flickr.com/161/361678655_169e74b93d_m.jpg" medium="image">
			<media:title type="html">X11 install</media:title>
		</media:content>
	</item>
	</channel>
</rss>
