[planner: 16/40] Update the documentation.




commit 73d90cd8fae4aeb98a0c22943872e29dce0dae56
Author: Ahmed Baïzid <ahmed baizid org>
Date:   Thu Jun 18 15:40:19 2015 +0200

    Update the documentation.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=584556

 docs/sql/README.sql           |  7 +++++
 docs/user-guide/C/planner.xml | 65 +++++++++++++++++++------------------------
 2 files changed, 36 insertions(+), 36 deletions(-)
---
diff --git a/docs/sql/README.sql b/docs/sql/README.sql
index 75f3d100..de13f2c3 100644
--- a/docs/sql/README.sql
+++ b/docs/sql/README.sql
@@ -1,3 +1,10 @@
+As of planner 0.14.6, this file is in stale state.
+
+Up to date information can be found in the 'Configuring a Planner database'
+section of the user guide.
+
+----
+
 This is a plugin that implements a backend for keeping project data in a
 postgres SQL database.
 
diff --git a/docs/user-guide/C/planner.xml b/docs/user-guide/C/planner.xml
index 227a8855..1a7e7b7c 100644
--- a/docs/user-guide/C/planner.xml
+++ b/docs/user-guide/C/planner.xml
@@ -2160,15 +2160,11 @@ type <command>&cmd; --help</command>, then press <keycap>Return</keycap>.</para>
        installing from source tarballs.
        RPMs are also available from this site if you prefer that method.
     </para>
-    <para>Start by logging in as root, and copying the database.sql file to 
-       the /tmp directory. You'll use this file in the last step of the 
-       process, but its better to copy it first rather than go hunting for it 
-       later. Assuming the &app; folder is in the root directory, you would 
-       do the following:
+    <para>Become <literal>root</literal> to log as <literal>postgres</literal>.</para>
       <screen>
-       <prompt>root#</prompt><userinput> cp &cmd;/docs/sql/database-0.13.sql /tmp</userinput>
+       <prompt>kurt$</prompt><userinput> su - root</userinput>
+       <prompt>root#</prompt><userinput> su - postgres</userinput>
       </screen>
-    </para>
     <para>If you're running Red Hat and you chose to install the PostgreSQL 
        packages along with the rest of your system, then you already have a 
        database cluster and default user set up.  The database cluster will 
@@ -2181,14 +2177,13 @@ type <command>&cmd; --help</command>, then press <keycap>Return</keycap>.</para>
        Create a database cluster by logging into the postgres account and 
        executing the initdb command:
       <screen>
-       <prompt>root#</prompt><userinput> su - postgres</userinput>
-       <prompt>bash$</prompt><userinput> initdb -D data</userinput>
+       <prompt>postgres$</prompt><userinput> initdb -D data</userinput>
       </screen>
     </para>
     <para>
        Then start the database server:
       <screen>
-       <prompt>bash$</prompt><userinput> pg_ctl -D data -l logfile start</userinput>
+       <prompt>postgres$</prompt><userinput> pg_ctl -D data -l logfile start</userinput>
       </screen>
     </para>
     <para>
@@ -2196,12 +2191,8 @@ type <command>&cmd; --help</command>, then press <keycap>Return</keycap>.</para>
        executing the createuser command (use your own user name here - kurt 
        is mine):
       <screen>
-       <prompt>root#</prompt><userinput> su - postgres</userinput>
-       <prompt>bash$</prompt><userinput> createuser</userinput>
-       Enter name of user to add:<userinput> kurt</userinput>
-       Shall the new user be allowed to create databases? (y/n)<userinput> y</userinput>
-       Shall the new user be allowed to create more new users? (y/n)<userinput> y</userinput>
-       CREATE USER
+       <prompt>postgres$</prompt><userinput> createuser -edr kurt</userinput>
+       CREATE ROLE kurt NOSUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
       </screen>
        This will allow you to execute commands from your own account rather 
        than use the default account.
@@ -2219,21 +2210,21 @@ type <command>&cmd; --help</command>, then press <keycap>Return</keycap>.</para>
     <para>
        You can now create the database and group from your own account:
       <screen>
