]> granicus.if.org Git - postgresql/blob - doc/src/sgml/environ.sgml
Minor cleanup in markup, especially in the Output section.
[postgresql] / doc / src / sgml / environ.sgml
1 <Chapter Id="environ">
2 <Title>Setting Up Your Environment</Title>
3
4 <Para>
5      This section discusses how to set up
6      your own environment  so  that  you  can  use  frontend
7      applications.  We assume <ProductName>Postgres</ProductName> has already been 
8      successfully installed and started; refer to the Administrator's Guide
9 and the installation  notes
10      for how to install Postgres.
11 </Para>
12
13 <Para>
14 <ProductName>Postgres</ProductName> is a client/server application. As a user,
15 you only need access to the client portions of the installation (an example
16 of a client application is the interactive monitor <Application>psql</Application>).
17      For simplicity,
18      we will assume that <ProductName>Postgres</ProductName> has been installed in  the
19      directory  <FileName>/usr/local/pgsql</FileName>.   Therefore, wherever
20      you see the directory <FileName>/usr/local/pgsql</FileName> you  should
21      substitute  the name of the directory where <ProductName>Postgres</ProductName> is
22      actually installed.
23      All <ProductName>Postgres</ProductName> commands are installed  in  the  directory
24      <FileName>/usr/local/pgsql/bin</FileName>.   Therefore,  you should add
25      this directory to your shell command path.  If you  use
26      a variant of the Berkeley C shell, such as <Application>csh</Application> or <Application>tcsh</Application>,
27      you would add
28 <ProgramListing>
29 set path = ( /usr/local/pgsql/bin path )
30 </ProgramListing>
31      in the <FileName>.login</FileName> file in your home directory.  If you  use
32      a  variant  of  the  Bourne  shell, such as <Application>sh</Application>, <Application>ksh</Application>, or
33      <Application>bash</Application>, then you would add
34 <ProgramListing>
35 PATH=/usr/local/pgsql/bin PATH
36 export PATH
37 </ProgramListing>
38      to the <FileName>.profile</FileName> file in your home directory.
39      From now on, we will assume that  you  have  added  the
40      <ProductName>Postgres</ProductName>  bin  directory to your path.  In addition, we
41      will make frequent reference to <Quote>setting a shell  
42      variable</Quote>  or  <Quote>setting an environment variable</Quote> throughout
43      this document.  If you did  not  fully  understand  the
44      last  paragraph  on  modifying  your  search  path, you
45      should consult the UNIX manual pages that describe your
46      shell before going any further.
47 </Para>
48
49 <Para>
50 If your site administrator has not set things up in the
51 default  way,  you may have some more work to do.  For example, if the database
52  server machine is a remote machine, you
53 will need to set the <Acronym>PGHOST</Acronym> environment variable to the name
54 of the database server machine.   The  environment  variable
55 <Acronym>PGPORT</Acronym> may also have to be set.  The bottom line is this: if
56 you try to start an application  program  and  it  complains
57 that it cannot connect to the <Application>postmaster</Application>,
58  you should immediately consult your site administrator to make sure that your
59 environment is properly set up.
60 </Para>
61
62 </Chapter>