-Complete installation instructions for
Postgres
-v6.4.
+Complete installation instructions for
-The installation notes below assume the following (except where noted):
+These installation instructions assume:
+
-User
postgres is the
Postgres superuser.
+User
postgres is the
Postgres superuser.
In general, most Unix-compatible
platforms with modern libraries should be able to run
Postgres.
+Although the minimum required memory for running
Postgres
+is as little as 8MB, there are noticable improvements in runtimes for the regression
+tests when expanding memory up to 96MB on a relatively fast dual-processor system
+running X-Windows.
+The rule is you can never have too much memory.
+
-You should have at least 8 MB of memory and at least 45 MB of disk space
-to hold the source, binaries, and user databases. After installation
-you may reduce this to about 3 Mbytes plus space for user databases.
+Check that you have sufficient disk space. You will need about
+ 30 Mbytes for /usr/src/pgsql,
+about 5 Mbytes for /usr/local/pgsql
+ (excluding your database) and 1 Mbyte for an empty database.
+ The database will temporarily grow to about 20 Mbytes during the
+ regression tests. You will also need about 3 Mbytes for the
+ distribution tar file.
+ We therefore recommend that during installation and testing you
+ have well over 20 Mbytes free under /usr/local and another 25 Mbytes
+ free on the disk partition containing your database. Once you
+ delete the source files, tar file and regression database, you
+ will need 2 Mbytes for /usr/local/pgsql, 1 Mbyte for the empty
+ database, plus about five times the space you would require to
+ store your database data in a flat file.
+
+
+ To check for disk space, use
+$ df -k
+
+
Create the
Postgres superuser account
(postgres is commonly used) if it does not already exist.
-
-
-
-Log in to the
Postgres superuser account.
-
-
-
-
-Check that you have sufficient disk space. You will need about
- 17 Mbytes for /usr/src/pgsql,
-about 2 Mbytes for /usr/local/pgsql
- (excluding your database) and 1 Mbyte for an empty database.
- The database will temporarily grow to about 20 Mbytes during the
- regression tests. You will also need about 3 Mbytes for the
- distribution tar file.
-
-
- We therefore recommend that during installation and testing you
- have well over 20 Mbytes free under /usr/local and another 25 Mbytes
- free on the disk partition containing your database. Once you
- delete the source files, tar file and regression database, you
- will need 2 Mbytes for /usr/local/pgsql, 1 Mbyte for the empty
- database, plus about five times the space you would require to
- store your database data in a flat file.
-
+The owner of the Postgres files can be any unprivileged user account.
+It must not be root, bin,
+or any other account with special access rights, as that would create a security risk.
- To check for disk space, use
-$ df -k
-
-
-
-
+
+Log in to the
Postgres superuser account. Most of the
+remaining steps in the installation will happen in this account.
Ftp file
-
ftp://ftp.postgresql.org/pub/postgresql-v6.4.tar.gz
+ ftp://ftp.postgresql.org/pub/postgresql-v6.4.tar.gz
from the Internet. Store it in your home directory.
+If you are not upgrading an existing system then skip to
+.
If you are upgrading an existing system then back up your database.
For alpha- and beta-level releases, the database format is liable
to change, often every few weeks, with no notice besides a quick comment
will be owned by the
Postgres super user.
+To dump your fairly recent post-v6.0 database installation, type
+
+$ pg_dumpall -z > db.out
+
+
To use the latest
pg_dumpall script on your
-existing database before upgrading
Postgres, type:
+existing older database before upgrading
Postgres,
+pull the most recent version of
pg_dumpall
+from the new distribution:
+
$ cd
$ gunzip -c postgresql-v6.4.tar.gz \
| tar xvf - src/bin/pg_dump/pg_dumpall
$ chmod a+x src/bin/pg_dump/pg_dumpall
-$ src/bin/pg_dump/pg_dumpall > db.out
+$ src/bin/pg_dump/pg_dumpall -z > db.out
$ rm -rf src
If you wish to preserve object id's (oids), then use the -o
- option when running
pg_dumpall. However, unless you have a
+ option when running
pg_dumpall.
+However, unless you have a
special reason for doing this (such as using OIDs as keys
in tables), don't do it.
-
+ id="newdirs">
Make new source and install directories. The actual paths can be
different for your installation but you must be consistant throughout this procedure.
If your system is not automatically recognized by configure and you have to do this, please
send email to
-
./config.guess and also what the template file should be.)
+
./config.guess. Indicate what the template file should be.
- As an example, here is the configure script used on a Sparc
- Solaris 2.5 system with /opt/postgres being the install base.
+As an example, here is the configure script used on a Sparc Solaris 2.5 system
+ with /opt/postgres being the installation base directory:
$ ./configure --prefix=/opt/postgres \
The documentation is also available in Postscript format. Look for files
ending with .ps.gz in the same directory.
+
+Install the man page documentation. Type
+
+$ cd /usr/src/pgsql/doc
+$ gmake man
+
+
Compile the program. Type
- 14) If necessary, tell your system how to find the new shared libraries. You can
- do one of the following, preferably the first:
+If necessary, tell your system how to find the new shared libraries. You can
+do one of the following, preferably the first:
If it has not already been done, then prepare account postgres
Any account that will use
Postgres must
- be similarily prepared. (The following instructions are for a
- bash shell. Adapt accordingly for other shells.)
+ be similarly prepared.
+
+
+There are several ways to influence the runtime environment of the
Postgres
+server. Refer to the chapter on Administrator's Guide for more information.
+The following instructions are for a
+ bash/sh shell. Adapt accordingly for other shells.
+
+
-
- Run the regression tests.
- The file /usr/src/pgsql/src/test/regress/README has detailed
- instructions for running and interpreting the regression tests.
- A short version follows here:
-
-
-
-
Run postmaster from your
Postgres superuser account (typically
+
+ Run the regression tests.
+ The file /usr/src/pgsql/src/test/regress/README has detailed
+ instructions for running and interpreting the regression tests.
+ A short version follows here:
+
+
+
+
Type