3
3
4
4
<Abstract>
5
5
<Para>
6
- Complete installation instructions for <ProductName>Postgres</ProductName>
7
- v6.4.
6
+ Complete installation instructions for
7
+ <ProductName>Postgres</ProductName> v6.4.
8
8
</Para>
9
9
</Abstract>
10
10
@@ -15,7 +15,8 @@ for up to date information, patches, etc.
15
15
</Para>
16
16
17
17
<Para>
18
- The installation notes below assume the following (except where noted):
18
+ These installation instructions assume:
19
+
19
20
<ItemizedList Mark="bullet" Spacing="compact">
20
21
<ListItem>
21
22
<Para>
@@ -29,7 +30,7 @@ Defaults are used except where noted.
29
30
</ListItem>
30
31
<ListItem>
31
32
<Para>
32
- User postgres is the <ProductName>Postgres</ProductName> superuser.
33
+ User <literal> postgres</literal> is the <ProductName>Postgres</ProductName> superuser.
33
34
</Para>
34
35
</ListItem>
35
36
<ListItem>
@@ -74,12 +75,39 @@ http://www.postgresql.org/docs/admin/install.htm</ulink>.
74
75
In general, most Unix-compatible
75
76
platforms with modern libraries should be able to run <ProductName>Postgres</ProductName>.
76
77
78
+ <para>
79
+ Although the minimum required memory for running <ProductName>Postgres</ProductName>
80
+ is as little as 8MB, there are noticable improvements in runtimes for the regression
81
+ tests when expanding memory up to 96MB on a relatively fast dual-processor system
82
+ running X-Windows.
83
+ The rule is you can never have too much memory.
84
+
77
85
<Para>
78
- You should have at least 8 MB of memory and at least 45 MB of disk space
79
- to hold the source, binaries, and user databases. After installation
80
- you may reduce this to about 3 Mbytes plus space for user databases.
86
+ Check that you have sufficient disk space. You will need about
87
+ 30 Mbytes for <filename>/usr/src/pgsql</filename>,
88
+ about 5 Mbytes for <filename>/usr/local/pgsql</filename>
89
+ (excluding your database) and 1 Mbyte for an empty database.
90
+ The database will temporarily grow to about 20 Mbytes during the
91
+ regression tests. You will also need about 3 Mbytes for the
92
+ distribution tar file.
81
93
</Para>
82
94
95
+ <Para>
96
+ We therefore recommend that during installation and testing you
97
+ have well over 20 Mbytes free under <filename>/usr/local</filename> and another 25 Mbytes
98
+ free on the disk partition containing your database. Once you
99
+ delete the source files, tar file and regression database, you
100
+ will need 2 Mbytes for <filename>/usr/local/pgsql</filename>, 1 Mbyte for the empty
101
+ database, plus about five times the space you would require to
102
+ store your database data in a flat file.
103
+ </Para>
104
+
105
+ <Para>
106
+ To check for disk space, use
107
+ <programlisting>
108
+ $ df -k
109
+ </programlisting>
110
+
83
111
</Sect1>
84
112
85
113
<Sect1>
@@ -123,51 +151,24 @@ Read any last minute information and platform specific porting
123
151
<Para>
124
152
Create the <ProductName>Postgres</ProductName> superuser account
125
153
(<literal>postgres</literal> is commonly used) if it does not already exist.
126
- </Para>
127
- </Step>
128
154
129
- <Step Performance="required">
130
- <Para>
131
- Log in to the <ProductName>Postgres</ProductName> superuser account.
132
- </Para>
133
-
134
- <SubSteps>
135
- <Step Performance="required">
136
- <Para>
137
- Check that you have sufficient disk space. You will need about
138
- 17 Mbytes for <filename>/usr/src/pgsql</filename>,
139
- about 2 Mbytes for <filename>/usr/local/pgsql</filename>
140
- (excluding your database) and 1 Mbyte for an empty database.
141
- The database will temporarily grow to about 20 Mbytes during the
142
- regression tests. You will also need about 3 Mbytes for the
143
- distribution tar file.
144
- </Para>
145
-
146
- <Para>
147
- We therefore recommend that during installation and testing you
148
- have well over 20 Mbytes free under <filename>/usr/local</filename> and another 25 Mbytes
149
- free on the disk partition containing your database. Once you
150
- delete the source files, tar file and regression database, you
151
- will need 2 Mbytes for <filename>/usr/local/pgsql</filename>, 1 Mbyte for the empty
152
- database, plus about five times the space you would require to
153
- store your database data in a flat file.
154
- </Para>
155
+ <para>
156
+ The owner of the Postgres files can be any unprivileged user account.
157
+ It <emphasis>must not</emphasis> be <literal>root</literal>, <literal>bin</literal>,
158
+ or any other account with special access rights, as that would create a security risk.
155
159
156
- <Para>
157
- To check for disk space, use
158
- <programlisting>
159
- $ df -k
160
- </programlisting>
161
- </Para>
162
160
</Step>
163
- </SubSteps>
164
161
165
- </Step>
162
+ <Step Performance="required">
163
+ <Para>
164
+ Log in to the <ProductName>Postgres</ProductName> superuser account. Most of the
165
+ remaining steps in the installation will happen in this account.
166
166
167
167
<Step Performance="required">
168
168
<Para>
169
169
Ftp file
170
- <ulink url="ftp://ftp.postgresql.org/pub/postgresql-v6.4.tar.gz"><filename>ftp://ftp.postgresql.org/pub/postgresql-v6.4.tar.gz</filename></ulink>
170
+ <ulink url="ftp://ftp.postgresql.org/pub/postgresql-v6.4.tar.gz">
171
+ <filename>ftp://ftp.postgresql.org/pub/postgresql-v6.4.tar.gz</filename></ulink>
171
172
from the Internet. Store it in your home directory.
172
173
</Para>
173
174
</Step>
@@ -235,6 +236,8 @@ $ rm -rf flex-2.5.4
235
236
236
237
<Step Performance="required">
237
238
<Para>
239
+ If you are not upgrading an existing system then skip to
240
+ <xref linkend="newdirs">.
238
241
If you are upgrading an existing system then back up your database.
239
242
For alpha- and beta-level releases, the database format is liable
240
243
to change, often every few weeks, with no notice besides a quick comment
@@ -249,22 +252,33 @@ script from v6.0 or everything
249
252
will be owned by the <ProductName>Postgres</ProductName> super user.
250
253
</tip>
251
254
255
+ <para>
256
+ To dump your fairly recent post-v6.0 database installation, type
257
+
258
+ <programlisting>
259
+ $ pg_dumpall -z > db.out
260
+ </programlisting>
261
+
252
262
<para>
253
263
To use the latest <application>pg_dumpall</application> script on your
254
- existing database before upgrading <productname>Postgres</productname>, type:
264
+ existing older database before upgrading <productname>Postgres</productname>,
265
+ pull the most recent version of <application>pg_dumpall</application>
266
+ from the new distribution:
267
+
255
268
<ProgramListing>
256
269
$ cd
257
270
$ gunzip -c postgresql-v6.4.tar.gz \
258
271
| tar xvf - src/bin/pg_dump/pg_dumpall
259
272
$ chmod a+x src/bin/pg_dump/pg_dumpall
260
- $ src/bin/pg_dump/pg_dumpall > db.out
273
+ $ src/bin/pg_dump/pg_dumpall -z > db.out
261
274
$ rm -rf src
262
275
</ProgramListing>
263
276
</Para>
264
277
265
278
<Para>
266
279
If you wish to preserve object id's (oids), then use the -o
267
- option when running <application>pg_dumpall</application>. However, unless you have a
280
+ option when running <application>pg_dumpall</application>.
281
+ However, unless you have a
268
282
special reason for doing this (such as using OIDs as keys
269
283
in tables), don't do it.
270
284
</Para>
@@ -356,7 +370,7 @@ $ exit
356
370
</Para>
357
371
</Step>
358
372
359
- <Step Performance="required">
373
+ <Step Performance="required" id="newdirs" >
360
374
<Para>
361
375
Make new source and install directories. The actual paths can be
362
376
different for your installation but you must be consistant throughout this procedure.
@@ -418,8 +432,8 @@ $ ./configure [ <replaceable>options as described below</replaceable> ]
418
432
<para>
419
433
If your system is not automatically recognized by configure and you have to do this, please
420
434
send email to
421
- <ulink url="mailto:scrappy@hub.org">scrappy@hub.org</ulink> showing both the output of the program
422
- <application>./config.guess</application> and also what the template file should be.)
435
+ <ulink url="mailto:scrappy@hub.org">scrappy@hub.org</ulink> with the output of the program
436
+ <application>./config.guess</application>. Indicate what the template file should be.
423
437
</note>
424
438
425
439
</Para>
@@ -474,8 +488,8 @@ If your system is not automatically recognized by configure and you have to do t
474
488
</Para>
475
489
476
490
<Para>
477
- As an example, here is the configure script used on a Sparc
478
- Solaris 2.5 system with <filename>/opt/postgres</filename> being the install base.
491
+ As an example, here is the configure script used on a Sparc Solaris 2.5 system
492
+ with <filename>/opt/postgres</filename> being the installation base directory:
479
493
480
494
<ProgramListing>
481
495
$ ./configure --prefix=/opt/postgres \
@@ -501,6 +515,15 @@ $ gmake install
501
515
The documentation is also available in Postscript format. Look for files
502
516
ending with <filename>.ps.gz</filename> in the same directory.
503
517
518
+ <Step Performance="optional">
519
+ <Para>
520
+ Install the man page documentation. Type
521
+
522
+ <ProgramListing>
523
+ $ cd /usr/src/pgsql/doc
524
+ $ gmake man
525
+ </ProgramListing>
526
+
504
527
<Step Performance="required">
505
528
<Para>
506
529
Compile the program. Type
@@ -576,8 +599,8 @@ At this point, or earlier if you wish,
576
599
577
600
<Step Performance="required">
578
601
<Para>
579
- 14) If necessary, tell your system how to find the new shared libraries. You can
580
- do <emphasis>one</emphasis> of the following, preferably the first:
602
+ If necessary, tell your system how to find the new shared libraries. You can
603
+ do <emphasis>one</emphasis> of the following, preferably the first:
581
604
582
605
<SubSteps>
583
606
<Step Performance="optional">
@@ -626,10 +649,19 @@ pg_id: can't load library 'libpq.so'
626
649
<Step Performance="required">
627
650
<Para>
628
651
If it has not already been done, then prepare account <literal>postgres</literal>
629
- for using <ProductName>Postgres</ProductName>.
652
+ for using <ProductName>Postgres</ProductName>.
630
653
Any account that will use <ProductName>Postgres</ProductName> must
631
- be similarily prepared. (The following instructions are for a
632
- bash shell. Adapt accordingly for other shells.)
654
+ be similarly prepared.
655
+
656
+ <note>
657
+ <para>
658
+ There are several ways to influence the runtime environment of the <ProductName>Postgres</ProductName>
659
+ server. Refer to the chapter on <citetitle>Administrator's Guide</citetitle> for more information.
660
+ <para>
661
+ The following instructions are for a
662
+ bash/sh shell. Adapt accordingly for other shells.
663
+ </note>
664
+
633
665
</Para>
634
666
635
667
<Para>
@@ -677,16 +709,6 @@ $ initdb
677
709
</Para>
678
710
</Step>
679
711
680
- <Step Performance="required">
681
- <Para>
682
- Run the regression tests.
683
- The file <filename>/usr/src/pgsql/src/test/regress/README</filename> has detailed
684
- instructions for running and interpreting the regression tests.
685
- A short version follows here:
686
- </Para>
687
-
688
- <substeps>
689
-
690
712
<Step Performance="required">
691
713
<Para>
692
714
Run postmaster from your <ProductName>Postgres</ProductName> superuser account (typically
@@ -700,6 +722,16 @@ $ nohup postmaster > regress.log 2>&1 &
700
722
</Para>
701
723
</Step>
702
724
725
+ <Step Performance="required">
726
+ <Para>
727
+ Run the regression tests.
728
+ The file <filename>/usr/src/pgsql/src/test/regress/README</filename> has detailed
729
+ instructions for running and interpreting the regression tests.
730
+ A short version follows here:
731
+ </Para>
732
+
733
+ <substeps>
734
+
703
735
<Step Performance="required">
704
736
<Para>
705
737
Type
0 commit comments