<?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>stiefels.net &#187; leopard</title>
	<atom:link href="http://www.stiefels.net/tag/leopard/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stiefels.net</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 20 Sep 2009 10:39:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Building PostgreSQL on Leopard</title>
		<link>http://www.stiefels.net/2007/11/22/building-postgresql-on-leopard/</link>
		<comments>http://www.stiefels.net/2007/11/22/building-postgresql-on-leopard/#comments</comments>
		<pubDate>Thu, 22 Nov 2007 10:41:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Un*x]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.stiefels.net/2007/11/22/building-postgresql-on-leopard/</guid>
		<description><![CDATA[As you might know the [PostgreSQL Global Development Group](http://www.postgresql.org) is currently working on the final version of the PostgreSQL Database Management System (DBMS) 8.3 which has some nice features. Unfortunately, there is no prebuilt package available for Mac OS X of the current beta versions. But fortunately building PostgreSQL is very easy on Leopard:

## Requirements
This [...]]]></description>
			<content:encoded><![CDATA[<p>As you might know the [PostgreSQL Global Development Group](http://www.postgresql.org) is currently working on the final version of the PostgreSQL Database Management System (DBMS) 8.3 which has some nice features. Unfortunately, there is no prebuilt package available for Mac OS X of the current beta versions. But fortunately building PostgreSQL is very easy on Leopard:<br />
<span id="more-70"></span></p>
<p>## Requirements<br />
This short tutorial requires you to have Mac OS X Leopard (it also may work with Tiger) installed on your system along with the [Xcode tools](http://developer.apple.com/tools/xcode/).</p>
<p>## Getting the sources<br />
The sources of PostgreSQL are free available from one of the mirrors listed [here](http://wwwmaster.postgresql.org/download/mirrors-ftp). Download the current beta from the *source* directory and unpack it.</p>
<p>## Configuring<br />
Before you can start the actual build process, you have to generate the Makefiles. This is done by running the included **configure** script with optional parameters. Available parameters can be listed with the following command:</p>
<p>    $ ./configure --help</p>
<p>I decided to build my installation with the following parameters:</p>
<p>    $ ./configure --prefix=/opt/local/postgresql83b3<br />
                    --enable-thread-safety<br />
                    --without-docdir<br />
                    --with-perl<br />
                    --with-gssapi<br />
                    --with-pam<br />
                    --with-bonjour<br />
                    --with-openssl</p>
<p>There is no need to install 3rd party libraries when you use these parameters, but feel free to change them. For a full description of all the parameters have a look at this [website](http://www.postgresql.org/docs/8.3/static/install-procedure.html). The **configure** script now does some checks and creates the Makefiles needed for the build process.</p>
<p>## Building PostgreSQL<br />
The actual build process is started by running the **make** command. The created Makefiles are used to tell the **make** program which files have to be compiled and how the whole application has to build together.</p>
<p>    $ make</p>
<p>Depending on your machine the build process takes a few minutes. If **make** succeeds you should see this line:</p>
<p>    All of PostgreSQL successfully made. Ready to install.</p>
<p>Great!</p>
<p>## Installing PostgreSQL<br />
The install process is as easy as the build process. The only thing we do is telling **make** to start the installation:</p>
<p>    $ make install</p>
<p>A few seconds later you should see this:</p>
<p>    PostgreSQL installation complete.</p>
<p>## Creating the database cluster<br />
Before we can use PostgreSQL we have to create at least one database cluster. That is the location where all the data will be stored (here in the directory *data*).</p>
<p>    $ cd /opt/local/postgresql83b3<br />
    $ bin/initdb ./data</p>
<p>## Starting the server process<br />
Starting the PostgreSQL server process is done via the **pg_ctl** program located in the *bin* directory.</p>
<p>    $ bin/pg_ctl -D ./data start</p>
<p>To stop it, use</p>
<p>    $ bin/pg_ctl -D ./data stop</p>
<p>## Using launchd to start automatically<br />
If you plan to use PostgreSQL frequently you might be interested in starting PostgreSQL automatically when you log into your system. To do this, download [this file](http://www.stiefels.net/wp-content/uploads/2007/11/net.stiefels.postgresql.starter.plist) and copy it into *~/Library/LaunchAgents* (you may create the *LaunchAgents* directory if it doesn’t already exist). Next time you log in, the PostgreSQL server process is started automatically. The file expects to find your PostgreSQL installation in */opt/local/postgresql83b3*. Feel free to change it, if you installed it somewhere else.</p>
<p>## Connecting to the database<br />
To test if your installation is actually working you can use **psql** to make a local connection to your server. Please note, that PostgreSQL doesn’t allow any network connections using the default configuration. Have a look at the [manual](http://www.postgresql.org/docs/8.3/static/index.html) for further information.</p>
<p>    $ cd /opt/local/postgresql83b3$ bin/psql -d postgres<br />
    Welcome to psql 8.3beta3, the PostgreSQL interactive terminal.</p>
<p>## Congratulations<br />
The purpose of this little tutorial is to show you how source packages can be compiled on Mac OS X (and other Unices). This way of building applications (configure/make/make install) is a common way in the Unix world and you'll come across these tools very often if you build applications from source packages.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stiefels.net/2007/11/22/building-postgresql-on-leopard/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
