Move PostgreSQL ifnormation from ServersideInstallation to Admin misc.
[working/Evergreen.git] / 1.6 / admin / AdminMisc.xml
index cb66410..6430e72 100644 (file)
@@ -198,4 +198,126 @@ size 50M
                        and errors.</para>\r
                </simplesect>\r
        </section>\r
                        and errors.</para>\r
                </simplesect>\r
        </section>\r
+       <section xml:id="InstallingPostgreSQL">\r
+               <title>Installing PostgreSQL from Source</title>\r
+               <para>Some <systemitem class="osname">Linux</systemitem> distributions, such as <systemitem class="osname">Debian Etch (4.0)</systemitem>, do not offer PostgreSQL \r
+               version 8.2 as an installable package. Before you continue, examine the software dependencies listed in <xref linkend="serversideinstall-software-dependencies"/> \r
+               to ensure that your Linux distribution supports the required version of PostgreSQL.</para>\r
+\r
+               <note>\r
+                       <para>Some <systemitem class="osname">Linux</systemitem> distributions, such as <systemitem class="osname">Debian Etch (4.0)</systemitem>, do not offer PostgreSQL \r
+               version 8.2 as an installable package. Before you continue, examine the software dependencies listed in <xref linkend="serversideinstall-software-dependencies"/> \r
+               to ensure that your Linux distribution supports the required version of PostgreSQL.</para>\r
+               </note>\r
+               \r
+               <procedure>\r
+                       <step>\r
+                               <para>Install the application <application>stow</application> on your system if it is not already installed. Issue the following command as \r
+                               the <systemitem class="username">root</systemitem> user:</para>\r
+                               \r
+                                       <title>Installing <application>stow</application></title>\r
+                                       <screen>\r
+                                       $ apt-get install stow\r
+                                       ...\r
+                                       </screen>\r
+                       </step>\r
+                       <step>\r
+                               <para>Download, compile, and install the latest release for PostgreSQL 8.2 (which was version <literal>8.2.12</literal> at the time of this writing). \r
+                               As the <systemitem class="username">root</systemitem> user, follow these steps:</para>\r
+                               <figure>\r
+                                       <title>Installing PostgreSQL</title>\r
+                                       <screen>\r
+                                       $ wget http://wwwmaster.postgresql.org/redir/198/h/source/v8.2.17/postgresql-8.2.17.tar.bz2\r
+                                       $ tar xzf postgresql-8.2.17.tar.gz\r
+                                       $ cd postgresql-8.2.17\r
+                                       $ ./configure --with-perl --enable-integer-datetimes --with-openssl --prefix=/usr/local/stow/pgsql\r
+                                       ...\r
+                                       $ make\r
+                                       ...\r
+                                       $ make install\r
+                                       ...\r
+                                       $ cd contrib\r
+                                       $ make\r
+                                       ...\r
+                                       $ make install\r
+                                       $ cd xml2\r
+                                       $ make\r
+                                       ...\r
+                                       $ make install\r
+                                       $ cd /usr/local/stow\r
+                                       $ stow pgsql\r
+                                       </screen>\r
+                               </figure>\r
+                       </step>\r
+                       <step>\r
+                               <para>Create the new user <systemitem class="username">postgres</systemitem> to run the PostgreSQL processes. \r
+                               As the <systemitem class="username">root</systemitem> user, execute this command:</para>\r
+                               <figure>\r
+                                       <title>Adding <systemitem class="username">postgres</systemitem></title>\r
+                                       <screen>\r
+                                       $ adduser postgres\r
+                                       </screen>\r
+                               </figure>\r
+                       </step>\r
+                       <step>\r
+                               <para>Initialize the database directory and start up PostgreSQL. As the <systemitem class="username">root</systemitem> user, follow these steps:</para>\r
+                               <figure>\r
+                                       <title>Adding <systemitem class="username">postgres</systemitem></title>\r
+                                       <screen>\r
+                                       $ mkdir -p /usr/local/pgsql/data\r
+                                       $ chown postgres /usr/local/pgsql/data\r
+                                       $ su - postgres\r
+                                       $ initdb -D /usr/local/pgsql/data -E UNICODE --locale=C\r
+                                       $ pg_ctl -D /usr/local/pgsql/data -l /home/postgres/logfile start\r
+                                       </screen>\r
+                               </figure>\r
+                               <note>\r
+                                       <para>If an error occurs during the final step above, review the path of the home directory for the \r
+                                       <systemitem class="username">postgres</systemitem> user. It may be <literal>/var/lib/postresql</literal> instead of <literal>/home/postres</literal>.</para>\r
+                               </note>\r
+                       </step>\r
+               </procedure>\r
+       </section>\r
+       <section xml:id="configuringPostgreSQL">\r
+               <title>Configuring PostgreSQL</title>\r
+               <para>The values of several PostreSQL configuration parameters may be changed for enhanced performance. The following table lists the default values \r
+               and some suggested updates for several useful parameters:</para>\r
+               <table>\r
+                       <title>Suggested configuration values</title>\r
+                       <tgroup align="left" cols="3" colsep="1" rowsep="1">\r
+                               <colspec colnum="1" colwidth="1.0*"/>\r
+                               <colspec colnum="2" colwidth="1.0*"/>\r
+                               <colspec colnum="3" colwidth="1.0*"/>\r
+                               <thead>\r
+                                       <row>\r
+                                               <entry>Parameter</entry>\r
+                                               <entry>Default</entry>\r
+                                               <entry>Suggested</entry>\r
+                                       </row>\r
+                               </thead>\r
+                               <tbody>\r
+                                       <row>\r
+                                               <entry>default_statistics_target</entry>\r
+                                               <entry>10</entry>\r
+                                               <entry>100</entry>\r
+                                       </row>\r
+                                       <row>\r
+                                               <entry>work_mem</entry>\r
+                                               <entry>4Mb</entry>\r
+                                               <entry>128Mb</entry>\r
+                                       </row>\r
+                                       <row>\r
+                                               <entry>shared_buffers</entry>\r
+                                               <entry>8Mb</entry>\r
+                                               <entry>512Mb</entry>\r
+                                       </row>\r
+                                       <row>\r
+                                               <entry>effective_cache_size</entry>\r
+                                               <entry>128Mb</entry>\r
+                                               <entry>4Gb</entry>\r
+                                       </row>\r
+                               </tbody>\r
+                       </tgroup>\r
+               </table>\r
+       </section>\r
 </chapter>\r
 </chapter>\r