~ubuntu-branches/ubuntu/quantal/qgis/quantal

« back to all changes in this revision

Viewing changes to doc/install_guide/node4.html

  • Committer: Bazaar Package Importer
  • Author(s): Steve Halasz
  • Date: 2005-11-05 16:04:45 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051105160445-l0g4isz5bc9yehet
Tags: 0.7.4-1
* New upstream release
* Build GRASS support in qgis-plugin-grass package (Closes: #248649)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 
2
 
 
3
<!--Converted with LaTeX2HTML 2002-2-1 (1.70)
 
4
original version by:  Nikos Drakos, CBLU, University of Leeds
 
5
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
 
6
* with significant contributions from:
 
7
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
 
8
<HTML>
 
9
<HEAD>
 
10
<TITLE>PostgreSQL</TITLE>
 
11
<META NAME="description" CONTENT="PostgreSQL">
 
12
<META NAME="keywords" CONTENT="install">
 
13
<META NAME="resource-type" CONTENT="document">
 
14
<META NAME="distribution" CONTENT="global">
 
15
 
 
16
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
 
17
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
 
18
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
 
19
 
 
20
<LINK REL="STYLESHEET" HREF="install.css">
 
21
 
 
22
<LINK REL="next" HREF="node5.html">
 
23
<LINK REL="previous" HREF="node3.html">
 
24
<LINK REL="up" HREF="install.html">
 
25
<LINK REL="next" HREF="node5.html">
 
26
</HEAD>
 
27
 
 
28
<BODY >
 
29
<!--Navigation Panel-->
 
30
<A NAME="tex2html98"
 
31
  HREF="node5.html">
 
32
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
 
33
<A NAME="tex2html94"
 
34
  HREF="install.html">
 
35
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
 
36
<A NAME="tex2html88"
 
37
  HREF="node3.html">
 
38
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
 
39
<A NAME="tex2html96"
 
40
  HREF="node1.html">
 
41
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>  
 
42
<BR>
 
43
<B> Next:</B> <A NAME="tex2html99"
 
44
  HREF="node5.html">GEOS</A>
 
45
<B> Up:</B> <A NAME="tex2html95"
 
46
  HREF="install.html">Building and Installing QGIS</A>
 
47
<B> Previous:</B> <A NAME="tex2html89"
 
48
  HREF="node3.html">Getting QGIS</A>
 
49
 &nbsp; <B>  <A NAME="tex2html97"
 
50
  HREF="node1.html">Contents</A></B> 
 
51
<BR>
 
52
<BR>
 
53
<!--End of Navigation Panel-->
 
54
 
 
55
<H1><A NAME="SECTION00040000000000000000">
 
56
PostgreSQL</A>
 
57
</H1>
 
58
  QGIS uses the latest features of PostgreSQL. For this reason, version 7.4.x or higher is recommended with QGIS version 0.5. If you choose to add PostgreSQL, you must also install PostGIS and the GEOS library (see below). 
 
59
  
 
60
<OL>
 
61
<LI>Download PostgreSQL source from www.postgresql.org 
 
62
</LI>
 
63
<LI>Extract the source 
 
64
  <PRE>
 
65
  tar -xzf postgresql-7.4.1.tar.gz
 
66
</PRE>
 
67
 
 
68
<P>
 
69
</LI>
 
70
<LI>Change to the source directory 
 
71
  <PRE>
 
72
  cd postgresql-7.4.1
 
73
</PRE>
 
74
 
 
75
<P>
 
76
</LI>
 
77
<LI>Configure PostgreSQL:
 
78
  <PRE>
 
79
  ./configure --prefix=/usr/local/pgsql
 
80
</PRE>
 
81
 
 
82
<P>
 
83
</LI>
 
84
<LI>Build
 
85
  <PRE>
 
86
  make
 
87
</PRE>
 
88
 
 
89
<P>
 
90
</LI>
 
91
<LI>Install
 
92
  <PRE>
 
93
  make install
 
94
</PRE>
 
95
 
 
96
<P>
 
97
</LI>
 
98
<LI>As root, create the postgres user and setup the database (following taken from PostgreSQL INSTALL file with modification)
 
99
 
 
100
<UL>
 
101
<LI>Create the postgres user 
 
102
  <PRE>
 
103
  adduser postgres
 
104
</PRE>
 
105
 
 
106
<P>
 
107
</LI>
 
108
<LI>Create the directory for the PostgreSQL database 
 
109
  <PRE>
 
110
  mkdir /usr/local/pgsql/data
 
111
</PRE>
 
112
 
 
113
<P>
 
114
</LI>
 
115
<LI>Change ownership of the data directory to the postgres user
 
116
  <PRE>
 
117
  chown postgres /usr/local/pgsql/data
 
118
</PRE>
 
119
 
 
120
<P>
 
121
</LI>
 
122
<LI>su to the postgres user (or login as postgres)
 
123
  <PRE>
 
124
  su - postgres
 
125
</PRE>
 
126
 
 
127
<P>
 
128
</LI>
 
129
<LI>Change to the PostgreSQL install directory 
 
130
  <PRE>
 
131
  cd /usr/local/pgsql
 
132
</PRE>
 
133
 
 
134
<P>
 
135
</LI>
 
136
<LI>Initialize the database 
 
137
  <PRE>
 
138
  ./bin/initdb -D /usr/local/pgsql/data
 
139
</PRE>
 
140
 
 
141
<P>
 
142
</LI>
 
143
<LI>Start the PostgreSQL daemon 
 
144
  <FONT SIZE="-1">  </FONT><PRE>
 
145
  ./bin/pg_ctl start  -o "-i" -D /usr/local/pgsql/data -l /home/postgres/serverlog
 
146
</PRE><FONT SIZE="-1"> 
 
147
</FONT>
 
148
<P>
 
149
<FONT SIZE="-1">
 
150
</LI>
 
151
<LI>Create the test database
 
152
</FONT>
 
153
<P>
 
154
<PRE>
 
155
  ./bin/createdb test
 
156
</PRE><FONT SIZE="-1">
 
157
  </FONT>
 
158
</LI>
 
159
</UL>
 
160
</LI>
 
161
<LI>PostgreSQL should now be running. Logon as the postgres user (or use su - postgres). You should be able to connect to the test database and execute a test query with the following commands: 
 
162
 
 
163
<P>
 
164
<PRE>
 
165
  psql test
 
166
  select version();
 
167
  version
 
168
  -------------------------------------------------------------------------------------
 
169
  PostgreSQL 7.4.1 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.1 (SuSE Linux)
 
170
(1 row)
 
171
 
 
172
  \q
 
173
</PRE>
 
174
 
 
175
<P>
 
176
</LI>
 
177
<LI>PostgreSQL install is done
 
178
  
 
179
</LI>
 
180
</OL>
 
181
 
 
182
<P>
 
183
<HR>
 
184
<!--Navigation Panel-->
 
185
<A NAME="tex2html98"
 
186
  HREF="node5.html">
 
187
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
 
188
<A NAME="tex2html94"
 
189
  HREF="install.html">
 
190
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
 
191
<A NAME="tex2html88"
 
192
  HREF="node3.html">
 
193
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
 
194
<A NAME="tex2html96"
 
195
  HREF="node1.html">
 
196
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>  
 
197
<BR>
 
198
<B> Next:</B> <A NAME="tex2html99"
 
199
  HREF="node5.html">GEOS</A>
 
200
<B> Up:</B> <A NAME="tex2html95"
 
201
  HREF="install.html">Building and Installing QGIS</A>
 
202
<B> Previous:</B> <A NAME="tex2html89"
 
203
  HREF="node3.html">Getting QGIS</A>
 
204
 &nbsp; <B>  <A NAME="tex2html97"
 
205
  HREF="node1.html">Contents</A></B> 
 
206
<!--End of Navigation Panel-->
 
207
<ADDRESS>
 
208
Gary Sherman
 
209
2004-10-01
 
210
</ADDRESS>
 
211
</BODY>
 
212
</HTML>