質問するログイン新規登録

質問編集履歴

2

2016/04/12 04:16

投稿

Masashi_Ikuz
Masashi_Ikuz

スコア15

title CHANGED
File without changes
body CHANGED
@@ -7,6 +7,7 @@
7
7
 
8
8
  なお、データの格納先は変更せず、PGDATA=/var/lia/pgsql/9.4/data となります。
9
9
 
10
+ 下記はそれぞれでinitdbコマンドを実行したときの結果になります。
10
11
  -------------------------------
11
12
  ※rootユーザーで実行する場合
12
13
  { # service postgresql-9.4 initdb

1

2016/04/12 04:16

投稿

Masashi_Ikuz
Masashi_Ikuz

スコア15

title CHANGED
File without changes
body CHANGED
@@ -9,12 +9,12 @@
9
9
 
10
10
  -------------------------------
11
11
  ※rootユーザーで実行する場合
12
- # service postgresql-9.4 initdb
12
+ { # service postgresql-9.4 initdb
13
- データベースを初期化中: [ OK ]
13
+ データベースを初期化中: [ OK ] }
14
14
 
15
15
 
16
- ※postgres
16
+ ※postgresユーザで実行する場合
17
- # su - postgres
17
+ { # su - postgres
18
18
  -bash-4.1$ /usr/pgsql-9.4/bin/initdb
19
19
  データベースシステム内のファイルの所有者は"postgres"ユーザでした。
20
20
  このユーザがサーバプロセスを所有しなければなりません。
@@ -59,7 +59,7 @@
59
59
  または
60
60
  /usr/pgsql-9.4/bin/pg_ctl -D /var/lib/pgsql/9.4/data -l logfile start
61
61
 
62
-
62
+ }
63
63
  --------------------------------
64
64
 
65
65
  作成されたPGDATA以下のファイルやディレクトリを確認しましたが、rootユーザでinitdbを実行した場合でもファイルの所有者はpostgresユーザのままでした。