Author: bhuvan
Date: Thu Oct 25 12:55:37 2007
New Revision: 4485

Modified:
   trunk/generic/serverguide/C/databases.xml

Log:
* generic/server/C/databases.xml
  Updates for postgresql section.

Patch by: Adam Sommer <[EMAIL PROTECTED]>


Modified: trunk/generic/serverguide/C/databases.xml
==============================================================================
--- trunk/generic/serverguide/C/databases.xml   (original)
+++ trunk/generic/serverguide/C/databases.xml   Thu Oct 25 12:55:37 2007
@@ -133,96 +133,86 @@
           <title>Configuration</title>
             <para>By default, connection via TCP/IP is disabled.
             PostgreSQL supports multiple client authentication methods.
-            By default, IDENT authentication method is used.  Please
-            refer <ulink 
-                       
url="http://www.postgresql.org/docs/8.1/static/admin.html";>
+            By default, IDENT authentication method is used for 
<emphasis>postgres</emphasis> and local users
+        .  Please refer <ulink 
+                       
url="http://www.postgresql.org/docs/8.2/static/admin.html";>
                        the PostgreSQL Administrator's Guide</ulink>.</para>
             
             <para>The following discussion assumes that you wish to enable 
                        TCP/IP connections and use the MD5 method for client 
                        authentication. PostgreSQL configuration files are 
stored in the
             <filename>/etc/postgresql/&lt;version&gt;/main</filename>
-            directory. For example, if you install PostgreSQL 7.4, the
+            directory. For example, if you install PostgreSQL 8.2, the
             configuration files are stored in the
-            <filename>/etc/postgresql/7.4/main</filename> directory.
+            <filename>/etc/postgresql/8.2/main</filename> directory.
             </para>
             
             <tip>
             <para>
              To configure <application>ident</application>
-             authentication, add entries to the 
<filename>/etc/postgresql/7.4/main/pg_ident.conf</filename>
+             authentication, add entries to the 
<filename>/etc/postgresql/8.2/main/pg_ident.conf</filename>
              file.
             </para>
             </tip>
 
-            <para>To enable TCP/IP connections, edit the file 
<filename>/etc/postgresql/7.4/main/postgresql.conf</filename></para>
+            <para>To enable TCP/IP connections, edit the file 
<filename>/etc/postgresql/8.2/main/postgresql.conf</filename></para>
 
-            <para>Locate the line <emphasis>#tcpip_socket =
-            false</emphasis> and change it to
-            <emphasis>tcpip_socket =
-            true</emphasis>. You may
-            also edit all other parameters, if you know what you are doing! 
-                       For details, refer to the configuration file or to the 
PostgreSQL documentation.
-            </para>
-
-            <para>By default, the user credentials are not set for
-            <emphasis>MD5</emphasis> client
-            authentication. So, first it is necessary to configure the 
PostgreSQL server to use
-            <emphasis>trust</emphasis> client
-            authentication, connect to the database,
-            configure the password, and revert the configuration back to use
-            <emphasis>MD5</emphasis> client authentication.
-            To enable <emphasis>trust</emphasis> client
-            authentication, edit the file 
<filename>/etc/postgresql/7.4/main/pg_hba.conf</filename></para>
-
-            <para>Comment out all the existing lines which use
-            <emphasis>ident</emphasis> and
-            <emphasis>MD5</emphasis>
-            client authentication and add the following
-            line:</para>
+            <para>Locate the line <emphasis>#listen_addresses = 
'localhost'</emphasis> and change it to:
 <programlisting>
-local   all         postgres                          trust sameuser
+listen_addresses = 'localhost'
 </programlisting>
-
-            <para>Then, run the following command to
-            start the PostgreSQL server:
+           </para>
+            <note>
+             <para>
+             To allow other computers to connect to your 
<application>PostgreSQL</application> server replace 'localhost' with 
+             the <emphasis>IP Address</emphasis> of your server.
+              </para>
+            </note>
+           <para> 
+           You may also edit all other parameters, if you know what you are 
doing! 
+            For details, refer to the configuration file or to the PostgreSQL 
documentation.
             </para>
+
             <para>
-<screen>
-<command>sudo /etc/init.d/postgresql start</command>
-</screen>
-            </para>
-            <para>Once the PostgreSQL server is successfully started, run the 
following command at a terminal prompt to connect to the default
-            PostgreSQL template database</para>
+           Now that we can connect to our 
<application>PostgreSQL</application> server, the next step is to 
+           set a password for the <emphasis>postgres</emphasis> user.  Run the 
following command at a terminal 
+           prompt to connect to the default PostgreSQL template database:
+           </para>
 
             <para>
 <screen>
-<command>psql -U postgres -d template1</command>
+<command>sudo -u postgres psql template1</command>
 </screen>
             </para>
-            <para>The above command connects to PostgreSQL
-            database <emphasis>template1</emphasis> as user
-            <emphasis>postgres</emphasis>. Once you connect to the PostgreSQL
-            server, you will be at a SQL prompt. You can run the
-            following SQL command at the <application>psql</application> 
prompt to configure the
-            password for the user <emphasis
-            role="italics">postgres</emphasis>.</para>
+            <para>
+            The above command connects to PostgreSQL database 
<emphasis>template1</emphasis> as user
+            <emphasis>postgres</emphasis>. Once you connect to the PostgreSQL 
server, you will be 
+           at a SQL prompt. You can run the following SQL command at the 
<application>psql</application> 
+           prompt to configure the password for the user <emphasis 
role="italics">postgres</emphasis>.
+           </para>
 
             <para>
 <screen>
 <command>template1=# ALTER USER postgres with encrypted password 
'your_password';</command>
 </screen>
             </para>
-            <para>After configuring the password, edit the file
-            <filename>/etc/postgresql/7.4/main/pg_hba.conf</filename> to use
-            <emphasis>MD5</emphasis> authentication:</para>
-            <para>Comment the recently added <emphasis
-            role="italics">trust</emphasis> line and add the following
-            line: </para>
-
+            <para>
+           After configuring the password, edit the file
+            <filename>/etc/postgresql/8.2/main/pg_hba.conf</filename> to use
+            <emphasis>MD5</emphasis> authentication with the 
<emphasis>postgres</emphasis> user:
+            </para>
 <programlisting>
 local   all         postgres                          md5 sameuser
 </programlisting>
+
+           <para>
+           Finally, you should restart the 
<application>PostgreSQL</application> service to 
+            initialize the new configuration.  From a terminal prompt enter 
the following to 
+           restart <application>PostgreSQL</application>:
+            </para>
+<screen>
+<command>sudo /etc/init.d/postgresql-8.2 restart</command>
+</screen>
             <warning>
             <para>
              The above configuration is not complete by any means. Please

-- 
ubuntu-doc-commits mailing list
ubuntu-doc-commits@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-doc-commits

Reply via email to