12
13

More than 5 years have passed since last update.

Postgresql 9.3.2 インストール(OS X Mavericks)

Last updated at Posted at 2014-07-21

環境:OS X Mavericks (10.9.4)

1. インストール

$ brew install postgresql

2. UTF-8で初期化

$ initdb /usr/local/var/postgres -E utf8

3. 手動で起動

$ postgres -D /usr/local/var/postgres

4. データベース一覧で確認

$ psql -l

5. 環境変数PGDATAを設定。.zshrcに以下を記述

$export PGDATA=/usr/local/var/postgres

6. バージョン確認

$ psql -V

7. 自動起動を設定。

$ cp /usr/local/Cellar/postgresql/9.3.2/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

12
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
13