<?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>cap&#039;n webb &#187; PostgreSQL</title>
	<atom:link href="http://blog.dataich.com/tag/postgresql/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dataich.com</link>
	<description>almost all things about it</description>
	<lastBuildDate>Thu, 12 Jan 2012 03:38:00 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Postgres8.3 インストール（Linux）</title>
		<link>http://blog.dataich.com/2008/03/21/postgres83-%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%ef%bc%88linux%ef%bc%89/</link>
		<comments>http://blog.dataich.com/2008/03/21/postgres83-%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%ef%bc%88linux%ef%bc%89/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 09:01:00 +0000</pubDate>
		<dc:creator>dataich</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://dataich.s15.coreserver.jp/blog/2008/03/21/postgres83-%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%ef%bc%88linux%ef%bc%89/</guid>
		<description><![CDATA[ソース取得 1 $ wget ftp://ftp.jp.postgresql.org/source/v8.3.0/postgresql-8.3.0.tar.gz ビルドに必要なライブラリをインストール 1 2 $ yum [...]]]></description>
			<content:encoded><![CDATA[<h4>ソース取得</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.jp.postgresql.org<span style="color: #000000; font-weight: bold;">/</span>source<span style="color: #000000; font-weight: bold;">/</span>v8.3.0<span style="color: #000000; font-weight: bold;">/</span>postgresql-8.3.0.tar.gz</pre></td></tr></table></div>

<h4></h4>
<h4>ビルドに必要なライブラリをインストール</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ yum <span style="color: #c20cb9; font-weight: bold;">install</span> zlib-devel
$ yum <span style="color: #c20cb9; font-weight: bold;">install</span> readline-devel</pre></td></tr></table></div>

<h4>postgresユーザ作成</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ groupadd postgres
$ useradd <span style="color: #660033;">-g</span> postgres <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 postgres
$ <span style="color: #c20cb9; font-weight: bold;">passwd</span> postgres</pre></td></tr></table></div>

<h4>ビルド</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">tar</span> xvfz postgresql-8.3.0.tar.gz
$ <span style="color: #7a0874; font-weight: bold;">cd</span> postgresql-8.3.0
$ .<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: #c20cb9; font-weight: bold;">make</span> all
$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></td></tr></table></div>

<h4>所有者変更</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> postgres: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</pre></td></tr></table></div>

<h4>データディレクトリ作成</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">su</span> - postgres
<span style="color: #666666; font-style: italic;"># mkdir /usr/local/pgsql/data</span>
<span style="color: #666666; font-style: italic;"># /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data</span></pre></td></tr></table></div>

<h4>初期設定</h4>
<h5>プロファイルを開いて</h5>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># vi ~postgres/.bash_profile</span></pre></td></tr></table></div>

<h5>下記を追加</h5>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$PATH</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: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">POSTGRES_HOME</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: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PGLIB</span>=<span style="color: #007800;">$POSTGRES_HOME</span><span style="color: #000000; font-weight: bold;">/</span>lib
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PGDATA</span>=<span style="color: #007800;">$POSTGRES_HOME</span><span style="color: #000000; font-weight: bold;">/</span>data
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">MANPATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$MANPATH</span>&quot;</span>:<span style="color: #007800;">$POSTGRES_HOME</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">man</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LD_LIBRARY_PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$LD_LIBRARY_PATH</span>&quot;</span>:<span style="color: #ff0000;">&quot;<span style="color: #007800;">$PGLIB</span>&quot;</span></pre></td></tr></table></div>

<h5>読み直しておく</h5>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># source ~postgres/.bash_profile</span></pre></td></tr></table></div>

<h5>自動起動設定</h5>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">cp</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>src<span style="color: #000000; font-weight: bold;">/</span>postgresql-8.3.0<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>start-scripts<span style="color: #000000; font-weight: bold;">/</span>linux <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>postgres
$ <span style="color: #c20cb9; font-weight: bold;">chmod</span> +x <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>postgres
$ chkconfig <span style="color: #660033;">--add</span> postgres</pre></td></tr></table></div>

<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://blog.dataich.com/2008/03/21/postgres83-%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%ef%bc%88linux%ef%bc%89/&via=dataich&text=Postgres8.3 インストール（Linux）&related=:&lang=en&count=vertical" class="twitter-share-button" onclick="pageTracker._trackPageview('/outgoing/twitter.com/share?url=http_//blog.dataich.com/2008/03/21/postgres83-_e3_82_a4_e3_83_b3_e3_82_b9_e3_83_88_e3_83_bc_e3_83_ab_ef_bc_88linux_ef_bc_89/_via=dataich_text=Postgres8.3_Linux_related=_lang=en_count=vertical&amp;referer=');">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>]]></content:encoded>
			<wfw:commentRss>http://blog.dataich.com/2008/03/21/postgres83-%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%ef%bc%88linux%ef%bc%89/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

