|
1 | 1 | <!--
|
2 |
| -$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.97 2001/11/21 06:09:45 thomas Exp $ |
| 2 | +$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.98 2001/11/28 00:13:30 momjian Exp $ |
3 | 3 | -->
|
4 | 4 |
|
5 | 5 | <Chapter Id="runtime">
|
@@ -51,28 +51,28 @@ $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.97 2001/11/21 06:09:45 tho
|
51 | 51 |
|
52 | 52 | <para>
|
53 | 53 | Before you can do anything, you must initialize a database storage
|
54 |
| - area on disk. We call this a <firstterm>database |
55 |
| - cluster</firstterm>. (<acronym>SQL</acronym> speaks of a catalog |
56 |
| - cluster instead.) A database cluster is a collection of databases |
57 |
| - that will be accessible through a single instance of a running |
58 |
| - database server. After initialization, a database cluster will |
59 |
| - contain one database named <literal>template1</literal>. As the |
60 |
| - name suggests, this will be used as a template for any subsequently |
61 |
| - created database; it should not be used for actual work. |
| 54 | + area on disk. We call this a <firstterm>database cluster</firstterm>. |
| 55 | + (<acronym>SQL</acronym> speaks of a catalog cluster instead.) A |
| 56 | + database cluster is a collection of databases that will be accessible |
| 57 | + through a single instance of a running database server. After |
| 58 | + initialization, a database cluster will contain one database named |
| 59 | + <literal>template1</literal>. As the name suggests, this will be used |
| 60 | + as a template for any subsequently created database; it should not be |
| 61 | + used for actual work. |
62 | 62 | </para>
|
63 | 63 |
|
64 | 64 | <para>
|
65 | 65 | In file system terms, a database cluster will be a single directory
|
66 |
| - under which all data will be stored. We call this the |
67 |
| - <firstterm>data directory</firstterm> or <firstterm>data |
68 |
| - area</firstterm>. It is completely up to you where you choose to |
69 |
| - store your data, there is no default, although locations such as |
| 66 | + under which all data will be stored. We call this the <firstterm>data |
| 67 | + directory</firstterm> or <firstterm>data area</firstterm>. It is |
| 68 | + completely up to you where you choose to store your data, there is no |
| 69 | + default, although locations such as |
70 | 70 | <filename>/usr/local/pgsql/data</filename> or
|
71 |
| - <filename>/var/lib/pgsql/data</filename> are popular. To initialize |
72 |
| - a database cluster, use the command <command>initdb</command>, |
73 |
| - which is installed with <productname>PostgreSQL</productname>. The |
74 |
| - desired file system location of your database system is indicated |
75 |
| - by the <option>-D</option> option, for example |
| 71 | + <filename>/var/lib/pgsql/data</filename> are popular. To initialize a |
| 72 | + database cluster, use the command <command>initdb</command>, which is |
| 73 | + installed with <productname>PostgreSQL</productname>. The desired |
| 74 | + file system location of your database system is indicated by the |
| 75 | + <option>-D</option> option, for example |
76 | 76 | <screen>
|
77 | 77 | > <userinput>initdb -D /usr/local/pgsql/data</userinput>
|
78 | 78 | </screen>
|
@@ -118,6 +118,19 @@ postgres> <userinput>initdb -D /usr/local/pgsql/data</userinput>
|
118 | 118 | permissions from everyone but the <productname>PostgreSQL</productname> user account.
|
119 | 119 | </para>
|
120 | 120 |
|
| 121 | + <para> |
| 122 | + However, while the directory contents are secure, the default |
| 123 | + <filename>pg_hba.conf</filename> authentication of |
| 124 | + <literal>trust</literal> allows any local user to become the |
| 125 | + superuser and connect to the database. If you don't trust your local |
| 126 | + users, we recommend you use the <command>initdb</command> option |
| 127 | + <option>-W</option> or <option>--pwprompt</option> to assign a |
| 128 | + password to the superuser and modify your |
| 129 | + <filename>pg_hba.conf</filename> accordingly. (Another option: |
| 130 | + Your operating system may support <literal>ident</literal> for |
| 131 | + local connections.) |
| 132 | + </para> |
| 133 | + |
121 | 134 | <para>
|
122 | 135 | <indexterm><primary>LC_COLLATE</></>
|
123 | 136 | One surprise you might encounter while running <command>initdb</command> is
|
|
0 commit comments