root / pykota / trunk / docs / installation.sgml @ 860

Revision 860, 8.8 kB (checked in by jalet, 21 years ago)

Quota Storage Server installation is OK for PostgreSQL.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1<!-- $Id$ -->
2
3<chapter>
4  <title>Installation</title>
5 
6  <para>Last modified on $Date$</para>
7 
8  <para>
9    Before being able to use <application>PyKota</application>, you have of course to
10    install it first. But before installing, you must carefully plan your installation.
11  </para>
12 
13  <para>
14    First you have to determine which machine will be the <application>PyKota</application>
15    <firstterm>Storage Server</firstterm>. The Storage Server is the host responsible
16    for keeping a centralized database of print usage for all your printers, users and groups.
17  </para>
18 
19  <para>
20    Then you have to list all the <firstterm>Print Servers</firstterm> for which
21    you plan to use <firstterm>print quota</firstterm> facilities.
22  </para>
23 
24  <para>
25    Now we will see what has to be done on these servers.
26    <note>
27      <title>Note</title>
28      <para>
29        Of course, depending on the size of your network, you may very well
30        use the same machine as both a Print Server and a Storage Server.
31        This is especially the case if you've got only one server.
32      </para>
33    </note> 
34  </para>
35 
36  <sect1>
37    <title>Storage Server Installation</title>
38   
39    <para>
40      Depending on <application>PyKota</application>'s version number, different
41      types of storage backends may be supported, so we will see for each one of
42      them how to configure it.
43    </para>
44   
45    <sect2>
46      <title>PostgreSQL</title>
47     
48      <para>
49        <application>PostgreSQL</application> is an <firstterm>Object Relationnal DataBase
50        Management System</firstterm> distributed under a <firstterm>Free Software</firstterm>
51        license from the
52        <ulink url="http://www.postgresql.org">http://www.postgresql.org</ulink>
53        web site. It certainely is the free <acronym>RDBMS</acronym> which has the most advanced
54        features, and is widely used all over the world.
55      </para>
56     
57      <para>
58        To configure your Storage Server, you must have PostgreSQL already working.
59        The complete installation of <application>PostgreSQL</application> is not covered by
60        the present manual, please refer to your system's documentation or to
61        <ulink url="http://www.postgresql.org">http://www.postgresql.org</ulink> for
62        details.
63      </para>
64     
65      <para>
66        One thing you have to check, though, is that every Print Server on which you
67        want to install the print quota mechanism, i.e. the print servers, must be able to connect to the
68        <application>PostgreSQL</application> server. In the default installation of
69        <application>PostgreSQL</application> this may not be the case for security reasons, except if both
70        servers are in fact the same machine. In any case, it is recommended that you
71        check the <filename>/etc/postgresql/pg_hba.conf</filename> and modify it if
72        needed. This file is self documented and its modification is straightforward.
73        You also have to make sure that <application>PostgreSQL</application> accepts <acronym>TCP/IP</acronym> connections.
74        To do so you either have to launch it with the <option>-i</option> option or
75        modify the <filename>/etc/postgresql/postgresql.conf</filename>, which is
76        self documented and easy to modify too.
77        <tip>
78          <title>Tip</title>
79          <para>
80            Don't forget to restart <application>PostgreSQL</application> if you modify
81            any of its configuration files, in order for the changes to take effect.
82          </para>
83        </tip> 
84      </para>
85     
86      <para>
87        Be careful, you may be unable to connect from a Print Server to the <application>PostgreSQL</application>
88        server even if the configuration is correct. Sometimes your connections may be blocked by
89        one or more network firewalls along the route from one machine to the other. If this
90        is the case, then the best thing you can do is to ask your <firstterm>Network Administrator</firstterm>
91        to not filter the IP port used by <application>PostgreSQL</application>, which is
92        usually port 5432/tcp.
93        <note>
94          <title>Note</title>
95          <para>
96            The TCP/IP network port used by PostgreSQL may be different. When in doubt, ask your
97            <firstterm>System Administrator</firstterm> for the correct value.
98          </para>
99        </note> 
100      </para>
101     
102      <para>
103        Now that your <application>PostgreSQL</application> server is up and running, and
104        is waiting for your connections, you have to create the Quota Storage DataBase.
105        To do so, you'll have to feed <application>PostgreSQL</application> with the
106        <filename>pykota-x.xx/initscripts/pykota-postgresql.sql</filename> file.
107        This file will create a Quota DataBase administrator and a Quota DataBase user
108        in the <application>PostgreSQL</application> system, then create an empty
109        Quota DataBase and set some permissions on it.
110      </para>
111     
112      <para>
113        To run this script, you can use the <application>psql</application> frontend to
114        <application>PostgreSQL</application>, but your priviledges must be sufficient
115        to be allowed to create users and databases. You can launch <application>psql</application>
116        as the <literal>postgres</literal> user which is <application>PostgreSQL</application>'s
117        default administrator, and connect to the default database named <literal>template1</literal>.
118        From a command line interpreter (i.e. shell), type the following commands :
119        <screen>
120jerome@nordine:~$ cd pykota-1.02-official/initscripts/
121jerome@nordine:~/pykota-1.02-official/initscripts$ psql -h localhost -U postgres template1
122Welcome to psql, the PostgreSQL interactive terminal.
123
124Type:  \copyright for distribution terms
125       \h for help with SQL commands
126       \? for help on internal slash commands
127       \g or terminate with semicolon to execute query
128       \q to quit
129
130template1=# \i pykota-postgresql.sql
131            ... a lot of output lines
132template1=# \q     
133        </screen>
134      </para>
135     
136      <para>
137        If no error occured, then your Quota DataBase is ready to be used.
138        Now you can let the Quota Storage Server alone, the remaining work
139        will have to be done on each one of the print servers which will
140        use this particular Quota Storage Server.
141        <tip>
142          <title>Tip</title>
143          <para>
144            If an error occured, maybe your PostgreSQL version is too old, or
145            an unexpected problem (like a bug) happened. Please send me an email so that I
146            can try to solve the problem. Thanks in advance.
147          </para>
148        </tip> 
149      </para>
150    </sect2> 
151   
152    <sect2>
153      <title>MySQL</title>
154     
155      <para>
156        A <application>MySQL</application> Storage Backend is planned, but it actually
157        doesn't exist.
158      </para>
159    </sect2> 
160   
161    <sect2>
162      <title>LDAP</title>
163     
164      <para>
165        An <application>LDAP</application> Storage Backend is planned, but it actually
166        doesn't exist. Some people may already be working on this, though.
167      </para>
168    </sect2> 
169   
170    <sect2>
171      <title>Berkeley DB</title>
172     
173      <para>
174        A <application>Berkeley DB</application> Storage Backend is planned, but it actually
175        doesn't exist. It seems that remote storage won't be possible with such a backend,
176        so in other terms this means that you will have a different quota database on
177        each print server. This may still prove to be useful for small configurations.
178      </para>
179    </sect2> 
180  </sect1> 
181 
182  <sect1>
183    <title>Print Server Installation</title>
184   
185    <para>
186      For each Print Server on which you plan to implement the print quota
187      mechanism, you have, of course, to have an already working printing environment.
188      Currently <application>PyKota</application> only works with the
189      <ulink url="http://www.cups.org"><application>CUPS</application></ulink> environment,
190      but more may be added in the future.
191    </para>
192   
193    <para>
194      TODO
195    </para>
196  </sect1> 
197</chapter>
198
199<!--
200
201$Log$
202Revision 1.6  2003/03/22 14:06:02  jalet
203Quota Storage Server installation is OK for PostgreSQL.
204
205Revision 1.5  2003/03/22 13:11:33  jalet
206The port on which the Quota Storage Sever is listening can now
207be set in the configuration file (see sample).
208Better error handling if PygreSQL is not installed.
209Improved documentation.
210Version number changed to 1.02alpha
211
212Revision 1.4  2003/03/22 07:20:38  jalet
213More information wrt PostgreSQL tcp/ip configuration.
214
215Revision 1.3  2003/03/18 22:18:25  jalet
216The documentation will only be a sequence of chapters in a single part, not
217multiple parts each including chapters.
218
219Revision 1.2  2003/03/18 22:10:54  jalet
220Documentation improvements.
221
222Revision 1.1  2003/02/08 00:03:35  jalet
223Documentation skeleton added
224
225
226-->
Note: See TracBrowser for help on using the browser.