-       <prompt>kurt#</prompt><userinput> createdb -U kurt plannerdb</userinput>
-       CREATE DATABASE
-       <prompt>kurt#</prompt><userinput> echo 'create group &cmd; with user kurt;' | psql -e -U kurt -d 
plannerdb</userinput>
-       create group &cmd; with user kurt;
-       CREATE GROUP
+       <prompt>kurt$</prompt><userinput> createdb -e plannerdb</userinput>
+       CREATE DATABASE plannerdb;
+       <prompt>kurt$</prompt><userinput> echo "CREATE ROLE planner; GRANT planner TO kurt;" | psql 
plannerdb</userinput>
+       CREATE ROLE
+       GRANT ROLE
       </screen>
     </para>
 
     <para>
        This final command will build the tables required to store the project 
        information in the plannerdb database.  The file 
-       <filename>database.sql</filename> can be found in the &app;
-       distribution subfolder <filename class="directory">docs/sql</filename>.
+       <filename>database-0.13.sql</filename> can be found in the &app;
+       distribution subfolder <filename class="directory">data/sql</filename>.
       <screen>
-       <prompt>kurt#</prompt><userinput> cat /tmp/database.sql | psql -e -U kurt -d plannerdb
+       <prompt>kurt$</prompt><userinput> cat data/sql/database-0.13.sql | psql plannerdb
        </userinput>
       </screen>
        This line generates a lot of output.  When it's complete, you should go
@@ -2250,9 +2241,10 @@ type <command>&cmd; --help</command>, then press <keycap>Return</keycap>.</para>
        If you have a problem or encounter an error, you can try again removing
        the group and database and recreating them:
       <screen>
-       <prompt>kurt#</prompt><userinput> dropdb plannerdb</userinput>
-       <prompt>kurt#</prompt><userinput> echo 'DROP GROUP &cmd;;' | psql -e -U kurt -d plannerdb
-       </userinput>
+       <prompt>kurt$</prompt><userinput> dropdb -e plannerdb</userinput>
+       DROP DATABASE plannerdb;
+       <prompt>kurt$</prompt><userinput> echo "DROP ROLE planner;" | psql template1</userinput>
+       DROP ROLE
       </screen>
     </para>
    </sect2>
@@ -2285,26 +2277,27 @@ type <command>&cmd; --help</command>, then press <keycap>Return</keycap>.</para>
        Next, tell PostgreSQL that its ok to accept connections via TCP/IP.  
        Log in as root, and modify the the <filename>postgresql.conf</filename>
        file, change the 
-       tcpip_socket value to true, and uncomment the line if necessary.  
+       <parameter>listen_addresses</parameter> parameter to <literal>'*'</literal>.
        Then save the file.
     </para>
     <para>
-       Then tell PostgreSQL to allow connections from the ip addresses in
-       your local area network by adding a host line to pg_hba.conf:
+       Then set the authentication method for the ip addresses in
+       your local area network by adding a host line to <filename>pg_hba.conf</filename>:
       <screen>
-       # TYPE  DATABASE USER   IP-ADDRESS        IP-MASK       METHOD
-        local    all    all    ident                           sameuser
-<userinput>    host    all   all   192.168.1.0  255.255.255.0  trust</userinput>
+       # TYPE DATABASE USER ADDRESS METHOD
+       local all all peer
+       <userinput>host all all 192.168.1.0/24 trust</userinput>
       </screen>
-       This line will allow all machines in the IP range of 192.168.1.1 to 
-       192.168.1.254 to access any PostgreSQL database on the server.  You 
+       Any database user connecting from a machine in the IP range of 192.168.1.1 to
+       192.168.1.254 is allowed to access any PostgreSQL database on the server
+        <emphasis>with no authentication</emphasis>.  You
        may need to change the IP address and mask depending on your local
        network.  Contact your network administrator for help in this area.
     </para>
     <para>
        Finally, restart the PostgreSQL service:
       <screen>
-       <prompt>bash$</prompt><userinput> pg_ctl -D data -l logfile restart</userinput>
+       <prompt>postgres$</prompt><userinput> pg_ctl -D data -l logfile restart</userinput>
       </screen>
     </para>
     <para>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]