←前 |  ↑↑Blog |  ↑Category |  ↓Comment |  ↓Trackback |  次→

PostgreSQL 7.3を入れてみる(WebObjects対応込み)


Mac OS X上にPostgreSQLをいれる。

PostgreSQLのインストール
#元の文書は、2003/4に書いたのちょっと古い部分があります。

パッケージの入手
ここ からパッケージを入手します。基本的にそのサイト通りの手順ですすめる。

1.On Mac OS X version 10.2: Download and install the package
pgsql-7.3.pkg.tar.gz

2.Create a new user in the "Users" System Prefs pane:
Name: "PostgreSQL User"
Short Name: "postgres"
Password: whatever you want

3.Open a terminal window and type in the following commands (without
the double quotes):

4.type " sudo chown -R postgres /usr/local/pgsql/ ", enter
administrator password when asked

5.type " su - postgres ", enter the password of the newly created
postgres user when asked

6.type " /usr/local/bin/initdb -D /usr/local/pgsql/data " and wait for
the operation to complete
ここで文字コードを指定してもよいかもしれない。

7.If you would like PostgreSQL to start up automatically when the
system comes up, then you can install this package which installs a
StartupItem into " /Library/StartupItems ":
pgsql-startupitem-1.2.pkg.tar.gz
これを実施

8.reboot

9.postgresのユーザだとなんの設定もしてないので使いにくいので、通常のユー
ザをPostgreSQLのユーザとして登録する。通常のユーザでログインして、
"su - postgres"して、"/usr/local/bin/createuser hogehoge"(hogehoge
は利用したいユーザ)とする。以降は、hogehogeさんで操作できるので、
postgresさんは"exit"

10.データベースを作成する。"createdb -E 文字コード データベース名"
文字コードとしては、
EUC_JP
UNICODE
などが指定できる。

11."psql -l"で確認。


更にWebObjects対応
12. JDBC

% cp /usr/local/pgsql/share/java/postgresql.jar /Library/Java/Extensions/

13. PostgresqlPlugIn.framework 1.2 PostgresqlPlugInBundle 1.2 のビル
ドとインストール

ここ から落として、解凍してビルドして、コピーする。詳しくは、
ここ を参照のこと。

( ・∀・)つ〃∩ ヘェーヘェーヘェー">
投稿時間: 2003年10月19日 (日) at 00:42       
 

←前  |  ↑↑Blog |  ↑Category |  ↑Entry top |  ↑Comment |  次→
←前  |  ↑↑Blog |  ↑Category |  ↑Entry top |  ↑Comment |  次→