1 | <!-- $Id$ --> |
---|
2 | |
---|
3 | <chapter> |
---|
4 | <title id="installation">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 | Finally you have to download <application>PyKota</application>'s latest version |
---|
26 | or buy an official package, from |
---|
27 | <ulink url="http://www.librelogiciel.com/software/">http://www.librelogiciel.com/software/</ulink>. |
---|
28 | If you've just bought an official package, then as soon as you've receive it you |
---|
29 | have to decompress and visit its archive, to do so just type the following commands : |
---|
30 | <screen> |
---|
31 | jerome@nordine:~$ tar -zxf pykota-1.18_official.tar.gz |
---|
32 | jerome@nordine:~$ cd pykota-1.18_official |
---|
33 | jerome@nordine:~/pykota-1.18_official$ |
---|
34 | </screen> |
---|
35 | </para> |
---|
36 | |
---|
37 | <para> |
---|
38 | You can see many files in this directory, the first ones to read are <filename>README</filename>, |
---|
39 | then <filename>COPYING</filename> and <filename>LICENSE</filename>. They will give you |
---|
40 | basic installation instructions and explain the licensing terms under which |
---|
41 | <application>PyKota</application> is distributed. Of course they are also mostly |
---|
42 | boring to read ! Detailed installation and operating instructions are defined |
---|
43 | in the <filename>./docs</filename> directory, in the form of <acronym>SGML</acronym> |
---|
44 | documentation in the <ulink url="http://www.docbook.org">DocBook</ulink> format. |
---|
45 | You have to compile these files into readable documentation like the <acronym>HTML</acronym> |
---|
46 | or <acronym>PDF</acronym> formats, or buy an official <application>PyKota</application> package |
---|
47 | which already contains these compiled forms of the documentation. Of course you already |
---|
48 | know this because that's what you are currently reading ! |
---|
49 | </para> |
---|
50 | |
---|
51 | <para> |
---|
52 | Now we will see what has to be done on each of the servers we are planning to use. |
---|
53 | <note> |
---|
54 | <title>Note</title> |
---|
55 | <para> |
---|
56 | Of course, depending on the size of your network, you may very well |
---|
57 | use the same machine as both a Print Server and a Storage Server. |
---|
58 | This is especially the case if you've got only one server. |
---|
59 | </para> |
---|
60 | </note> |
---|
61 | </para> |
---|
62 | |
---|
63 | <sect1> |
---|
64 | <title>Storage Server Installation</title> |
---|
65 | |
---|
66 | <para> |
---|
67 | Depending on <application>PyKota</application>'s version number, different |
---|
68 | types of storage backends may be supported, so we will see for each one of |
---|
69 | them how to configure it. |
---|
70 | </para> |
---|
71 | |
---|
72 | <sect2> |
---|
73 | <title>PostgreSQL</title> |
---|
74 | |
---|
75 | <para> |
---|
76 | <application>PostgreSQL</application> is an <firstterm>Object Relationnal DataBase |
---|
77 | Management System</firstterm> distributed under a <firstterm>Free Software</firstterm> |
---|
78 | license from the |
---|
79 | <ulink url="http://www.postgresql.org">http://www.postgresql.org</ulink> |
---|
80 | web site. It certainely is the free <acronym>RDBMS</acronym> which has the most advanced |
---|
81 | features, and is widely used all over the world. |
---|
82 | </para> |
---|
83 | |
---|
84 | <para> |
---|
85 | To configure your Storage Server, you must have PostgreSQL already working. |
---|
86 | The complete installation of <application>PostgreSQL</application> is not covered by |
---|
87 | the present manual, please refer to your system's documentation or to |
---|
88 | <ulink url="http://www.postgresql.org">http://www.postgresql.org</ulink> for |
---|
89 | details. |
---|
90 | </para> |
---|
91 | |
---|
92 | <para> |
---|
93 | One thing you have to check, though, is that every Print Server on which you |
---|
94 | want to install the print quota mechanism, must be able to connect to the |
---|
95 | <application>PostgreSQL</application> server. In the default installation of |
---|
96 | <application>PostgreSQL</application> this may not be the case for security reasons, except if both |
---|
97 | servers are in fact the same machine. In any case, it is recommended that you |
---|
98 | check the <filename>/etc/postgresql/pg_hba.conf</filename> file and modify it if |
---|
99 | needed. This file is self documented and its modification is straightforward. |
---|
100 | You also have to make sure that <application>PostgreSQL</application> accepts <acronym>TCP/IP</acronym> connections. |
---|
101 | To do so you either have to launch it with the <option>-i</option> option or |
---|
102 | modify the <filename>/etc/postgresql/postgresql.conf</filename> file, which is |
---|
103 | self documented and easy to modify too. Allowing <acronym>TCP/IP</acronym> connections |
---|
104 | is not necessary though if your Quota Storage Server and your Print Server are |
---|
105 | the very same host. |
---|
106 | <tip> |
---|
107 | <title>Tip</title> |
---|
108 | <para> |
---|
109 | Don't forget to restart <application>PostgreSQL</application> if you modify |
---|
110 | any of its configuration files, in order for the changes to take effect. |
---|
111 | </para> |
---|
112 | </tip> |
---|
113 | </para> |
---|
114 | |
---|
115 | <para> |
---|
116 | Be careful, you may be unable to connect from a Print Server to the <application>PostgreSQL</application> |
---|
117 | server even if the configuration is correct. Sometimes your connections may be blocked by |
---|
118 | one or more network firewalls along the route from one machine to the other. If this |
---|
119 | is the case, then the best thing you can do is to ask your <firstterm>Network Administrator</firstterm> |
---|
120 | to not filter the IP port used by <application>PostgreSQL</application>, which is |
---|
121 | usually port <literal>5432/tcp</literal>. |
---|
122 | <note> |
---|
123 | <title>Note</title> |
---|
124 | <para> |
---|
125 | The TCP/IP network port used by PostgreSQL may be different. When in doubt, ask your |
---|
126 | <firstterm>System Administrator</firstterm> for the correct value. |
---|
127 | </para> |
---|
128 | </note> |
---|
129 | </para> |
---|
130 | |
---|
131 | <para> |
---|
132 | Now that your <application>PostgreSQL</application> server is up and running, and |
---|
133 | is waiting for your connections, you have to create the Quota Storage DataBase. |
---|
134 | To do so, you'll have to feed <application>PostgreSQL</application> with the |
---|
135 | <filename>pykota-x.xx/initscripts/postgresql/pykota-postgresql.sql</filename> file. |
---|
136 | This file will create a Quota DataBase administrator in the <application>PostgreSQL</application> system, then create an empty |
---|
137 | Quota DataBase and set some permissions on it. The Quota DataBase administrator |
---|
138 | is the <application>PostgreSQL</application>'s user used to manage the Quota database. |
---|
139 | The Quota DataBase Administrator is not present in the Quota Database |
---|
140 | itself, he is only defined in <application>PostgreSQL</application> and don't |
---|
141 | have to exist on any system, nor in the Quota DataBase. His default name |
---|
142 | is <literal>pykotaadmin</literal>. |
---|
143 | A Quota Storage read-only user is also created under the name of <literal>pykotauser</literal>. |
---|
144 | This read-only user is used by <application>PyKota</application> to connect to the |
---|
145 | Quota Storage when a non-root user launches a pykota command. This prevents normal |
---|
146 | users from being able to modify their own, or other users', quota information. |
---|
147 | The database which will be created will be named <literal>pykota</literal> by default. |
---|
148 | <note> |
---|
149 | <title>Note</title> |
---|
150 | <para> |
---|
151 | You can choose other names if you want, just modify the |
---|
152 | <filename>initscripts/postgresql/pykota-postgresql.sql</filename> file |
---|
153 | accordingly, and report your changes into <application>PyKota</application>'s |
---|
154 | configuration file. |
---|
155 | </para> |
---|
156 | </note> |
---|
157 | </para> |
---|
158 | |
---|
159 | <para> |
---|
160 | To run this script, you can use the <application>psql</application> frontend to |
---|
161 | <application>PostgreSQL</application>, but your priviledges must be sufficient |
---|
162 | to be allowed to create users and databases. You can launch <application>psql</application> |
---|
163 | as the <literal>postgres</literal> user which is <application>PostgreSQL</application>'s |
---|
164 | default administrator, and connect to the default database named <literal>template1</literal>. |
---|
165 | From a command line interpreter (i.e. shell), type the following commands : |
---|
166 | <screen> |
---|
167 | jerome@nordine:~$ cd pykota-1.18_official/initscripts/postgresql |
---|
168 | jerome@nordine:~/pykota-1.18_official/initscripts$ psql -h localhost -U postgres template1 |
---|
169 | Welcome to psql, the PostgreSQL interactive terminal. |
---|
170 | |
---|
171 | Type: \copyright for distribution terms |
---|
172 | \h for help with SQL commands |
---|
173 | \? for help on internal slash commands |
---|
174 | \g or terminate with semicolon to execute query |
---|
175 | \q to quit |
---|
176 | |
---|
177 | template1=# \i pykota-postgresql.sql |
---|
178 | ... a lot of output lines |
---|
179 | pykota=# |
---|
180 | </screen> |
---|
181 | </para> |
---|
182 | |
---|
183 | <para> |
---|
184 | For security reasons, you may want to set passwords in |
---|
185 | <application>PostgreSQL</application> for the |
---|
186 | <literal>pykotaadmin</literal> and <literal>pykotauser</literal> users. |
---|
187 | Otherwise any user able to connect to |
---|
188 | <application>PostgreSQL</application> on your Quota Storage Server |
---|
189 | could connect to the quota database, and either see it, or even modify it without problem. |
---|
190 | </para> |
---|
191 | |
---|
192 | <para> |
---|
193 | To do so, just type the following lines while still being at the <application>psql</application> |
---|
194 | prompt (replace the password values by your own, and do the same for the <literal>pykotauser</literal> user) : |
---|
195 | <screen> |
---|
196 | pykota=# ALTER USER pykotaadmin PASSWORD 'somepassword'; |
---|
197 | ALTER USER |
---|
198 | pykota=# \q |
---|
199 | jerome@nordine:~/pykota-1.18_official/initscripts/postgresql$ |
---|
200 | </screen> |
---|
201 | </para> |
---|
202 | |
---|
203 | <para> |
---|
204 | The <literal>\q</literal> command above will quit the <application>psql</application> |
---|
205 | program and return you to the shell's command line prompt. |
---|
206 | </para> |
---|
207 | |
---|
208 | <para> |
---|
209 | To improve security further, you could encrypt your database connections, or |
---|
210 | take any other step as needed. Please refer to <application>PostgreSQL</application>'s |
---|
211 | documentation for details. Also if <application>PyKota</application>'s configuration |
---|
212 | file <filename>/etc/pykota/pykotadmin.conf</filename> is readable by anyone with access on your file system, a local user could |
---|
213 | create some script to modify his own print quota. |
---|
214 | <warning> |
---|
215 | <title>Warning</title> |
---|
216 | <para> |
---|
217 | Defining passwords may not be sufficient if your database access rule is |
---|
218 | set to <literal>trust</literal> in the <filename>/etc/postgresql/pg_hba.conf</filename>. |
---|
219 | Again, please refer to <application>PostgreSQL</application>'s documentation |
---|
220 | for details. Also, passwords will fly unencrypted over the network by default, |
---|
221 | so be sure to take any necessary step to secure your database server from |
---|
222 | unauthorized use. This has nothing to do with <application>PyKota</application> |
---|
223 | though, it is just a general rule to keep in mind. |
---|
224 | </para> |
---|
225 | </warning> |
---|
226 | </para> |
---|
227 | |
---|
228 | <para> |
---|
229 | If no error occured, then your Quota DataBase is ready to be used. |
---|
230 | Now you can let the Quota Storage Server alone, the remaining work |
---|
231 | will have to be done on each one of the print servers which will |
---|
232 | use this particular Quota Storage Server. |
---|
233 | <tip> |
---|
234 | <title>Tip</title> |
---|
235 | <para> |
---|
236 | If an error occured, maybe your PostgreSQL version is too old, or |
---|
237 | an unexpected problem (like a bug) happened. Please contact us via email so that we |
---|
238 | can try to solve the problem. Thanks in advance. |
---|
239 | </para> |
---|
240 | </tip> |
---|
241 | </para> |
---|
242 | |
---|
243 | </sect2> |
---|
244 | |
---|
245 | <sect2> |
---|
246 | <title>OpenLDAP</title> |
---|
247 | |
---|
248 | <para> |
---|
249 | From version 1.09 on, <application>OpenLDAP</application> can be used as a Quota Storage Backend. |
---|
250 | It is possible that other LDAP servers can be used, but this is currently untested. |
---|
251 | </para> |
---|
252 | |
---|
253 | <para> |
---|
254 | <application>OpenLDAP</application> is a Lightweight Directory Access Protocol server |
---|
255 | implementation published as Free Software. |
---|
256 | You can download it from <ulink url="http://www.openldap.org">http://www.openldap.org</ulink>. |
---|
257 | </para> |
---|
258 | |
---|
259 | <para> |
---|
260 | To use <application>OpenLDAP</application> as your Quota Storage Backend, you have to copy the |
---|
261 | <filename>pykota/initscripts/ldap/pykota.schema</filename> in <application>OpenLDAP</application>'s |
---|
262 | schemas directory. |
---|
263 | Under Debian GNU/Linux, this is something like : |
---|
264 | <screen> |
---|
265 | $ cp pykota.schema /etc/ldap/schema |
---|
266 | </screen> |
---|
267 | </para> |
---|
268 | <para> |
---|
269 | Then edit <filename>/etc/ldap/slapd.conf</filename> and add a line to |
---|
270 | include the PyKota schema. You should have something |
---|
271 | like : |
---|
272 | <screen> |
---|
273 | # Schema and objectClass definitions |
---|
274 | include /etc/ldap/schema/core.schema |
---|
275 | include /etc/ldap/schema/cosine.schema |
---|
276 | include /etc/ldap/schema/nis.schema |
---|
277 | include /etc/ldap/schema/inetorgperson.schema |
---|
278 | include /etc/ldap/schema/pykota.schema |
---|
279 | </screen> |
---|
280 | </para> |
---|
281 | |
---|
282 | <para> |
---|
283 | While this is not mandatory, it is recommended that you setup |
---|
284 | some indexes for some often accessed PyKota attributes. |
---|
285 | Actually, the <acronym>LDAP</acronym> schema included with |
---|
286 | PyKota doesn't allow indexes of another type than <literal>eq</literal>, |
---|
287 | but this will change in a next release. Here are the minimal indexes |
---|
288 | lines you may want to put in <filename>slapd.conf</filename> : |
---|
289 | <screen> |
---|
290 | # Indexes for PyKota |
---|
291 | index pykotaUserName eq |
---|
292 | index pykotaGroupName eq |
---|
293 | index pykotaPrinterName eq |
---|
294 | index pykotaLastJobIdent eq |
---|
295 | </screen> |
---|
296 | </para> |
---|
297 | |
---|
298 | <para> |
---|
299 | Finally, restart the <application>OpenLDAP</application> server : |
---|
300 | <screen> |
---|
301 | $ /etc/init.d/slapd restart |
---|
302 | </screen> |
---|
303 | </para> |
---|
304 | |
---|
305 | <para> |
---|
306 | With an <acronym>LDAP</acronym> backend, PyKota will need some branches |
---|
307 | in your <acronym>LDAP</acronym> directory to put its own datas. |
---|
308 | You can configure PyKota to either attach its datas to your existing |
---|
309 | users and groups, or to put them in their own <literal>ou</literal>. |
---|
310 | But some <literal>ou</literal>s dedicated to PyKota are needed in any case, |
---|
311 | so the best bet may be to put all PyKota's datas below an <literal>ou=PyKota</literal> |
---|
312 | branch. While this will separate these datas from your existing users and groups |
---|
313 | entries, this may ease the maintainance. |
---|
314 | </para> |
---|
315 | |
---|
316 | <para> |
---|
317 | PyKota needs at least an <literal>ou</literal> for printers, for users quotas, for |
---|
318 | groups quotas, for print jobs, and for pointers to the last job of each printer. |
---|
319 | In the future, this last <literal>ou</literal> may disappear as its content |
---|
320 | will probably be attached to each printer. |
---|
321 | </para> |
---|
322 | |
---|
323 | <para> |
---|
324 | Actually PyKota doesn't create these <literal>ou</literal>s for you, because it's |
---|
325 | difficult to guess what is the best configuration for you. So you have to |
---|
326 | create them by yourself, either directly with a text editor and the |
---|
327 | <application>ldapadd</application> command, or with some specialized tool |
---|
328 | like <application>gq</application>. |
---|
329 | </para> |
---|
330 | |
---|
331 | <para> |
---|
332 | Once you have chosen and created your directory structure, you have to modify PyKota's configuration files <filename>/etc/pykota/pykota.conf</filename> |
---|
333 | and <filename>/etc/pykota/pykotadmin.conf</filename> |
---|
334 | to set some LDAP specific options and binding <literal>dn</literal>s. The easiest is |
---|
335 | probably to give a look at |
---|
336 | <filename>pykota/conf/pykota.conf.sample</filename> to see all the options that are |
---|
337 | needed. Adapt the values to your own configuration, and finally initialize your |
---|
338 | Quota Storage with the help of the <application>edpykota</application> command. |
---|
339 | </para> |
---|
340 | </sect2> |
---|
341 | |
---|
342 | <sect2> |
---|
343 | <title>MySQL</title> |
---|
344 | |
---|
345 | <para> |
---|
346 | A <application>MySQL</application> Storage Backend is planned, but it actually |
---|
347 | doesn't exist. |
---|
348 | </para> |
---|
349 | </sect2> |
---|
350 | |
---|
351 | <sect2> |
---|
352 | <title>Berkeley DB</title> |
---|
353 | |
---|
354 | <para> |
---|
355 | A <application>Berkeley DB</application> Storage Backend is planned, but it actually |
---|
356 | doesn't exist. It seems that remote storage won't be possible with such a backend, |
---|
357 | so in other terms this means that you will have a different quota database on |
---|
358 | each print server. This may still prove to be useful for small configurations. |
---|
359 | </para> |
---|
360 | </sect2> |
---|
361 | </sect1> |
---|
362 | |
---|
363 | <sect1> |
---|
364 | <title>Print Server Installation</title> |
---|
365 | |
---|
366 | <para> |
---|
367 | For each Print Server on which you plan to implement the print quota |
---|
368 | mechanism, you have, of course, to have an already working printing environment. |
---|
369 | Currently <application>PyKota</application> works with either |
---|
370 | <ulink url="http://www.cups.org"><application>CUPS</application></ulink> |
---|
371 | or <ulink url="http://lprng.sourceforge.net"><application>LPRng</application></ulink>, |
---|
372 | but more printing systems may be added in the future. |
---|
373 | </para> |
---|
374 | |
---|
375 | <para> |
---|
376 | Here's the list of software you have to install on each Print Server, version numbers |
---|
377 | are given as an indication of which was successfully tested, but older versions may |
---|
378 | work too. |
---|
379 | <itemizedlist> |
---|
380 | <listitem> |
---|
381 | <para> |
---|
382 | <application>CUPS</application> version 1.1 or above, or <application>LPRng</application> |
---|
383 | version 3.8.20 or above (it probably works with older versions but this is untested). |
---|
384 | You can download them from <ulink url="http://www.cups.org">http://www.cups.org</ulink> |
---|
385 | or <ulink url="http://lprng.sourceforge.net">http://lprng.sourceforge.net</ulink> |
---|
386 | </para> |
---|
387 | </listitem> |
---|
388 | <listitem> |
---|
389 | <para> |
---|
390 | Python version 2.1 or above. |
---|
391 | You can download it from <ulink url="http://www.python.org">http://www.python.org</ulink>. |
---|
392 | </para> |
---|
393 | </listitem> |
---|
394 | <listitem> |
---|
395 | <para> |
---|
396 | Quota Storage client libraries, depending on your Quota Storage Backend : |
---|
397 | <itemizedlist> |
---|
398 | <listitem> |
---|
399 | <para> |
---|
400 | PostgreSQL backend : |
---|
401 | <itemizedlist> |
---|
402 | <listitem> |
---|
403 | <para> |
---|
404 | <application>PostgreSQL</application> client libraries. They must match the <application>PostgreSQL</application> |
---|
405 | version used on your Quota Storage Server. |
---|
406 | </para> |
---|
407 | </listitem> |
---|
408 | <listitem> |
---|
409 | <para> |
---|
410 | The <application>PygreSQL</application> python module. |
---|
411 | It must have been compiled against the same |
---|
412 | <application>PostgreSQL</application> client libraries. |
---|
413 | <application>PygreSQL</application> is normally included in |
---|
414 | <application>PostgreSQL</application>, but you may want to |
---|
415 | download it from <ulink url="http://www.pygresql.org">http://www.pygresql.org</ulink> |
---|
416 | </para> |
---|
417 | </listitem> |
---|
418 | </itemizedlist> |
---|
419 | </para> |
---|
420 | </listitem> |
---|
421 | <listitem> |
---|
422 | <para> |
---|
423 | OpenLDAP backend : |
---|
424 | <itemizedlist> |
---|
425 | <listitem> |
---|
426 | <para> |
---|
427 | <application>OpenLDAP</application> client libraries. They must match |
---|
428 | the <application>OpenLDAP</application> version used on your Quota Storage Server. |
---|
429 | </para> |
---|
430 | </listitem> |
---|
431 | <listitem> |
---|
432 | <para> |
---|
433 | The <application>Python-LDAP</application> python module. |
---|
434 | It must have been compiled against the same |
---|
435 | <application>OpenLDAP</application> client libraries. |
---|
436 | You may download this module from <ulink url="http://python-ldap.sourceforge.net">http://python-ldap.sourceforge.net</ulink> |
---|
437 | </para> |
---|
438 | </listitem> |
---|
439 | </itemizedlist> |
---|
440 | </para> |
---|
441 | </listitem> |
---|
442 | <listitem> |
---|
443 | <para> |
---|
444 | MySQL backend : TODO |
---|
445 | </para> |
---|
446 | </listitem> |
---|
447 | <listitem> |
---|
448 | <para> |
---|
449 | Berkeley DB backend : TODO |
---|
450 | </para> |
---|
451 | </listitem> |
---|
452 | </itemizedlist> |
---|
453 | </para> |
---|
454 | </listitem> |
---|
455 | <listitem> |
---|
456 | <para> |
---|
457 | <application>ucd-snmp</application> or <application>net-snmp</application> tools, version 4.2.5 or above. You only need |
---|
458 | the <application>snmpget</application> command. |
---|
459 | You can download this software from <ulink url="http://www.sourceforge.net/projects/net-snmp/">http://www.sourceforge.net/projects/net-snmp/</ulink>. |
---|
460 | You only need this if you plan to query your printers for their internal page counter via SNMP. |
---|
461 | </para> |
---|
462 | </listitem> |
---|
463 | <listitem> |
---|
464 | <para> |
---|
465 | <application>netatalk</application> version 1.6.1 or above. You only need |
---|
466 | the <application>pap</application> command. |
---|
467 | You can download this software from <ulink url="http://netatalk.sourceforge.net/">http://netatalk.sourceforge.net/</ulink>. |
---|
468 | You only need this if you plan to query your printers for their internal page counter via AppleTalk. |
---|
469 | </para> |
---|
470 | </listitem> |
---|
471 | <listitem> |
---|
472 | <para> |
---|
473 | eGenix' mxDateTime Python module version 2.0.3 or above. It must match your default Python version. |
---|
474 | You can download it from <ulink url="http://www.egenix.com">http://www.egenix.com</ulink>. |
---|
475 | </para> |
---|
476 | </listitem> |
---|
477 | </itemizedlist> |
---|
478 | </para> |
---|
479 | |
---|
480 | <para> |
---|
481 | Instead of downloading all these programs' sources and compiling them, which really |
---|
482 | is a boring task considering that many software are needed, you may prefer to look |
---|
483 | into the packages included with your GNU/Linux distribution of choice (if you use |
---|
484 | this operating system of course). Most, if not all, GNU/Linux distributions include |
---|
485 | all the software mentionned above, in the form of packages which are easier to |
---|
486 | install than sources tarballs. This is probably the same for the many *BSD |
---|
487 | distributions. |
---|
488 | </para> |
---|
489 | |
---|
490 | <para> |
---|
491 | Once all these software are installed, installing PyKota itself is a breeze. |
---|
492 | PyKota being written entirely in the Python language, which is interpreted, |
---|
493 | there's no need to compile anything. You just have to execute the installation |
---|
494 | script : |
---|
495 | <screen> |
---|
496 | $ python setup.py install |
---|
497 | </screen> |
---|
498 | </para> |
---|
499 | |
---|
500 | <para> |
---|
501 | The installation script will try to do a safe upgrade if needed. |
---|
502 | Also it will check if some needed software is missing or unavailable |
---|
503 | and will tell you so. This may be the case for example if you |
---|
504 | installed several versions of the Python language, and some Python |
---|
505 | modules are only available for one of them which is not the one you |
---|
506 | are actually running. |
---|
507 | </para> |
---|
508 | |
---|
509 | <para> |
---|
510 | On your first installation, the setup script will automatically create |
---|
511 | the <filename>/etc/pykota</filename> directory and put the sample |
---|
512 | configuration files <filename>conf/pykota.conf.sample</filename> and |
---|
513 | <filename>conf/pykotadmin.conf.sample</filename> there, after having |
---|
514 | renamed them respectively <filename>pykota.conf</filename> and |
---|
515 | <filename>pykotadmin.conf</filename>. Once copied there, you just |
---|
516 | have to modify these files to adapt them to your own setup. |
---|
517 | These files are heavily commented, so you should have no problem. |
---|
518 | Also their format is quite common, because it's the one used by |
---|
519 | <application>Samba</application> for example, or by <literal>.ini</literal> |
---|
520 | files under <application>MS-Windows</application>, so you may already |
---|
521 | be familiar with this syntax. |
---|
522 | In a future release, this documentation will include the complete |
---|
523 | reference for all configuration fields available. Keep in mind that |
---|
524 | PyKota can be really heavily customized, and can delegate some work |
---|
525 | to any external command of your choice. |
---|
526 | </para> |
---|
527 | |
---|
528 | <para> |
---|
529 | On later installations, the setup script won't modify any of your |
---|
530 | configuration files. However it will try to explain what have changed |
---|
531 | and encourages you to manually do the modifications which are needed. |
---|
532 | Please create a backup of the <filename>/etc/pykota</filename> |
---|
533 | directory before modifying anything. |
---|
534 | Under some circumstances, the setup PyKota may refuse to install PyKota |
---|
535 | until you have modified your configuration. Just do it and restart |
---|
536 | the installation script as described above. |
---|
537 | </para> |
---|
538 | |
---|
539 | <para> |
---|
540 | PyKota features some interesting possibilities which allow you to |
---|
541 | define options either globally so that they apply to all printers, |
---|
542 | or on a per printer basis. Please see the sample configuration files |
---|
543 | to see what I mean. In the simplest form, only a global section is |
---|
544 | needed. In more complex configurations, you will have to create |
---|
545 | one section per printer. Each section in the configuration files |
---|
546 | begins with a name between square brackets <literal>[]</literal>. |
---|
547 | The name to use to define a particular printer section is the name |
---|
548 | of the print queue on which you want to set quotas. |
---|
549 | </para> |
---|
550 | |
---|
551 | <para> |
---|
552 | After you have modified PyKota's configuration files, you have to |
---|
553 | double check their permissions, otherwise your installation may be |
---|
554 | insecure or may not work at all. |
---|
555 | The main configuration file <filename>/etc/pykota/pykota.conf</filename> |
---|
556 | doesn't contain much sensitive information, so it can be made |
---|
557 | readable by anyone. If normal users read this file, at best they |
---|
558 | will learn the username and optional password of the read-only |
---|
559 | database user, so they won't be allowed to do any harm. |
---|
560 | On the other hand, the <filename>/etc/pykota/pykotadmin.conf</filename> |
---|
561 | file contains the read-write user's identity and password. You must then |
---|
562 | ensure that no normal user can read this file. It should only be readable |
---|
563 | by the <literal>root</literal> user, which is always the case, by |
---|
564 | the user your printing system is running as, and optionally by the print administrators, |
---|
565 | who are usually members of the <literal>lpadmin</literal> group. Under my Debian GNU/Linux system, |
---|
566 | with CUPS, here's how to do to give the correct permissions : |
---|
567 | <screen> |
---|
568 | $ chown root.root /etc/pykota/pykota.conf |
---|
569 | $ chmod 644 /etc/pykota/pykota.conf |
---|
570 | $ chown lp.lpadmin /etc/pykota/pykotadmin.conf |
---|
571 | $ chmod 640 /etc/pykota/pykotadmin.conf |
---|
572 | </screen> |
---|
573 | </para> |
---|
574 | |
---|
575 | <para> |
---|
576 | Now depending on your printing system, the configuration to do is particular. |
---|
577 | We will now see how to plug PyKota into your printing system. |
---|
578 | </para> |
---|
579 | |
---|
580 | <sect2> |
---|
581 | <title>With CUPS</title> |
---|
582 | |
---|
583 | <para> |
---|
584 | From version 1.16alpha7 on, configuring PyKota to integrate |
---|
585 | within CUPS is more than easy. |
---|
586 | </para> |
---|
587 | |
---|
588 | <para> |
---|
589 | You just have to create a symbolic link to the <filename>cupspykota</filename> |
---|
590 | command in CUPS' backend directory : |
---|
591 | <screen> |
---|
592 | $ cd /usr/lib/cups/backend |
---|
593 | $ ln -s /usr/share/pykota/cupspykota cupspykota |
---|
594 | </screen> |
---|
595 | </para> |
---|
596 | |
---|
597 | <para> |
---|
598 | You have to restart <application>CUPS</application> for this modification to |
---|
599 | take effect : |
---|
600 | <screen> |
---|
601 | $ /etc/init.d/cupsys restart |
---|
602 | </screen> |
---|
603 | </para> |
---|
604 | |
---|
605 | <para> |
---|
606 | Now point your web browser to CUPS configuration page, usually at |
---|
607 | <ulink url="http://localhost:631">http://localhost:631</ulink> on |
---|
608 | your print server. |
---|
609 | </para> |
---|
610 | |
---|
611 | <para> |
---|
612 | Then when creating new printers or reconfiguring existing ones, just |
---|
613 | choose devices which are <literal>PyKota managed</literal> instead of |
---|
614 | normal devices. You've got one <literal>PyKota managed</literal> device |
---|
615 | for each regular device available from CUPS, so just choose the appropriate |
---|
616 | one. |
---|
617 | </para> |
---|
618 | |
---|
619 | <para> |
---|
620 | Repeat the above procedure for each print queue on which you want to use |
---|
621 | PyKota. That's all ! |
---|
622 | </para> |
---|
623 | |
---|
624 | <sect3> |
---|
625 | <title>Troubleshooting</title> |
---|
626 | <para> |
---|
627 | In case of problem, the simplest way to solve it is currently |
---|
628 | to ask on PyKota's mailing list, describing the symptoms, as |
---|
629 | well as the hardware and software you use. |
---|
630 | In a future release of this document, a section dedicated to |
---|
631 | Frequently Asked Questions will be included. |
---|
632 | </para> |
---|
633 | |
---|
634 | <para> |
---|
635 | You can now also ask us questions on IRC : |
---|
636 | <screen> |
---|
637 | /server irc.freenode.net |
---|
638 | /join #pykota |
---|
639 | </screen> |
---|
640 | </para> |
---|
641 | </sect3> |
---|
642 | |
---|
643 | </sect2> |
---|
644 | |
---|
645 | <sect2> |
---|
646 | <title>With LPRng</title> |
---|
647 | <para> |
---|
648 | To plug PyKota into your <application>LPRng</application> setup, |
---|
649 | you have to modify the <filename>/etc/printcap</filename>. |
---|
650 | You just have to add the following lines to each queue on |
---|
651 | which you want to use PyKota : |
---|
652 | <screen> |
---|
653 | :achk=true |
---|
654 | :as=|/usr/share/pykota/pykota |
---|
655 | </screen> |
---|
656 | </para> |
---|
657 | |
---|
658 | <para> |
---|
659 | You have to restart <application>LPRng</application> for this modification to |
---|
660 | take effect : |
---|
661 | <screen> |
---|
662 | $ /etc/init.d/lprng restart |
---|
663 | </screen> |
---|
664 | </para> |
---|
665 | |
---|
666 | <para> |
---|
667 | Repeat the above procedure for each print queue on which you want to use |
---|
668 | PyKota. That's all ! |
---|
669 | </para> |
---|
670 | |
---|
671 | <sect3> |
---|
672 | <title>Troubleshooting</title> |
---|
673 | <para> |
---|
674 | In case of problem, the simplest way to solve it is currently |
---|
675 | to ask on PyKota's mailing list, describing the symptoms, as |
---|
676 | well as the hardware and software you use. |
---|
677 | In a future release of this document, a section dedicated to |
---|
678 | Frequently Asked Questions will be included. |
---|
679 | </para> |
---|
680 | |
---|
681 | <para> |
---|
682 | You can now also ask us questions on IRC : |
---|
683 | <screen> |
---|
684 | /server irc.freenode.net |
---|
685 | /join #pykota |
---|
686 | </screen> |
---|
687 | </para> |
---|
688 | </sect3> |
---|
689 | |
---|
690 | </sect2> |
---|
691 | |
---|
692 | </sect1> |
---|
693 | </chapter> |
---|
694 | |
---|
695 | <!-- |
---|
696 | |
---|
697 | $Log$ |
---|
698 | Revision 1.24 2004/02/13 08:46:32 jalet |
---|
699 | Fixed documentation wrt installation paths changed |
---|
700 | |
---|
701 | Revision 1.23 2004/01/30 17:13:56 jalet |
---|
702 | 1.17 |
---|
703 | |
---|
704 | Revision 1.22 2003/11/15 14:59:53 jalet |
---|
705 | Documentation wrt the new CUPS backend. |
---|
706 | |
---|
707 | Revision 1.21 2003/10/14 20:26:53 jalet |
---|
708 | Better documentation. |
---|
709 | 1.15 is out ! |
---|
710 | |
---|
711 | Revision 1.20 2003/07/25 13:20:32 jalet |
---|
712 | Typo which wasn't |
---|
713 | |
---|
714 | Revision 1.19 2003/07/25 13:18:44 jalet |
---|
715 | Typos |
---|
716 | |
---|
717 | Revision 1.18 2003/07/25 10:41:29 jalet |
---|
718 | Better documentation. |
---|
719 | pykotme now displays the current user's account balance. |
---|
720 | Some test changed in ldap module. |
---|
721 | |
---|
722 | Revision 1.17 2003/06/30 21:44:18 jalet |
---|
723 | 1.09 is out ! |
---|
724 | |
---|
725 | Revision 1.16 2003/06/24 21:37:05 jalet |
---|
726 | Minor changes |
---|
727 | |
---|
728 | Revision 1.15 2003/06/10 16:37:54 jalet |
---|
729 | Deletion of the second user which is not needed anymore. |
---|
730 | Added a debug configuration field in /etc/pykota.conf |
---|
731 | All queries can now be sent to the logger in debug mode, this will |
---|
732 | greatly help improve performance when time for this will come. |
---|
733 | |
---|
734 | Revision 1.14 2003/06/05 07:12:29 jalet |
---|
735 | Reorganization of directories |
---|
736 | |
---|
737 | Revision 1.13 2003/04/24 21:09:47 jalet |
---|
738 | Documentation slightly improved. |
---|
739 | |
---|
740 | Revision 1.12 2003/04/17 21:33:16 jalet |
---|
741 | Version 1.03 is out. |
---|
742 | |
---|
743 | Revision 1.11 2003/03/25 09:32:06 jalet |
---|
744 | Improved documentation. |
---|
745 | |
---|
746 | Revision 1.10 2003/03/23 17:59:56 jalet |
---|
747 | Clarify a point. |
---|
748 | |
---|
749 | Revision 1.9 2003/03/23 17:57:20 jalet |
---|
750 | Deleted a repetition. |
---|
751 | |
---|
752 | Revision 1.8 2003/03/22 15:34:50 jalet |
---|
753 | More complete installation documentation. |
---|
754 | |
---|
755 | Revision 1.7 2003/03/22 14:26:45 jalet |
---|
756 | Download instructions added. |
---|
757 | |
---|
758 | Revision 1.6 2003/03/22 14:06:02 jalet |
---|
759 | Quota Storage Server installation is OK for PostgreSQL. |
---|
760 | |
---|
761 | Revision 1.5 2003/03/22 13:11:33 jalet |
---|
762 | The port on which the Quota Storage Sever is listening can now |
---|
763 | be set in the configuration file (see sample). |
---|
764 | Better error handling if PygreSQL is not installed. |
---|
765 | Improved documentation. |
---|
766 | Version number changed to 1.02alpha |
---|
767 | |
---|
768 | Revision 1.4 2003/03/22 07:20:38 jalet |
---|
769 | More information wrt PostgreSQL tcp/ip configuration. |
---|
770 | |
---|
771 | Revision 1.3 2003/03/18 22:18:25 jalet |
---|
772 | The documentation will only be a sequence of chapters in a single part, not |
---|
773 | multiple parts each including chapters. |
---|
774 | |
---|
775 | Revision 1.2 2003/03/18 22:10:54 jalet |
---|
776 | Documentation improvements. |
---|
777 | |
---|
778 | Revision 1.1 2003/02/08 00:03:35 jalet |
---|
779 | Documentation skeleton added |
---|
780 | |
---|
781 | |
---|
782 | --> |
---|