<?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>mobile and gis dev notes &#187; mac</title>
	<atom:link href="http:///wordpress/category/mac/feed/" rel="self" type="application/rss+xml" />
	<link>/wordpress</link>
	<description>by rupert</description>
	<lastBuildDate>Sun, 22 Jan 2012 04:34:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Installing Postgres8.3,8.4,9.0, Postgis1.3.3,1.4.1,2.0, pgRouting on OSX  (updated)</title>
		<link>/wordpress/2011/02/installing-postgres83-postgis133-pgrouting-on-macosx-leopard-2/</link>
		<comments>/wordpress/2011/02/installing-postgres83-postgis133-pgrouting-on-macosx-leopard-2/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 03:31:08 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[postgis]]></category>
		<category><![CDATA[postgres]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[pgRouting]]></category>

		<guid isPermaLink="false">/wordpress/?p=843</guid>
		<description><![CDATA[(Updated):Postgres9.0.3 Postgis2.0svn Before you go any further. Dump data before migrating and installing. Warning: Most of the packages listed below is installed by source. 1. Download the current postgres source. http://www.postgresql.org/ftp/source/ 8.3: $./configure --with-prefix=/usr/local/pgsql --with-python &#160; 8.4: $./configure --prefix=/usr/local/pgsql --with-python &#160; $make $sudo make install 2. Don&#8217;t delete the postgres folder. You might need this [...]]]></description>
			<content:encoded><![CDATA[<p><strong>(Updated):Postgres9.0.3 Postgis2.0svn</strong></p>
<p>Before you go any further. <a href="/wordpress/2011/02/migrating-data-from-postgres82-to-postgres83-3/">Dump data before migrating and installing.</a>  <i>Warning: Most of the packages listed below is installed by source.</i></p>
<p>1. Download the current postgres source. <a href="http://www.postgresql.org/ftp/source/">http://www.postgresql.org/ftp/source/</a></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">8.3</span>:
$.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql <span style="color: #660033;">--with-python</span>
&nbsp;
<span style="color: #000000;">8.4</span>:
$.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql <span style="color: #660033;">--with-python</span>
&nbsp;
<span style="color: #007800;">$make</span>
<span style="color: #007800;">$sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>2. Don&#8217;t delete the postgres folder. You might need this later on for future compilations. See pgadmin3 admin pack below.</p>
<p>3. Add a postgres user from <strong>System Preferences &gt; Accounts</strong></p>
<p>4. Initialize the data directory</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">$mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>data
<span style="color: #007800;">$chown</span> postgres <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #007800;">$su</span> - postgres
$<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>initdb <span style="color: #660033;">-E</span> utf8 <span style="color: #660033;">-D</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>data</pre></div></div>

<blockquote>
<pre>
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.
The default text search configuration will be set to "english".

fixing permissions on existing directory /usr/local/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 20
selecting default shared_buffers/max_fsm_pages ... 2400kB/20000
creating configuration files ... ok
creating template1 database in /usr/local/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data
or
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
</pre>
</blockquote>
<p>4. Install Geos , PROJ4, and Postgis</p>
<p><b>GEOS:</b><br/><br />
- install geos with the Kyngchaos installer</p>
<p>- installing by source</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> checkout http:<span style="color: #000000; font-weight: bold;">//</span>svn.osgeo.org<span style="color: #000000; font-weight: bold;">/</span>geos<span style="color: #000000; font-weight: bold;">/</span>trunk trunk
<span style="color: #7a0874; font-weight: bold;">cd</span> trunk<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">sh</span> autogen.sh
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>geos <span style="color: #660033;">--enable-python</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p><b>PROJ4:</b><br/></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> http:<span style="color: #000000; font-weight: bold;">//</span>svn.osgeo.org<span style="color: #000000; font-weight: bold;">/</span>metacrs<span style="color: #000000; font-weight: bold;">/</span>proj<span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span>proj<span style="color: #000000; font-weight: bold;">/</span> proj
<span style="color: #7a0874; font-weight: bold;">cd</span> proj
<span style="color: #c20cb9; font-weight: bold;">sh</span> autogen.sh
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>proj4
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p><b>POSTGIS:</b><br/></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">8.3</span>:
$.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-pgsql</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>pg_config <span style="color: #660033;">--with-geos</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>geos-config
&nbsp;
<span style="color: #000000;">8.4</span> using Kyngchaos GEOS Framework:
$.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-pgsql</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>pg_config <span style="color: #660033;">--with-geosconfig</span>=<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Frameworks<span style="color: #000000; font-weight: bold;">/</span>GEOS.framework<span style="color: #000000; font-weight: bold;">/</span>unix<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>geos-config
&nbsp;
<span style="color: #000000;">9.0</span>:using Kyngchaos GEOS + PROJ framework:<span style="color: #7a0874; font-weight: bold;">&#40;</span>Update Feb <span style="color: #000000;">15</span>, <span style="color: #000000;">2011</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-pgsql</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>pg_config <span style="color: #660033;">--with-geosconfig</span>=<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Frameworks<span style="color: #000000; font-weight: bold;">/</span>GEOS.framework<span style="color: #000000; font-weight: bold;">/</span>unix<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>geos-config <span style="color: #660033;">--with-projdir</span>=<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Frameworks<span style="color: #000000; font-weight: bold;">/</span>PROJ.framework<span style="color: #000000; font-weight: bold;">/</span>unix<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">--with-gettext</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>gettext<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
Note: libintl.h error. You need <span style="color: #c20cb9; font-weight: bold;">gettext</span>
<span style="color: #c20cb9; font-weight: bold;">gcc</span> <span style="color: #660033;">-g</span> <span style="color: #660033;">-O2</span>  <span style="color: #660033;">-fno-common</span> <span style="color: #660033;">-DPIC</span>  <span style="color: #660033;">-Wall</span> <span style="color: #660033;">-Wmissing-prototypes</span>  -DUSE_NLS <span style="color: #660033;">-DLOCALEDIR</span>=<span style="color: #000000; font-weight: bold;">\&quot;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>locale<span style="color: #000000; font-weight: bold;">\&quot;</span> -Iyes<span style="color: #000000; font-weight: bold;">/</span>include  <span style="color: #660033;">-c</span> shp2pgsql-core.c
In <span style="color: #c20cb9; font-weight: bold;">file</span> included from shp2pgsql-core.c:<span style="color: #000000;">15</span>:
shp2pgsql-core.h:<span style="color: #000000;">17</span>:<span style="color: #000000;">21</span>: error: libintl.h: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or di
&nbsp;
9.0.4: using src from GEOS + PROJ
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-pgconfig</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>pg_config <span style="color: #660033;">--with-geosconfig</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>geos<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>geos-config <span style="color: #660033;">--with-projdir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>proj4
&nbsp;
<span style="color: #007800;">$make</span>
<span style="color: #007800;">$sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>If everthing is successful, you should see files in /usr/local/pgsql/share/contrib/.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>postgis-<span style="color: #000000;">2.0</span>
- legacy.sql
- postgis.sql
- postgis_upgrade_20_minor.sql
- spatial_ref_sys.sql
- uninstall_legacy.sql
- uninstall_postgis.sql</pre></div></div>

<p>5. Starting postgres on boot. Download <a href='/wordpress/wp-content/uploads/2008/05/postgresstartup.tar.gz'>postgresstartup.tar.gz</a> then extract to your /Library/StartupItems</p>
<p>6. Creating the database</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">createdb <span style="color: #660033;">-E</span> utf8 template_postgis
createlang plpgsql template_postgis
&nbsp;
<span style="color: #000000;">8.3</span>:
psql <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>lwpostgis.sql
psql <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>spatial_ref_sys.sql
&nbsp;
<span style="color: #000000;">8.4</span>:
psql <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>postgis.sql 
psql <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>spatial_ref_sys.sql
&nbsp;
<span style="color: #000000;">9.0</span> + postgis2.0:
psql <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>postgis-<span style="color: #000000;">2.0</span><span style="color: #000000; font-weight: bold;">/</span>postgis.sql 
psql <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>postgis-<span style="color: #000000;">2.0</span><span style="color: #000000; font-weight: bold;">/</span>spatial_ref_sys.sql</pre></div></div>

<p>7. Install and download pgAdmin3 for MacOS X </p>
<p><a href="http://www.postgresql.org/ftp/pgadmin3/release/">http://www.postgresql.org/ftp/pgadmin3/release/</a></p>
<p>Update Feb 15, 2011: Use pgadmin1.12 to connect with postgres9. <a href="http://postgresql.1045698.n5.nabble.com/BUG-5668-initdb-failed-to-create-postgres-database-td2847489.html<br />
">Other versions (1.8.4, 1.6.3 don&#8217;t work)</a></p>
<p>8. Startup pgadmin3. You will notice there is a window stating&#8230;</p>
<blockquote><p>Server instrumentation<br />
The server lacks instrumentation functions.<br />
pgAdmin III uses some support functions that are not available by default in all PostgreSQL versions. These enable some tasks that make life easier when dealing with log files and configuration files. </p></blockquote>
<p>9. Compile the adminpack. Go to $postgresql_install_directory/contrib/adminpack</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">gcc</span> <span style="color: #660033;">-no-cpp-precomp</span> <span style="color: #660033;">-O2</span> <span style="color: #660033;">-Wall</span> <span style="color: #660033;">-Wmissing-prototypes</span> <span style="color: #660033;">-Wpointer-arith</span> <span style="color: #660033;">-Winline</span> <span style="color: #660033;">-Wdeclaration-after-statement</span> <span style="color: #660033;">-Wendif-labels</span> <span style="color: #660033;">-fno-strict-aliasing</span> <span style="color: #660033;">-fwrapv</span>  <span style="color: #660033;">-bundle</span> -multiply_defined suppress  adminpack.o  -L..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>port -bundle_loader ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>backend<span style="color: #000000; font-weight: bold;">/</span>postgres  <span style="color: #660033;">-o</span> libadminpack.0.0.so
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> libadminpack.0.so
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> libadminpack.0.0.so libadminpack.0.so
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> libadminpack.so
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> libadminpack.0.0.so libadminpack.so
&nbsp;
rupert:adminpack rupert$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
Password:
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib
<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sh</span> ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>install-sh <span style="color: #660033;">-c</span> <span style="color: #660033;">-m</span> <span style="color: #000000;">644</span> .<span style="color: #000000; font-weight: bold;">/</span>uninstall_adminpack.sql <span style="color: #ff0000;">'/usr/local/pgsql/share/contrib'</span>
<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sh</span> ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>install-sh <span style="color: #660033;">-c</span> <span style="color: #660033;">-m</span> <span style="color: #000000;">644</span> adminpack.sql <span style="color: #ff0000;">'/usr/local/pgsql/share/contrib'</span>
<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sh</span> ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>install-sh <span style="color: #660033;">-c</span> <span style="color: #660033;">-m</span> <span style="color: #000000;">755</span>  libadminpack.0.0.so <span style="color: #ff0000;">'/usr/local/pgsql/lib/adminpack.so'</span></pre></div></div>

<p>10. Load the adminpack.sql into your maintenance and template database</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ psql <span style="color: #660033;">-U</span> postgres <span style="color: #660033;">-d</span> postgres <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>adminpack.sql 
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
...</pre></div></div>

<p>11. Disconnect and Reconnect from pgAdmin3. You shouldn&#8217;t see the window again.</p>
<p>Continue only if you want pgRouting</p>
<p>12. Essentially we would need <a href="http://www.boost.org/">Boost Graph Library (BGL)</a> a.k.a boost, <a href="http://gaul.sourceforge.net/">Genetic Algorithm Utility Library</a> (or, GAUL for short), and GEOS (which we installed earlier when we installed postgis).</p>
<p>13. The easiest way to install boost is using MacPorts.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> boost-jam
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Fetching boost-jam
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Attempting to fetch boost-jam-3.1.16.tgz from http:<span style="color: #000000; font-weight: bold;">//</span>downloads.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>boost
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Verifying checksum<span style="color: #7a0874; font-weight: bold;">&#40;</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">for</span> boost-jam
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Extracting boost-jam
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Configuring boost-jam
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Building boost-jam
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Staging boost-jam into destroot
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Installing boost-jam 3.1.16_0
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Activating boost-jam 3.1.16_0
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Cleaning boost-jam
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Fetching <span style="color: #c20cb9; font-weight: bold;">gmake</span>
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Attempting to fetch make-3.81.tar.bz2 from http:<span style="color: #000000; font-weight: bold;">//</span>ftp.gnu.org<span style="color: #000000; font-weight: bold;">/</span>gnu<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">make</span>
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Verifying checksum<span style="color: #7a0874; font-weight: bold;">&#40;</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">gmake</span>
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Extracting <span style="color: #c20cb9; font-weight: bold;">gmake</span>
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Configuring <span style="color: #c20cb9; font-weight: bold;">gmake</span>
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Building <span style="color: #c20cb9; font-weight: bold;">gmake</span> with target all
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Staging <span style="color: #c20cb9; font-weight: bold;">gmake</span> into destroot
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Installing <span style="color: #c20cb9; font-weight: bold;">gmake</span> <span style="color: #000000;">3.81</span>_0
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Activating <span style="color: #c20cb9; font-weight: bold;">gmake</span> <span style="color: #000000;">3.81</span>_0
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Cleaning <span style="color: #c20cb9; font-weight: bold;">gmake</span>
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Fetching boost
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Attempting to fetch boost_1_34_1.tar.bz2 from http:<span style="color: #000000; font-weight: bold;">//</span>downloads.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>boost
...
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> boost</pre></div></div>

<p>Note: I encountered an error when I directly installed &#8220;sudo port install boost&#8221; on my first run. A quick workaround is to install boost-jam, then install boost afterwards. For more details:</p>
<ul>
<li><a href="http://trac.macosforge.org/projects/macports/ticket/13714">http://trac.macosforge.org/projects/macports/ticket/13714</a></li>
<li><a href="http://trac.macosforge.org/projects/macports/ticket/14043">http://trac.macosforge.org/projects/macports/ticket/14043</a></li>
</ul>
<blockquote><p>Error: Target org.macports.build returned: shell command &#8221; cd &#8220;/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_boost/work/boost_1_34_1&#8243; &#038;&#038; gmake all &#8221; returned error 2 Command output: Makefile:2: *** missing separator.  Stop.</p></blockquote>
<p>14. You can check if boost was successfully installed by&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #660033;">-v</span> installed boost boost-jam
The following ports are currently installed:
  boost <span style="color: #000000; font-weight: bold;">@</span>1.34.1_3+darwin_9 <span style="color: #7a0874; font-weight: bold;">&#40;</span>active<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  boost-jam <span style="color: #000000; font-weight: bold;">@</span>3.1.16_0 <span style="color: #7a0874; font-weight: bold;">&#40;</span>active<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>15. For GAUL, we don&#8217;t need slang base on <a href="http://pgrouting.postlbs.org/wiki/1.x/InstallationManual">http://pgrouting.postlbs.org/wiki/1.x/InstallationManual</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--enable-slang</span>=no
$ <span style="color: #c20cb9; font-weight: bold;">make</span>
$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>16. Ok, so this is the heartbreaker. I was able to get pass cmake on pgRouting on version 1.02 however, I received &#8220;undefined symbols&#8221; when linking the librouting.dylib</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Linking CXX shared library ../../lib/librouting.dylib
Undefined symbols:
  &quot;_errcode&quot;, referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o</pre></div></div>

<p>For the complete error details, see <a href='/wordpress/wp-content/uploads/2008/05/pgrouting_problem.txt'>pgrouting_problem.txt</a></p>
<p>17. Thanks to www.kyngchaos.com, we can install <a href="http://www.kyngchaos.com/files/software/unixport/pgRouting-1.0.1-4.dmg">http://www.kyngchaos.com/files/software/unixport/pgRouting-1.0.1-4.dmg</a> binary from http://www.kyngchaos.com/wiki/software:postgres</p>
<p>18. Now we can load the pgRouting functions to our template database</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">psql <span style="color: #660033;">-U</span> postgres <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>routing_core.sql 
psql <span style="color: #660033;">-U</span> postgres <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>routing_core_wrappers.sql 
psql <span style="color: #660033;">-U</span> postgres <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>routing_dd.sql
psql <span style="color: #660033;">-U</span> postgres <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>routing_dd_wrappers.sql 
psql <span style="color: #660033;">-U</span> postgres <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>routing_dd_tsp.sql
psql <span style="color: #660033;">-U</span> postgres <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>routing_tsp.sql
psql <span style="color: #660033;">-U</span> postgres <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>routing_tsp_wrappers.sql</pre></div></div>

<p>References:</p>
<p>http://developer.apple.com/internet/opensource/postgres.html</p>
<p>http://www2.russbrooks.com:8080/2007/11/4/install-postgresql-on-mac-os-x-10-5-leopard</p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2011/02/installing-postgres83-postgis133-pgrouting-on-macosx-leopard-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSX CheatSheet</title>
		<link>/wordpress/2009/08/mac-softwares-and-cheatsheet/</link>
		<comments>/wordpress/2009/08/mac-softwares-and-cheatsheet/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 01:36:15 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">/wordpress/?p=490</guid>
		<description><![CDATA[1. iTerm &#8211; terminal with tabs. 2. MarsEdit- Blog Software. Im doing a local post on a local wordpress then copying and pasting to a remote wordpress. 3. Mac Shortcuts from http://www.danrodney.com/mac/index.html. Here&#8217;s a local post and another one. 4. How to create an ISO? hdiutil makehybrid -o CS3v1.iso CS3 5. chmOX &#8211; CHM Viewer [...]]]></description>
			<content:encoded><![CDATA[<p>1. <a href="http://iterm.sourceforge.net/download.shtml">iTerm</a> &#8211; terminal with tabs. </p>
<p>2. <a href="http://www.red-sweater.com/marsedit/">MarsEdit</a>- Blog Software. Im doing a local post on a local wordpress then copying and pasting to a remote wordpress.</p>
<p>3. Mac Shortcuts from <a href="http://www.danrodney.com/mac/index.html">http://www.danrodney.com/mac/index.html</a>. Here&#8217;s a <a href="/wordpress/2008/08/mac-shortcuts/">local post</a> and another <a href="/wordpress/2008/11/mac-tip-of-the-day-know-your-shortcuts/">one.</a></p>
<p>4. How to create an ISO?</p>
<pre>hdiutil makehybrid -o CS3v1.iso CS3</pre>
<p>5. <a href="http://chmox.sourceforge.net">chmOX</a> &#8211; CHM Viewer in OSX.</p>
<p>6. <a href="http://code.google.com/p/git-osx-installer/">Git</a> for OS X from google code.</p>
<p>7. Open a finder from terminal</p>
<pre>open .</pre>
<p>8. Keychain Access asking on passwordless ssh?</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh-add</span>
Enter passphrase: <span style="color: #000000; font-weight: bold;">******</span>
<span style="color: #c20cb9; font-weight: bold;">ssh-add</span> <span style="color: #660033;">-l</span> <span style="color: #000000; font-weight: bold;">&lt;</span>To list your identities<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Credits goes to <a href="http://www.danrodney.com/mac/index.html">http://www.danrodney.com/mac/index.html</a></p>
<p><img src="/wordpress/wp-content/uploads/2008/08/picture-17.png" border="0" alt="Picture 1.png" width="651" height="395" /></p>
<p>9. ln -s /Applications/TextMate.app/Contents/Resources/mate /usr/local/bin/mate<span id="more-490"></span><br />
<img src="/wordpress/wp-content/uploads/2008/08/picture-22.png" border="0" alt="Picture 2.png" width="651" height="718" /><br />
<img src="/wordpress/wp-content/uploads/2008/08/picture-31.png" border="0" alt="Picture 3.png" width="650" height="351" /><br />
<img src="/wordpress/wp-content/uploads/2008/08/picture-4.png" border="0" alt="Picture 4.png" width="651" height="727" /><br />
<img src="/wordpress/wp-content/uploads/2008/08/picture-51.png" border="0" alt="Picture 5.png" width="650" height="608" /><br />
<img src="/wordpress/wp-content/uploads/2008/08/picture-6.png" border="0" alt="Picture 6.png" width="651" height="441" /><br />
<img src="/wordpress/wp-content/uploads/2008/08/picture-71.png" border="0" alt="Picture 7.png" width="651" height="748" /><br />
<img src="/wordpress/wp-content/uploads/2008/08/picture-8.png" border="0" alt="Picture 8.png" width="651" height="560" /><br />
<img src="/wordpress/wp-content/uploads/2008/08/picture-9.png" border="0" alt="Picture 9.png" width="651" height="656" /></p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2009/08/mac-softwares-and-cheatsheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac Tip #1: Create ISO</title>
		<link>/wordpress/2009/08/mac-tip-1-create-iso/</link>
		<comments>/wordpress/2009/08/mac-tip-1-create-iso/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 14:00:50 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://gismobiledev.wordpress.com/?p=57</guid>
		<description><![CDATA[This one has been lurking in my drafts folder&#8230; Might as well post it. 1. Create an iso rupert:Desktop rupert$ hdiutil makehybrid -o CS3v1.iso CS3 Creating hybrid image... .............................................................................. rupert:Desktop rupert$ 2. Open Disk Utility -&#62; Burn -&#62; Select image from [1]]]></description>
			<content:encoded><![CDATA[<p>This one has been lurking in my drafts folder&#8230; Might as well post it.</p>
<p><strong>1. Create an iso</strong></p>
<pre>
rupert:Desktop rupert$ hdiutil makehybrid -o CS3v1.iso CS3
Creating hybrid image...
..............................................................................
rupert:Desktop rupert$
</pre>
<p><strong>2. Open Disk Utility -&gt; Burn -&gt; Select image from [1]</strong></p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2009/08/mac-tip-1-create-iso/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox crashes on my Mac caused by Java Applet VM</title>
		<link>/wordpress/2008/12/firefox-crashes-on-my-mac-caused-by-java-applet-vm/</link>
		<comments>/wordpress/2008/12/firefox-crashes-on-my-mac-caused-by-java-applet-vm/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 03:59:30 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">/wordpress/?p=315</guid>
		<description><![CDATA[After manually updating to Java MacOSX10.5 Update 2 two months ago, I noticed something weird with my Firefox. At first, I ignored it, &#8220;heh must be a screwed-up page Im trying to open&#8230;&#8221; But lately, I noticed that most of the pages I am opening with Java applets crashes consistently. So here is the culprit, [...]]]></description>
			<content:encoded><![CDATA[<p>After manually updating to Java MacOSX10.5 Update 2 two months ago, I noticed something weird with my Firefox. At first, I ignored it, &#8220;heh must be a screwed-up page Im trying to open&#8230;&#8221; But lately, I noticed that most of the pages I am opening with Java applets crashes consistently. So here is the culprit, try to delete java caches if there are any&#8230;</p>
<p>Trying to figure out which version of the java applet being used by FF<br />
<img src="/wordpress/wp-content/uploads/2008/12/picture-12.png" alt="Picture 1.png" border="0" width="616" height="523" /></p>
<p><img src="/wordpress/wp-content/uploads/2008/12/picture-21.png" alt="Picture 2.png" border="0" width="524" height="380" /></p>
<p>Deleting the cache.. Go to<br />
/Application/Utilities/Java/ and launch Java Preferences.app or you could seach for &#8220;java preferences&#8221; in spotlight.</p>
<p><img src="/wordpress/wp-content/uploads/2008/12/picture-3.png" alt="Picture 3.png" border="0" width="673" height="457" /></p>
<p>If the problem still persist, I bet we can trim down which java versions to use&#8230;</p>
<p><img src="/wordpress/wp-content/uploads/2008/12/picture-4.png" alt="Picture 4.png" border="0" width="675" height="456" /></p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/12/firefox-crashes-on-my-mac-caused-by-java-applet-vm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails Note #12: Oracle on Intel Mac</title>
		<link>/wordpress/2008/12/ruby-and-rails-oracle-on-intel-mac/</link>
		<comments>/wordpress/2008/12/ruby-and-rails-oracle-on-intel-mac/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 07:52:28 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">/wordpress/?p=307</guid>
		<description><![CDATA[1. Read http://www.foliosus.com/2008/05/05/connecting-ruby-on-rails-to-oracle-on-an-intel-mac-in-leopard-take-2/ 2. Install Oracle Instant Client on Mac. a. Instant Client Package &#8211; Basic: All files required to run OCI, OCCI, and JDBC-OCI applications - instantclient-basic-macosx-10.2.0.4.0.zip (34,020,719 bytes) b. *Instant Client Package &#8211; SDK: Additional header files and an example makefile for developing Oracle applications with Instant Client instantclient-sdk-macosx-10.2.0.4.0.zip (603,493 bytes) OR download [...]]]></description>
			<content:encoded><![CDATA[<p>1.  Read <a href="http://www.foliosus.com/2008/05/05/connecting-ruby-on-rails-to-oracle-on-an-intel-mac-in-leopard-take-2/">http://www.foliosus.com/2008/05/05/connecting-ruby-on-rails-to-oracle-on-an-intel-mac-in-leopard-take-2/</a></p>
<p>2. Install <a href="http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/intel_macsoft.html">Oracle Instant Client on Mac</a>. </p>
<p>a. Instant Client Package &#8211; Basic: All files required to run OCI, OCCI, and JDBC-OCI applications<br />
- instantclient-basic-macosx-10.2.0.4.0.zip (34,020,719 bytes)</p>
<p>b. *Instant Client Package &#8211; SDK: Additional header files and an example makefile for developing Oracle applications with Instant Client<br />
instantclient-sdk-macosx-10.2.0.4.0.zip (603,493 bytes) </p>
<p>OR download the <a href="/installers/oracle/10.2.0.4.zip">whole bundle (10.2.0.4.zip)</a> with sqlplus installed from my installers.</p>
<p>3. Put this on your sudo vim ~/.bash_profile.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">ORACLE_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Oracle<span style="color: #000000; font-weight: bold;">/</span>instantclient<span style="color: #000000; font-weight: bold;">/</span>10.2.0.4
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">TNS_ADMIN</span>=<span style="color: #007800;">$ORACLE_HOME</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LD_LIBRARY_PATH</span>=<span style="color: #007800;">$ORACLE_HOME</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">DYLD_LIBRARY_PATH</span>=<span style="color: #007800;">$ORACLE_HOME</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$PATH</span>:<span style="color: #007800;">$ORACLE_HOME</span></pre></div></div>

<p>4. Make a symbolic link</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Oracle<span style="color: #000000; font-weight: bold;">/</span>instantclient<span style="color: #000000; font-weight: bold;">/</span>10.2.0.4
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> libclntsh.dylib.10.1 libclntsh.dylib</pre></div></div>

<p>5. Go to /Library/Oracle/instantclient/10.2.0.4 and edit tnsnames.ora. Point the Oracle SID to the IP where you installed Oracle.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.155)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )   
  )
&nbsp;
&nbsp;
ORCL_2_11 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.11)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )   
  )</pre></div></div>

<p>6. Install the oracle-adapter for rails</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> activerecord-oracle-adapter <span style="color: #660033;">--source</span> http:<span style="color: #000000; font-weight: bold;">//</span>gems.rubyonrails.org</pre></div></div>

<p>7. In your database.yml file</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">development:
  adapter: oracle
  database: orcl
  username: youzhu_mobile_dev
  password: your_password</pre></div></div>

<p>or browse the contents of a sample rails project <a href="/wordpress/wp-content/uploads/2008/12/youzhumobiletar.gz" title="youzhumobile.tar.gz">youzhumobile.tar.gz</a> </p>
<p>8. If you ever encounter an <strong>encoding problem</strong>, then we need to set the NLS_LANG environment variable before running <em>script/server</em>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># export NLS_LANG=American_America.UTF8</span>
<span style="color: #666666; font-style: italic;"># script/server</span></pre></div></div>

<p>or I prefer setting it in the environment.rb</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#6666ff; font-weight:bold;">Rails::Initializer</span>.<span style="color:#9900CC;">run</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>config<span style="color:#006600; font-weight:bold;">|</span>
  ENV<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'NLS_LANG'</span><span style="color:#006600; font-weight:bold;">&#93;</span>=<span style="color:#996600;">'American_America.UTF8'</span>
  <span style="color:#008000; font-style:italic;"># Settings in config/environments/* take precedence over those specified here.</span></pre></div></div>

<p>Note: <a href="/wordpress/?p=228">If you don&#8217;t know your database encoding, then read this post.</a></p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/12/ruby-and-rails-oracle-on-intel-mac/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mac Tip Of the Day: Viewing CHM + iTerm Bookmarks</title>
		<link>/wordpress/2008/11/mac-tip-of-the-day-viewing-chm-iterm-bookmarks/</link>
		<comments>/wordpress/2008/11/mac-tip-of-the-day-viewing-chm-iterm-bookmarks/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 12:59:09 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">/wordpress/?p=287</guid>
		<description><![CDATA[1. http://chmox.sourceforge.net/ &#8211; Let me view CHM files in OSX. 2. iTerm Bookmarks Example: 1. Pressing [CTRL] + [COMMAND] + [R] goes to &#8220;/opt/ruby&#8221; directory 2. Pressing [CTRL] + [COMMAND] + [s], opens up an SSH terminal by specifying the PORT and IP.]]></description>
			<content:encoded><![CDATA[<p>1. http://chmox.sourceforge.net/ &#8211; Let me view CHM files in OSX. </p>
<p>2. iTerm Bookmarks</p>
<p><img src="/wordpress/wp-content/uploads/2008/11/picture-11.png" alt="Picture 1.png" border="0" width="774" height="280" /></p>
<p>Example:<br />
1. Pressing [CTRL] + [COMMAND] + [R] goes to &#8220;/opt/ruby&#8221; directory</p>
<p>2. Pressing [CTRL] + [COMMAND] + [s], opens up an SSH terminal by specifying the <em>PORT</em> and <em>IP</em>.</p>
<p><img src="/wordpress/wp-content/uploads/2008/11/port.png" alt="port.png" border="0" width="348" height="121" /></p>
<p><img src="/wordpress/wp-content/uploads/2008/11/ip.png" alt="ip.png" border="0" width="349" height="123" /></p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/11/mac-tip-of-the-day-viewing-chm-iterm-bookmarks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac Tip Of the Day: Know your keyboard</title>
		<link>/wordpress/2008/11/mac-tip-of-the-day-know-your-shortcuts/</link>
		<comments>/wordpress/2008/11/mac-tip-of-the-day-know-your-shortcuts/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 05:26:54 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">/wordpress/?p=281</guid>
		<description><![CDATA[1. Thanks to Chester for this one&#8230; 2. You can drag an image from a browser right to your desktop. This is faster than doing [Command] + [SHIFT] + F4 then cropping the picture out of the webpage..]]></description>
			<content:encoded><![CDATA[<p>1. Thanks to Chester for this one&#8230;</p>
<p><img src="/wordpress/wp-content/uploads/2008/11/mac-keyboard-shortcuts.png" alt="mac_keyboard_shortcuts.png" border="0" width="505" height="185" /></p>
<p>2. You can drag an image from a browser right to your desktop. This is faster than doing [Command] + [SHIFT] + F4 then cropping the picture out of the webpage..</p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/11/mac-tip-of-the-day-know-your-shortcuts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac Shortcuts</title>
		<link>/wordpress/2008/08/mac-shortcuts/</link>
		<comments>/wordpress/2008/08/mac-shortcuts/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 17:47:46 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">/wordpress/?p=239</guid>
		<description><![CDATA[Credits goes to http://www.danrodney.com/mac/index.html]]></description>
			<content:encoded><![CDATA[<p>Credits goes to <a href="http://www.danrodney.com/mac/index.html">http://www.danrodney.com/mac/index.html</a></p>
<p><img src="/wordpress/wp-content/uploads/2008/08/picture-17.png" border="0" alt="Picture 1.png" width="651" height="395" /><span id="more-239"></span><br />
<img src="/wordpress/wp-content/uploads/2008/08/picture-22.png" border="0" alt="Picture 2.png" width="651" height="718" /><br />
<img src="/wordpress/wp-content/uploads/2008/08/picture-31.png" border="0" alt="Picture 3.png" width="650" height="351" /><br />
<img src="/wordpress/wp-content/uploads/2008/08/picture-4.png" border="0" alt="Picture 4.png" width="651" height="727" /><br />
<img src="/wordpress/wp-content/uploads/2008/08/picture-51.png" border="0" alt="Picture 5.png" width="650" height="608" /><br />
<img src="/wordpress/wp-content/uploads/2008/08/picture-6.png" border="0" alt="Picture 6.png" width="651" height="441" /><br />
<img src="/wordpress/wp-content/uploads/2008/08/picture-71.png" border="0" alt="Picture 7.png" width="651" height="748" /><br />
<img src="/wordpress/wp-content/uploads/2008/08/picture-8.png" border="0" alt="Picture 8.png" width="651" height="560" /><br />
<img src="/wordpress/wp-content/uploads/2008/08/picture-9.png" border="0" alt="Picture 9.png" width="651" height="656" /></p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/08/mac-shortcuts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MacOSX Utilities: iTerm + MarsEdit</title>
		<link>/wordpress/2008/07/macosx-utilities-iterm-marsedit/</link>
		<comments>/wordpress/2008/07/macosx-utilities-iterm-marsedit/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 15:25:22 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">/wordpress/?p=207</guid>
		<description><![CDATA[Just a quick note before I go home tonight&#8230; 1. Replace your current terminal with iTerm. 2. MarsEdit rocks! Ive been posting lazy and all but with this blog client at hand.. blog posting is easier. Way way better compared to ecto!! (IMHO).]]></description>
			<content:encoded><![CDATA[<p>Just a quick note before I go home tonight&#8230;</p>
<p>1. Replace your current terminal with <a href="http://iterm.sourceforge.net/download.shtml">iTerm</a>.</p>
<p>2. <a href="http://www.red-sweater.com/marsedit/">MarsEdit</a> rocks! Ive been posting lazy and all but with this blog client at hand.. blog posting is easier. Way way better compared to ecto!! (IMHO). </p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/07/macosx-utilities-iterm-marsedit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Mapserver on MacOSX (by source)</title>
		<link>/wordpress/2008/07/installing-mapserver-on-macosx-by-source/</link>
		<comments>/wordpress/2008/07/installing-mapserver-on-macosx-by-source/#comments</comments>
		<pubDate>Sat, 26 Jul 2008 02:03:16 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[mapserver]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[leopard]]></category>

		<guid isPermaLink="false">/wordpress/?p=195</guid>
		<description><![CDATA[Just noticed that William of kyngchaos has updated the mapserver binary for MacOSX. But right now, I need to tile these images bought from GeoEye, so I need TIFF support. Below is a summary of getting Mapserver installed by source. Note that I have the necessary GEOS, GDAL from kyngchaos as well from this ealier [...]]]></description>
			<content:encoded><![CDATA[<p>Just noticed that <a href="http://www.kyngchaos.com/wiki/software:mapserver">William of kyngchaos has updated the mapserver binary</a> for MacOSX.</p>
<p>But right now, I need to tile these images bought from GeoEye, so I need TIFF support. Below is a summary of getting Mapserver installed by source. Note that I have the necessary GEOS, GDAL from kyngchaos as well from this ealier post.</p>
<p>1. Download the ff files:<br />
<code>-rw-r--r--@ 1 rupert  admin   564313 Jul 26 10:32 agg-2.5.tar.gz<br />
-rw-r--r--@ 1 rupert  admin  1345700 Jul 26 10:22 gd-2.0.35.tar.gz<br />
-rw-r--r--@ 1 rupert  admin   613261 Jul 26 10:22 jpegsrc.v6b.tar.gz<br />
-rw-r--r--@ 1 rupert  admin   796551 Jul 26 10:22 libpng-1.2.29.tar.gz<br />
-rw-r--r--@ 1 rupert  admin  1948751 Jul 26 09:55 mapserver-5.2.0.tar.gz<br />
-rw-r--r--@ 1 rupert  admin  1336295 Jul 26 11:11 tiff-3.8.2.tar.gz</code></p>
<p>2. Install in the ff order:</p>
<p>- <a href="http://www.sfr-fresh.com/unix/misc/jpegsrc.v6b.tar.gz">jpegsrc</a><br />
- <a href="http://libpng.sourceforge.net/">libpng</a><br />
- <a href="http://www.libgd.org/Downloads">gd</a> (if you have trouble installing gd, then follow this pdf:<a href='/wordpress/wp-content/uploads/2008/07/installing_gd2_on_os_x_server.pdf'>installing_gd2_on_os_x_server</a>)<br />
- <a href="http://www.antigrain.com/agg-2.5.tar.gz">agg</a> (<em>make</em> only)<br />
- <a href="http://www.libtiff.org/">tiff</a><br />
- mapserver</p>
<p>3. For mapserver, please install using the ff configure switches:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>configure \
<span style="color: #660033;">--with-agg</span>=<span style="color: #000000; font-weight: bold;">/</span>myhome<span style="color: #000000; font-weight: bold;">/</span>rupert<span style="color: #000000; font-weight: bold;">/</span>mapserver<span style="color: #000000; font-weight: bold;">/</span>agg-<span style="color: #000000;">2.5</span> \
<span style="color: #660033;">--with-jpeg</span> \
<span style="color: #660033;">--with-gd</span> \
<span style="color: #660033;">--with-freetype</span> \
<span style="color: #660033;">--with-png</span> \
<span style="color: #660033;">--with-ogr</span> \
<span style="color: #660033;">--with-proj</span> \
<span style="color: #660033;">--with-gd</span> \
<span style="color: #660033;">--with-httpd</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>httpd \
<span style="color: #660033;">--with-tiff</span> \
<span style="color: #660033;">--with-wfs</span> \
<span style="color: #660033;">--with-wcs</span> \
<span style="color: #660033;">--with-sos</span> \
<span style="color: #660033;">--with-wmsclient</span> \
<span style="color: #660033;">--with-wfsclient</span> \
<span style="color: #660033;">--with-tiff</span> \
<span style="color: #660033;">--with-gdal</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gdal<span style="color: #000000; font-weight: bold;">/</span>gdal-config \
<span style="color: #660033;">--with-geos</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>geos-config \
<span style="color: #660033;">--with-postgis</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>pg_config</pre></div></div>

<p>4. Mapserver output</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rupert:mapserver-5.2.0 rupert$ .<span style="color: #000000; font-weight: bold;">/</span>mapserv <span style="color: #660033;">-v</span>
MapServer version 5.2.0 <span style="color: #007800;">OUTPUT</span>=GIF <span style="color: #007800;">OUTPUT</span>=PNG <span style="color: #007800;">OUTPUT</span>=JPEG <span style="color: #007800;">OUTPUT</span>=WBMP <span style="color: #007800;">OUTPUT</span>=SVG <span style="color: #007800;">SUPPORTS</span>=PROJ <span style="color: #007800;">SUPPORTS</span>=AGG <span style="color: #007800;">SUPPORTS</span>=FREETYPE <span style="color: #007800;">SUPPORTS</span>=ICONV <span style="color: #007800;">SUPPORTS</span>=WMS_SERVER <span style="color: #007800;">SUPPORTS</span>=WMS_CLIENT <span style="color: #007800;">SUPPORTS</span>=WFS_SERVER <span style="color: #007800;">SUPPORTS</span>=WFS_CLIENT <span style="color: #007800;">SUPPORTS</span>=WCS_SERVER <span style="color: #007800;">SUPPORTS</span>=SOS_SERVER <span style="color: #007800;">SUPPORTS</span>=GEOS <span style="color: #007800;">INPUT</span>=TIFF <span style="color: #007800;">INPUT</span>=EPPL7 <span style="color: #007800;">INPUT</span>=POSTGIS <span style="color: #007800;">INPUT</span>=OGR <span style="color: #007800;">INPUT</span>=GDAL <span style="color: #007800;">INPUT</span>=SHAPEFILE</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/07/installing-mapserver-on-macosx-by-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Mapserver on MacOSX Leopard (the easy way)</title>
		<link>/wordpress/2008/05/installing-mapserver-on-macosx-leopard-the-easy-way/</link>
		<comments>/wordpress/2008/05/installing-mapserver-on-macosx-leopard-the-easy-way/#comments</comments>
		<pubDate>Tue, 06 May 2008 13:01:09 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[mapserver]]></category>
		<category><![CDATA[leopard]]></category>

		<guid isPermaLink="false">/wordpress/?p=178</guid>
		<description><![CDATA[The easiest way to install mapserver on your Leopard is by downloading and installing dmg files from www.kyngchaos.com (courtesy of William Kyngesburye). These binaries were also noted from Mapserver&#8217;s Download Page. 1. Download the ff binaries in order (please note the version numbers at the time of writing): 1. UnixImageIO_Framework-1.0.22a.dmg 2. FreeType_Framework-2.3.5-3.dmg 3. GEOS_Framework-3.0.0-2.dmg 4. [...]]]></description>
			<content:encoded><![CDATA[<p>The easiest way to install mapserver on your Leopard is by downloading and installing dmg files from <a href="http://http://www.kyngchaos.com/wiki/software:mapserver">www.kyngchaos.com (courtesy of William Kyngesburye)</a>. These binaries were also noted from <a href="http://mapserver.gis.umn.edu/download/current">Mapserver&#8217;s Download Page.</a></p>
<p>1. Download the ff binaries in order (please note the version numbers at the time of writing):</p>
<p>1. <a href="http://www.kyngchaos.com/files/software/unixport/UnixImageIO_Framework-1.0.22a.dmg">UnixImageIO_Framework-1.0.22a.dmg</a><br />
2. <a href="http://www.kyngchaos.com/files/software/unixport/FreeType_Framework-2.3.5-3.dmg">FreeType_Framework-2.3.5-3.dmg</a><br />
3. <a href="http://www.kyngchaos.com/files/software/unixport/GEOS_Framework-3.0.0-2.dmg">GEOS_Framework-3.0.0-2.dmg</a><br />
4. <a href="http://www.kyngchaos.com/files/software/unixport/PROJ_Framework-4.6.0-1.dmg">PROJ_Framework-4.6.0-1.dmg</a><br />
5. <a href="http://www.kyngchaos.com/files/software/unixport/SQLite3_Framework-3.5.7-1.dmg">SQLite3_Framework-3.5.7-1.dmg</a><br />
6. <a href="http://www.kyngchaos.com/files/software/unixport/MapServer-5.0.2-2.dmg">MapServer-5.0.2-2.dmg</a></p>
<p>2. Once installed, you can copy the mapserv binaries to your apache cgi-bin</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>WebServer<span style="color: #000000; font-weight: bold;">/</span>CGI-Executables<span style="color: #000000; font-weight: bold;">/</span>mapserv <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>3. Check the mapserv output</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rupert:~ rupert$ <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span>mapserv <span style="color: #660033;">-v</span>
MapServer version 5.0.2 <span style="color: #007800;">OUTPUT</span>=GIF <span style="color: #007800;">OUTPUT</span>=PNG <span style="color: #007800;">OUTPUT</span>=JPEG <span style="color: #007800;">OUTPUT</span>=WBMP <span style="color: #007800;">OUTPUT</span>=SWF <span style="color: #007800;">OUTPUT</span>=SVG <span style="color: #007800;">SUPPORTS</span>=PROJ <span style="color: #007800;">SUPPORTS</span>=AGG <span style="color: #007800;">SUPPORTS</span>=FREETYPE <span style="color: #007800;">SUPPORTS</span>=WMS_SERVER <span style="color: #007800;">SUPPORTS</span>=WMS_CLIENT <span style="color: #007800;">SUPPORTS</span>=WFS_SERVER <span style="color: #007800;">SUPPORTS</span>=WFS_CLIENT <span style="color: #007800;">SUPPORTS</span>=WCS_SERVER <span style="color: #007800;">SUPPORTS</span>=SOS_SERVER <span style="color: #007800;">SUPPORTS</span>=FASTCGI <span style="color: #007800;">SUPPORTS</span>=GEOS <span style="color: #007800;">INPUT</span>=EPPL7 <span style="color: #007800;">INPUT</span>=POSTGIS <span style="color: #007800;">INPUT</span>=OGR <span style="color: #007800;">INPUT</span>=GDAL <span style="color: #007800;">INPUT</span>=SHAPEFILE</pre></div></div>

<p>This is actually the first time I was able to install mapserver NOT BY SOURCE and still achieve the same binaries that I wanted (with AGG support). Full credit should be given to William.</p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/05/installing-mapserver-on-macosx-leopard-the-easy-way/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing Postgres8.3,8.4, Postgis1.3.3,1.4.1, pgRouting on MacOSX Leopard</title>
		<link>/wordpress/2008/05/installing-postgres83-postgis133-pgrouting-on-macosx-leopard/</link>
		<comments>/wordpress/2008/05/installing-postgres83-postgis133-pgrouting-on-macosx-leopard/#comments</comments>
		<pubDate>Thu, 01 May 2008 08:36:57 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[pgRouting]]></category>
		<category><![CDATA[postgis]]></category>
		<category><![CDATA[postgres]]></category>

		<guid isPermaLink="false">/wordpress/?p=173</guid>
		<description><![CDATA[References: http://developer.apple.com/internet/opensource/postgres.html http://www2.russbrooks.com:8080/2007/11/4/install-postgresql-on-mac-os-x-10-5-leopard Warning: Most of the packages listed below is installed by source. 1. Download the current postgres source. 8.3: $./configure --with-prefix=/usr/local/pgsql --with-python &#160; 8.4: $./configure --prefix=/usr/local/pgsql --with-python &#160; $make $sudo make install 2. Don&#8217;t delete the postgres folder. You might need this later on for future compilations. See pgadmin3 admin pack below. 3. [...]]]></description>
			<content:encoded><![CDATA[<p>References:</p>
<p>http://developer.apple.com/internet/opensource/postgres.html</p>
<p>http://www2.russbrooks.com:8080/2007/11/4/install-postgresql-on-mac-os-x-10-5-leopard</p>
<p><strong>Warning: Most of the packages listed below is installed by source.</strong></p>
<p>1. Download the current postgres source.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">8.3</span>:
$.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql <span style="color: #660033;">--with-python</span>
&nbsp;
<span style="color: #000000;">8.4</span>:
$.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql <span style="color: #660033;">--with-python</span>
&nbsp;
<span style="color: #007800;">$make</span>
<span style="color: #007800;">$sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>2. Don&#8217;t delete the postgres folder. You might need this later on for future compilations. See pgadmin3 admin pack below.</p>
<p>3. Add a postgres user from <strong>System Preferences &gt; Accounts</strong></p>
<p>4. Initialize the data directory</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">$mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>data
<span style="color: #007800;">$chown</span> postgres <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #007800;">$su</span> - postgres
$<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>initdb <span style="color: #660033;">-E</span> utf8 <span style="color: #660033;">-D</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>data</pre></div></div>

<blockquote>
<pre>
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.
The default text search configuration will be set to "english".

fixing permissions on existing directory /usr/local/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 20
selecting default shared_buffers/max_fsm_pages ... 2400kB/20000
creating configuration files ... ok
creating template1 database in /usr/local/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data
or
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
</pre>
</blockquote>
<p>4. Install Postgis<br />
- install geos with the standard ./configure -> make -> make install<br />
- then install postgis</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">8.3</span>:
$.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-pgsql</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>pg_config <span style="color: #660033;">--with-geos</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>geos-config
&nbsp;
<span style="color: #000000;">8.4</span> using Kyngchaos GEOS Framework:
$.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-pgsql</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>pg_config <span style="color: #660033;">--with-geosconfig</span>=<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Frameworks<span style="color: #000000; font-weight: bold;">/</span>GEOS.framework<span style="color: #000000; font-weight: bold;">/</span>unix<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>geos-config
&nbsp;
<span style="color: #007800;">$make</span>
<span style="color: #007800;">$sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>5. Starting postgres on boot. Download <a href='/wordpress/wp-content/uploads/2008/05/postgresstartup.tar.gz'>postgresstartup.tar.gz</a> then extract to your /Library/StartupItems</p>
<p>6. Creating the database</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">createdb <span style="color: #660033;">-E</span> utf8 template_postgis
createlang plpgsql template_postgis
&nbsp;
<span style="color: #000000;">8.3</span>:
psql <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>lwpostgis.sql
psql <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>spatial_ref_sys.sql
&nbsp;
<span style="color: #000000;">8.4</span>:
psql <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>postgis.sql 
psql <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>spatial_ref_sys.sql</pre></div></div>

<p>7. Install and download pgAdmin3 for MacOS X </p>
<p><a href="http://www.postgresql.org/ftp/pgadmin3/release/">http://www.postgresql.org/ftp/pgadmin3/release/</a></p>
<p>8. Startup pgadmin3. You will notice there is a window stating&#8230;</p>
<blockquote><p>Server instrumentation<br />
The server lacks instrumentation functions.<br />
pgAdmin III uses some support functions that are not available by default in all PostgreSQL versions. These enable some tasks that make life easier when dealing with log files and configuration files. </p></blockquote>
<p>9. Compile the adminpack. Go to $postgresql_install_directory/contrib/adminpack</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">gcc</span> <span style="color: #660033;">-no-cpp-precomp</span> <span style="color: #660033;">-O2</span> <span style="color: #660033;">-Wall</span> <span style="color: #660033;">-Wmissing-prototypes</span> <span style="color: #660033;">-Wpointer-arith</span> <span style="color: #660033;">-Winline</span> <span style="color: #660033;">-Wdeclaration-after-statement</span> <span style="color: #660033;">-Wendif-labels</span> <span style="color: #660033;">-fno-strict-aliasing</span> <span style="color: #660033;">-fwrapv</span>  <span style="color: #660033;">-bundle</span> -multiply_defined suppress  adminpack.o  -L..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>port -bundle_loader ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>backend<span style="color: #000000; font-weight: bold;">/</span>postgres  <span style="color: #660033;">-o</span> libadminpack.0.0.so
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> libadminpack.0.so
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> libadminpack.0.0.so libadminpack.0.so
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> libadminpack.so
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> libadminpack.0.0.so libadminpack.so
&nbsp;
rupert:adminpack rupert$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
Password:
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib
<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sh</span> ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>install-sh <span style="color: #660033;">-c</span> <span style="color: #660033;">-m</span> <span style="color: #000000;">644</span> .<span style="color: #000000; font-weight: bold;">/</span>uninstall_adminpack.sql <span style="color: #ff0000;">'/usr/local/pgsql/share/contrib'</span>
<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sh</span> ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>install-sh <span style="color: #660033;">-c</span> <span style="color: #660033;">-m</span> <span style="color: #000000;">644</span> adminpack.sql <span style="color: #ff0000;">'/usr/local/pgsql/share/contrib'</span>
<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sh</span> ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>install-sh <span style="color: #660033;">-c</span> <span style="color: #660033;">-m</span> <span style="color: #000000;">755</span>  libadminpack.0.0.so <span style="color: #ff0000;">'/usr/local/pgsql/lib/adminpack.so'</span></pre></div></div>

<p>10. Load the adminpack.sql into your maintenance and template database</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ psql <span style="color: #660033;">-U</span> postgres <span style="color: #660033;">-d</span> postgres <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>adminpack.sql 
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
...</pre></div></div>

<p>11. Disconnect and Reconnect from pgAdmin3. You shouldn&#8217;t see the window again.</p>
<p>Continue only if you want pgRouting</p>
<p>12. Essentially we would need <a href="http://www.boost.org/">Boost Graph Library (BGL)</a> a.k.a boost, <a href="http://gaul.sourceforge.net/">Genetic Algorithm Utility Library</a> (or, GAUL for short), and GEOS (which we installed earlier when we installed postgis).</p>
<p>13. The easiest way to install boost is using MacPorts.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> boost-jam
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Fetching boost-jam
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Attempting to fetch boost-jam-3.1.16.tgz from http:<span style="color: #000000; font-weight: bold;">//</span>downloads.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>boost
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Verifying checksum<span style="color: #7a0874; font-weight: bold;">&#40;</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">for</span> boost-jam
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Extracting boost-jam
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Configuring boost-jam
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Building boost-jam
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Staging boost-jam into destroot
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Installing boost-jam 3.1.16_0
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Activating boost-jam 3.1.16_0
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Cleaning boost-jam
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Fetching <span style="color: #c20cb9; font-weight: bold;">gmake</span>
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Attempting to fetch make-3.81.tar.bz2 from http:<span style="color: #000000; font-weight: bold;">//</span>ftp.gnu.org<span style="color: #000000; font-weight: bold;">/</span>gnu<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">make</span>
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Verifying checksum<span style="color: #7a0874; font-weight: bold;">&#40;</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">gmake</span>
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Extracting <span style="color: #c20cb9; font-weight: bold;">gmake</span>
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Configuring <span style="color: #c20cb9; font-weight: bold;">gmake</span>
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Building <span style="color: #c20cb9; font-weight: bold;">gmake</span> with target all
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Staging <span style="color: #c20cb9; font-weight: bold;">gmake</span> into destroot
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Installing <span style="color: #c20cb9; font-weight: bold;">gmake</span> <span style="color: #000000;">3.81</span>_0
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Activating <span style="color: #c20cb9; font-weight: bold;">gmake</span> <span style="color: #000000;">3.81</span>_0
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Cleaning <span style="color: #c20cb9; font-weight: bold;">gmake</span>
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Fetching boost
---<span style="color: #000000; font-weight: bold;">&gt;</span>  Attempting to fetch boost_1_34_1.tar.bz2 from http:<span style="color: #000000; font-weight: bold;">//</span>downloads.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>boost
...
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> boost</pre></div></div>

<p>Note: I encountered an error when I directly installed &#8220;sudo port install boost&#8221; on my first run. A quick workaround is to install boost-jam, then install boost afterwards. For more details:</p>
<ul>
<li><a href="http://trac.macosforge.org/projects/macports/ticket/13714">http://trac.macosforge.org/projects/macports/ticket/13714</a></li>
<li><a href="http://trac.macosforge.org/projects/macports/ticket/14043">http://trac.macosforge.org/projects/macports/ticket/14043</a></li>
</ul>
<blockquote><p>Error: Target org.macports.build returned: shell command &#8221; cd &#8220;/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_boost/work/boost_1_34_1&#8243; &#038;&#038; gmake all &#8221; returned error 2 Command output: Makefile:2: *** missing separator.  Stop.</p></blockquote>
<p>14. You can check if boost was successfully installed by&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #660033;">-v</span> installed boost boost-jam
The following ports are currently installed:
  boost <span style="color: #000000; font-weight: bold;">@</span>1.34.1_3+darwin_9 <span style="color: #7a0874; font-weight: bold;">&#40;</span>active<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  boost-jam <span style="color: #000000; font-weight: bold;">@</span>3.1.16_0 <span style="color: #7a0874; font-weight: bold;">&#40;</span>active<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>15. For GAUL, we don&#8217;t need slang base on <a href="http://pgrouting.postlbs.org/wiki/1.x/InstallationManual">http://pgrouting.postlbs.org/wiki/1.x/InstallationManual</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--enable-slang</span>=no
$ <span style="color: #c20cb9; font-weight: bold;">make</span>
$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>16. Ok, so this is the heartbreaker. I was able to get pass cmake on pgRouting on version 1.02 however, I received &#8220;undefined symbols&#8221; when linking the librouting.dylib</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Linking CXX shared library ../../lib/librouting.dylib
Undefined symbols:
  &quot;_errcode&quot;, referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o</pre></div></div>

<p>For the complete error details, see <a href='/wordpress/wp-content/uploads/2008/05/pgrouting_problem.txt'>pgrouting_problem.txt</a></p>
<p>17. Thanks to www.kyngchaos.com, we can install <a href="http://www.kyngchaos.com/files/software/unixport/pgRouting-1.0.1-4.dmg">http://www.kyngchaos.com/files/software/unixport/pgRouting-1.0.1-4.dmg</a> binary from http://www.kyngchaos.com/wiki/software:postgres</p>
<p>18. Now we can load the pgRouting functions to our template database</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">psql <span style="color: #660033;">-U</span> postgres <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>routing_core.sql 
psql <span style="color: #660033;">-U</span> postgres <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>routing_core_wrappers.sql 
psql <span style="color: #660033;">-U</span> postgres <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>routing_dd.sql
psql <span style="color: #660033;">-U</span> postgres <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>routing_dd_wrappers.sql 
psql <span style="color: #660033;">-U</span> postgres <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>routing_dd_tsp.sql
psql <span style="color: #660033;">-U</span> postgres <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>routing_tsp.sql
psql <span style="color: #660033;">-U</span> postgres <span style="color: #660033;">-d</span> template_postgis <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>pgsql<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>routing_tsp_wrappers.sql</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>/wordpress/2008/05/installing-postgres83-postgis133-pgrouting-on-macosx-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

