This page in other versions: 9.1 / 9.2 / 9.3 / 9.4 / current (9.5)  |  Development versions: devel  |  Unsupported versions: 7.2 / 7.3 / 7.4 / 8.0 / 8.1 / 8.2 / 8.3 / 8.4 / 9.0

Chapter 1. Getting Started

1.1. Installation

Before you can use PostgreSQL you need to install it, of course. It is possible that PostgreSQL is already installed at your site, either because it was included in your operating system distribution or because the system administrator already installed it. If that is the case, you should obtain information from the operating system documentation or your system administrator about how to access PostgreSQL.

If you are not sure whether PostgreSQL is already available or whether you can use it for your experimentation then you can install it yourself. Doing so is not hard and it can be a good exercise. PostgreSQL can be installed by any unprivileged user, no superuser (root) access is required.

If you are installing PostgreSQL yourself, then refer to Chapter 14 for instructions on installation, and return to this guide when the installation is complete. Be sure to follow closely the section about setting up the appropriate environment variables.

If your site administrator has not set things up in the default way, you may have some more work to do. For example, if the database server machine is a remote machine, you will need to set the PGHOST environment variable to the name of the database server machine. The environment variable PGPORT may also have to be set. The bottom line is this: if you try to start an application program and it complains that it cannot connect to the database, you should consult your site administrator or, if that is you, the documentation to make sure that your environment is properly set up. If you did not understand the preceding paragraph then read the next section.


Jan. 26, 2004, 2:41 p.m.

New users need to be made aware of the need to edit postgresql,conf to alter tcpip_socket = true and probably also edit pg_hba.conf if they want to connect using TCP/IP.

July 15, 2004, 6:07 a.m.

For Pedro Jimenez,

You have to make sure that you have installed the compiler on your system. For me, it is on the slackware disk 1. I installed all of the glib*.tgz packages and the gcc packages. Then I was able to compile. I\'m a newbie to Linux and had the fortune of having good friends that are experts with Linux. So far Slackware 10 is awesome, especially for someone that is converting from the Windows world.

Sept. 14, 2005, 5:40 a.m.

You only need a compiler if you are going to compile it from source. Most distros have packages of Postgresql prebuilt which makes it much easier - just install it with apt/synaptic, yum, urpmi/rpmdrake, yast, <whatever package management system your distro uses>.

Privacy Policy | About PostgreSQL
Copyright © 1996-2016 The PostgreSQL Global Development Group