PosgreSQL8.1.4


PostgreSQLデータベースをインストールしてseamというDBを
seamというユーザが所有している状態にする。

1.RHEL5.2のPostgreSQLデータベース(8.1.4)をインストールしておく。

2.sudo /sbin/service postgresql start
 とすると /var/lib/pgsql/data にデータベースが初期化されて配置される。
 ※データフォルダのパスを変更したい場合は
  /etc/init.d/postgresqlのPGDATA=/var/lib/pgsqlという行を変更する。

4.su postgres

5.createuser -P seam
 Enter password for new role:
 nter it again:
 Shall the new role be a superuser? (y/n) n
 Shall the new role be allowed to create databases? (y/n) y
 Shall the new role be allowed to create more new roles? (y/n) n

6.createdb -E UTF8 -O seam seam

7.vi /データベースのパス/pg_hba.conf

# "local" is for Unix domain socket connections only
local   all         all                               ident sameuser
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
host    all         all         10.3.1.0/16           md5

8.vi postgresql.conf
#---------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#---------------------------------------------------------------------------

# - Connection Settings -

listen_addresses = '127.0.0.1'          # what IP address(es) to listen on;
                                        # comma-separated list of addresses;
                                        # defaults to 'localhost', '*' = all
port = 5432

9.sudo /sbin/service postgresql restart




閲覧数: -
更新日:2008-08-16 23:47:23 (Sat)



&bookmark_hatena()
&bookmark_delicious()
&bookmark_livedoor()
&bookmark_yahoo()
&bookmark_nifty()
technoratiに登録technoratiに登録
Buzzurlに登録Buzzurlに登録
POOKMARK Airlinesに登録POOKMARK Airlinesに登録
&bookmark_live()


&link_trackback(text=トラックバック元一覧:表示する)
リンク元一覧:
#ref_list
@めもてっく is licensed under a Creative Commons 表示 2.1 日本 License.

最終更新:2008年08月16日 23:47