Changeset 3413 for pykota/trunk/docs/installation.sgml
- Timestamp:
- 09/27/08 22:02:37 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/docs/installation.sgml
r3283 r3413 3 3 <chapter> 4 4 <title id="installation">Installation</title> 5 5 6 6 <para>Last modified on $Date$</para> 7 7 8 8 <para> 9 9 Before being able to use <application>PyKota</application>, you have of course to 10 10 install it first. But before installing, you must carefully plan your installation. 11 11 </para> 12 12 13 13 <para> 14 14 First you have to determine which machine will be the <application>PyKota</application> … … 16 16 for keeping a centralized database of print usage for all your printers, users and groups. 17 17 </para> 18 18 19 19 <para> 20 20 Then you have to list all the <firstterm>Print Servers</firstterm> for which 21 21 you plan to use print quota facilities. 22 22 </para> 23 23 24 24 <para> 25 25 With most database backends, several print servers can share a single database, however … … 27 27 as your print quota database backend. 28 28 </para> 29 29 30 30 <para> 31 31 Finally you have to download <application>PyKota</application>'s latest version 32 or buy an official package, from 32 or buy an official package, from 33 33 <ulink url="http://www.pykota.com/software/pykota">http://www.pykota.com/software/pykota</ulink>. 34 34 If you've just bought an official package, then as soon as you've receive it you 35 35 have to decompress and visit its archive, to do so just type the following commands : 36 36 <screen> 37 jerome@nordine:~$ tar -zxf pykota-1.26_official.tar.gz 37 jerome@nordine:~$ tar -zxf pykota-1.26_official.tar.gz 38 38 jerome@nordine:~$ cd pykota-1.26_official 39 39 jerome@nordine:~/pykota-1.26_official$ 40 40 </screen> 41 41 </para> 42 42 43 43 <para> 44 44 You can see many files in this directory, the first ones to read are <filename>README</filename>, 45 45 then <filename>COPYING</filename> and <filename>LICENSE</filename>. They will give you 46 basic installation instructions and explain the licensing terms under which 46 basic installation instructions and explain the licensing terms under which 47 47 <application>PyKota</application> is distributed. Of course they are also mostly 48 48 boring to read ! Detailed installation and operating instructions are defined … … 54 54 know this because that's what you are currently reading ! 55 55 </para> 56 56 57 57 <sect1> 58 58 <title>Interactive step-by-step installation of PyKota with pksetup</title> 59 59 60 60 <para> 61 61 <command>pksetup</command> is a command line tool with which you'll be able … … 66 66 several servers to install identically. 67 67 </para> 68 68 69 69 <para> 70 70 Currently, <command>pksetup</command> is experimental, and only works 71 with <ulink url="http://www.debian.org">Debian</ulink> and 71 with <ulink url="http://www.debian.org">Debian</ulink> and 72 72 <ulink url="http://www.ubuntu.com">Ubuntu</ulink> distributions. 73 73 In addition, the database backend which will be installed with … … 77 77 the installation manually, then read and follow the instructions in the next section. 78 78 </para> 79 79 80 80 <para> 81 81 To launch the installation procedure, just type <literal>pksetup</literal> 82 82 followed with the name of your distribution, like : 83 <screen> 83 <screen> 84 84 jerome@nordine:~/pykota-1.26_official$ ./bin/pksetup debian 85 </screen> 85 </screen> 86 86 and then follow the instructions and answer to the several questions you'll 87 87 be asked. 88 88 </para> 89 89 </sect1> 90 90 91 91 <sect1> 92 92 <title>Manual installation</title> … … 100 100 This is especially the case if you've got only one server. 101 101 </para> 102 </note> 102 </note> 103 103 </para> 104 104 105 105 <sect2> 106 106 <title>Database server installation</title> 107 107 108 108 <para> 109 109 Depending on <application>PyKota</application>'s version number, different … … 111 111 them how to configure it. 112 112 </para> 113 113 114 114 <sect3> 115 115 <title>PostgreSQL</title> 116 116 117 117 <para> 118 118 <application>PostgreSQL</application> is an <firstterm>Object Relationnal DataBase 119 119 Management System</firstterm> distributed under a <firstterm>Free Software</firstterm> 120 license from the 120 license from the 121 121 <ulink url="http://www.postgresql.org">http://www.postgresql.org</ulink> 122 122 web site. It certainely is the free <acronym>RDBMS</acronym> which has the most advanced 123 123 features, and is widely used all over the world. 124 124 </para> 125 125 126 126 <para> 127 127 To configure your database, you must have PostgreSQL already working. 128 128 The complete installation of <application>PostgreSQL</application> is not covered by 129 the present manual, please refer to your system's documentation or to 129 the present manual, please refer to your system's documentation or to 130 130 <ulink url="http://www.postgresql.org">http://www.postgresql.org</ulink> for 131 131 details. 132 132 </para> 133 133 134 134 <para> 135 135 One thing you have to check, though, is that every Print Server on which you … … 146 146 is not necessary though if your print quota database server and your Print Server are 147 147 the very same host. 148 </para> 149 148 </para> 149 150 150 <para> 151 151 Here's an excerpt from a <filename>pg_hba.conf</filename> file. This one rejects all 152 152 connections to PyKota's database excepted when made from the same host by <application>PostgreSQL</application> users 153 153 <literal>pykotauser</literal> or <literal>pykotaadmin</literal> with the correct password. 154 <screen> 154 <screen> 155 155 local all postgres ident sameuser 156 156 local all all reject … … 160 160 </screen> 161 161 </para> 162 162 163 163 <para> 164 164 Of course if your print server and your database servers have different <acronym>IP</acronym> … … 173 173 any of its configuration files, in order for the changes to take effect. 174 174 </para> 175 </tip> 176 </para> 177 175 </tip> 176 </para> 177 178 178 <para> 179 179 Be careful, you may be unable to connect from a Print Server to the <application>PostgreSQL</application> … … 186 186 <title>Note</title> 187 187 <para> 188 The TCP/IP network port used by PostgreSQL may be different. When in doubt, ask your 189 <firstterm>System Administrator</firstterm> for the correct value. 190 </para> 191 </note> 192 </para> 193 188 The TCP/IP network port used by PostgreSQL may be different. When in doubt, ask your 189 <firstterm>System Administrator</firstterm> for the correct value. 190 </para> 191 </note> 192 </para> 193 194 194 <para> 195 195 Now that your <application>PostgreSQL</application> server is up and running, and … … 203 203 itself, he is only defined in <application>PostgreSQL</application> and don't 204 204 have to exist on any system, nor in the print quota database. His default name 205 is <literal>pykotaadmin</literal>. 205 is <literal>pykotaadmin</literal>. 206 206 A print quota database read-only user is also created under the name of <literal>pykotauser</literal>. 207 This read-only user is used by <application>PyKota</application> to connect to the 208 print quota database when an user who is not a <application>PyKota</application> administrator 207 This read-only user is used by <application>PyKota</application> to connect to the 208 print quota database when an user who is not a <application>PyKota</application> administrator 209 209 <footnote><para>a <application>PyKota</application> administrator is an user who can read the <filename>~pykota/pykotadmin.conf</filename> file.</para></footnote> 210 210 launches a pykota command. This prevents normal … … 217 217 <title>Note</title> 218 218 <para> 219 You can choose other names and passwords if you want by modifying the 219 You can choose other names and passwords if you want by modifying the 220 220 <filename>initscripts/postgresql/pykota-postgresql.sql</filename> file 221 221 accordingly, and report your changes into <application>PyKota</application>'s 222 222 configuration files. 223 223 </para> 224 </note> 225 </para> 226 224 </note> 225 </para> 226 227 227 <para> 228 228 To run this script, you can use the <command>psql</command> frontend to … … 236 236 jerome@nordine:~/pykota-1.26_official/initscripts$ psql -h localhost -U postgres template1 237 237 Welcome to psql, the PostgreSQL interactive terminal. 238 238 239 239 Type: \copyright for distribution terms 240 240 \h for help with SQL commands … … 242 242 \g or terminate with semicolon to execute query 243 243 \q to quit 244 245 template1=# \i pykota-postgresql.sql 244 245 template1=# \i pykota-postgresql.sql 246 246 ... a lot of output lines 247 pykota=# 247 pykota=# 248 248 </screen> 249 249 <note> … … 252 252 If you use RPM or DEB packages, usually the 253 253 <filename>pykota-postgresql.sql</filename> file gets installed into the 254 <filename>/usr/share/pykota/postgresql</filename> directory, along 254 <filename>/usr/share/pykota/postgresql</filename> directory, along 255 255 with a README file. 256 256 </para> 257 </note> 258 </para> 259 257 </note> 258 </para> 259 260 260 <para> 261 261 If you want to you can change passwords later in 262 <application>PostgreSQL</application> for the 262 <application>PostgreSQL</application> for the 263 263 <literal>pykotaadmin</literal> and <literal>pykotauser</literal> users. 264 264 To do so, just type the following lines while still being at the <command>psql</command> … … 272 272 </screen> 273 273 </para> 274 274 275 275 <para> 276 276 The <literal>\q</literal> command above will quit the <command>psql</command> 277 277 program and return you to the shell's command line prompt. 278 278 </para> 279 279 280 280 <para> 281 281 To improve security further, you could encrypt your database connections, or 282 282 take any other step as needed. Please refer to <application>PostgreSQL</application>'s 283 documentation for details. 283 documentation for details. 284 284 <warning> 285 285 <title>Warning</title> … … 293 293 though, it is just a general rule to keep in mind. 294 294 </para> 295 </warning> 296 </para> 297 295 </warning> 296 </para> 297 298 298 <para> 299 299 For more details, please see <filename>initscripts/mysql/README.postgresql</filename>. 300 300 </para> 301 301 302 302 <para> 303 303 If no error occured, then your print quota database is ready to be used. … … 312 312 can try to fix the problem. Thanks in advance. 313 313 </para> 314 </tip> 315 </para> 316 317 </sect3> 318 314 </tip> 315 </para> 316 317 </sect3> 318 319 319 <sect3> 320 320 <title>LDAP</title> 321 322 <para> 323 Any <acronym>LDAP</acronym> server, and particularly <application>OpenLDAP</application>, can be used 321 322 <para> 323 Any <acronym>LDAP</acronym> server, and particularly <application>OpenLDAP</application>, can be used 324 324 as a print quota database backend. 325 325 Some other LDAP servers can be used, but this is currently untested in production. 326 326 </para> 327 327 328 328 <para> 329 329 <application>OpenLDAP</application> is a Lightweight Directory Access Protocol server … … 331 331 You can download it from <ulink url="http://www.openldap.org">http://www.openldap.org</ulink>. 332 332 </para> 333 333 334 334 <para> 335 335 To use <application>OpenLDAP</application> as your print quota database backend, you have to copy the 336 <filename>pykota/initscripts/ldap/pykota.schema</filename> into <application>OpenLDAP</application>'s 336 <filename>pykota/initscripts/ldap/pykota.schema</filename> into <application>OpenLDAP</application>'s 337 337 schemas directory. 338 338 Under Debian GNU/Linux, this is something like : 339 <screen> 339 <screen> 340 340 $ cp pykota.schema /etc/ldap/schema 341 341 </screen> … … 343 343 <title>Note</title> 344 344 <para> 345 If you are using a Red Hat-based system, substitute 346 <filename>/etc/openldap</filename> for 345 If you are using a Red Hat-based system, substitute 346 <filename>/etc/openldap</filename> for 347 347 <filename>/etc/ldap</filename>. 348 348 </para> … … 357 357 your <acronym>LDAP</acronym> server's schemas directory. 358 358 </para> 359 </note> 359 </note> 360 360 </para> 361 <para> 362 Then edit <filename>/etc/ldap/slapd.conf</filename> and add a line to 361 <para> 362 Then edit <filename>/etc/ldap/slapd.conf</filename> and add a line to 363 363 include the PyKota schema. You should have something 364 364 like : 365 <screen> 365 <screen> 366 366 # Schema and objectClass definitions 367 367 include /etc/ldap/schema/core.schema … … 370 370 include /etc/ldap/schema/inetorgperson.schema 371 371 include /etc/ldap/schema/pykota.schema 372 </screen> 373 </para> 374 372 </screen> 373 </para> 374 375 375 <para> 376 376 While this is not mandatory, it is recommended that you setup … … 387 387 </screen> 388 388 </para> 389 390 <para> 391 Now you must ensure that the DNs you'll use to bind to 389 390 <para> 391 Now you must ensure that the DNs you'll use to bind to 392 392 your OpenLDAP server don't have search queries size limits, 393 393 which gives for example (OpenLDAP 2.1.x or above) : 394 395 <screen> 394 395 <screen> 396 396 # No Limits for PyKota's administrator and read-only user 397 397 limits dn="cn=pykotaadmin,dc=example,dc=com" size.soft=-1 size.hard=soft 398 398 limits dn="cn=pykotauser,dc=example,dc=com" size.soft=-1 size.hard=soft 399 </screen> 400 399 </screen> 400 401 401 Where pykotaadmin and pykotauser are the usernames used to bind to your 402 OpenLDAP server within PyKota, respectively in ReadWrite mode 402 OpenLDAP server within PyKota, respectively in ReadWrite mode 403 403 (as set in pykotadmin.conf) and in ReadOnly mode (as set in pykota.conf). 404 404 </para> 405 405 406 406 <para> 407 407 Finally, stop the <application>OpenLDAP</application> server, generate 408 408 the index files, and restart <application>OpenLDAP</application> 409 <screen> 409 <screen> 410 410 $ /etc/init.d/slapd stop 411 411 $ slapindex … … 416 416 <title>Note</title> 417 417 <para> 418 On Red Hat-based distros, use '/sbin/service ldap stop' and 418 On Red Hat-based distros, use '/sbin/service ldap stop' and 419 419 '/sbin/service ldap start' instead. 420 420 </para> … … 430 430 entries, this may ease the maintainance. 431 431 </para> 432 432 433 433 <para> 434 434 PyKota needs at least an <literal>ou</literal> for printers, for users quotas, for … … 437 437 will probably be attached to each printer. 438 438 </para> 439 439 440 440 <para> 441 441 Actually PyKota doesn't create these <literal>ou</literal>s for you, because it's … … 450 450 If you use RPM or DEB packages, usually the 451 451 <filename>pykota-sample.ldif</filename> file is installed into the 452 <filename>/usr/share/pykota/ldap</filename> directory, along 452 <filename>/usr/share/pykota/ldap</filename> directory, along 453 453 with a README file. 454 454 </para> 455 </note> 456 </para> 457 455 </note> 456 </para> 457 458 458 <para> 459 459 If no error occured, then your print quota database is ready to be used. … … 468 468 can try to fix the problem. Thanks in advance. 469 469 </para> 470 </tip> 471 </para> 472 </sect3> 473 470 </tip> 471 </para> 472 </sect3> 473 474 474 <sect3> 475 475 <title>MySQL</title> 476 476 477 477 <para> 478 478 <application>MySQL</application> is a simple Relationnal DataBase 479 479 Management System distributed under a <firstterm>Free Software</firstterm> 480 license from the 480 license from the 481 481 <ulink url="http://www.mysql.org">http://www.mysql.org</ulink> 482 web site. 483 </para> 484 482 web site. 483 </para> 484 485 485 <para> 486 486 To configure your database, you must have MySQL version 4.1 or higher already working. 487 487 We recommend that you use MySQL 5.0 or higher though. 488 488 The complete installation of <application>MySQL</application> is not covered by 489 the present manual, please refer to your system's documentation or to 489 the present manual, please refer to your system's documentation or to 490 490 <ulink url="http://www.mysql.org">http://www.mysql.org</ulink> for 491 491 details. 492 492 </para> 493 493 494 494 <para> 495 495 One thing you have to check, though, is that every Print Server on which you … … 506 506 any of its configuration files, in order for the changes to take effect. 507 507 </para> 508 </tip> 509 </para> 510 508 </tip> 509 </para> 510 511 511 <para> 512 512 Be careful, you may be unable to connect from a Print Server to the <application>MySQL</application> … … 519 519 <title>Note</title> 520 520 <para> 521 The TCP/IP network port used by MySQL may be different. When in doubt, ask your 522 <firstterm>System Administrator</firstterm> for the correct value. 523 </para> 524 </note> 525 </para> 526 521 The TCP/IP network port used by MySQL may be different. When in doubt, ask your 522 <firstterm>System Administrator</firstterm> for the correct value. 523 </para> 524 </note> 525 </para> 526 527 527 <para> 528 528 Now that your <application>MySQL</application> server is up and running, and … … 531 531 <filename>pykota-1.26_official/initscripts/mysql/pykota-mysql.sql</filename> file. 532 532 This file will create an empty 533 print quota database and set some permissions on it. 533 print quota database and set some permissions on it. 534 534 The database which will be created will be named <literal>pykota</literal> by default. 535 535 Two database users will be defined to have access in readonly and read+write modes under … … 541 541 <title>Note</title> 542 542 <para> 543 You can choose other names and passwords if you want by modifying the 543 You can choose other names and passwords if you want by modifying the 544 544 <filename>initscripts/mysql/pykota-mysql.sql</filename> file 545 545 accordingly, and report your changes into <application>PyKota</application>'s 546 546 configuration files. 547 547 </para> 548 </note> 549 </para> 550 548 </note> 549 </para> 550 551 551 <para> 552 552 To run this script, you can use the <command>mysql</command> frontend to … … 564 564 If you use RPM or DEB packages, usually the 565 565 <filename>pykota-mysql.sql</filename> file gets installed into the 566 <filename>/usr/share/pykota/mysql</filename> directory, along 566 <filename>/usr/share/pykota/mysql</filename> directory, along 567 567 with a README file. 568 568 </para> 569 </note> 570 </para> 571 569 </note> 570 </para> 571 572 572 <para> 573 573 To improve security further, you could encrypt your database connections, or 574 574 take any other step as needed. Please refer to <application>MySQL</application>'s 575 documentation for details. 576 </para> 577 575 documentation for details. 576 </para> 577 578 578 <para> 579 579 For more details, please see <filename>initscripts/mysql/README.mysql</filename>. 580 580 </para> 581 581 582 582 <para> 583 583 If no error occured, then your print quota database is ready to be used. … … 592 592 can try to fix the problem. Thanks in advance. 593 593 </para> 594 </tip> 595 </para> 596 597 </sect3> 598 594 </tip> 595 </para> 596 597 </sect3> 598 599 599 <sect3> 600 600 <title>SQLite</title> 601 601 602 602 <para> 603 603 <application>SQLite</application> is an embeddable Relationnal DataBase 604 604 distributed under a Free Software 605 license from the 605 license from the 606 606 <ulink url="http://www.sqlite.org">http://www.sqlite.org</ulink> 607 web site. 607 web site. 608 608 If is very easy to configure and use, offers a very small memory footprint, 609 609 is very fast, but can only be used on the print server because it doesn't include 610 610 a server daemon : the database is directly embedded in the application. 611 611 </para> 612 612 613 613 <para> 614 614 To configure your database, you must have SQLite already working. 615 615 The complete installation of <application>SQLite</application> is not covered by 616 the present manual, please refer to your system's documentation or to 616 the present manual, please refer to your system's documentation or to 617 617 <ulink url="http://www.sqlite.org">http://www.sqlite.org</ulink> for 618 618 details. 619 619 </para> 620 620 621 621 <para> 622 622 Once <application>SQLite</application> is installed, you have to decide where 623 623 you'll put your database. A good idea is to store it into the <literal>pykota</literal> 624 624 user's home directory. Then to create the database, just type : 625 <screen> 625 <screen> 626 626 # sqlite3 ~pykota/pykota.db <pykota/initscripts/sqlite/pykota.sqlite 627 627 # chown pykota.pykota ~pykota/pykota.db … … 634 634 follow the instructions a bit below which explain how to install PyKota on the print server. 635 635 </para> 636 636 637 637 <para> 638 638 Once this is done, you'll want to set in <filename>~pykota/pykota.conf</filename> the 639 639 following lines in the <literal>[global]</literal> section : 640 <screen> 640 <screen> 641 641 storagebackend : sqlitestorage 642 642 storagename : /etc/pykota/pykota.db … … 657 657 can try to fix the problem. Thanks in advance. 658 658 </para> 659 </tip> 660 </para> 661 </sect3> 662 659 </tip> 660 </para> 661 </sect3> 662 663 663 <sect3> 664 664 <title>Berkeley DB</title> 665 665 666 666 <para> 667 667 A <application>Berkeley DB</application> backend is planned, but it actually … … 670 670 each print server. This may still prove to be useful for small configurations. 671 671 </para> 672 </sect3> 673 </sect2> 674 672 </sect3> 673 </sect2> 674 675 675 <sect2> 676 676 <title>Print Server Installation</title> 677 677 678 678 <para> 679 679 For each Print Server on which you plan to implement the print quota 680 mechanism, you have, of course, to have an already working printing environment. 681 Currently <application>PyKota</application> works with 680 mechanism, you have, of course, to have an already working printing environment. 681 Currently <application>PyKota</application> works with 682 682 <ulink url="http://www.cups.org"><application>CUPS</application></ulink> 683 683 but older releases also supported <ulink url="http://lprng.sourceforge.net"><application>LPRng</application></ulink>. 684 684 <application>LPRng</application> support might be re-added in the future. 685 685 </para> 686 686 687 687 <para> 688 688 Here's the list of software you have to install on each Print Server, version numbers 689 are given as an indication of which was successfully tested, but older versions may 689 are given as an indication of which was successfully tested, but older versions may 690 690 work too. 691 691 <itemizedlist> 692 692 <listitem> 693 693 <para> 694 <application>CUPS</application> version 1.3.4 or higher. NB : 694 <application>CUPS</application> version 1.3.4 or higher. NB : 695 695 <application>PyKota</application> releases up to and including 1.26 support 696 <application>CUPS</application> version 1.1.14 or higher. 696 <application>CUPS</application> version 1.1.14 or higher. 697 697 You can download it from <ulink url="http://www.cups.org">http://www.cups.org</ulink> 698 698 </para> 699 </listitem> 699 </listitem> 700 700 <listitem> 701 701 <para> … … 707 707 of this language. 708 708 </para> 709 </listitem> 709 </listitem> 710 710 <listitem> 711 711 <para> … … 721 721 version used on your print quota database server. 722 722 </para> 723 </listitem> 723 </listitem> 724 724 <listitem> 725 725 <para> 726 The <application>PygreSQL</application> python module. 726 The <application>PygreSQL</application> python module. 727 727 <application>PygreSQL</application> is normally included in 728 728 <application>PostgreSQL</application>, but you may want to 729 729 download it from <ulink url="http://www.pygresql.org">http://www.pygresql.org</ulink> 730 730 </para> 731 </listitem> 732 </itemizedlist> 731 </listitem> 732 </itemizedlist> 733 733 </para> 734 </listitem> 734 </listitem> 735 735 <listitem> 736 736 <para> 737 OpenLDAP backend : 737 OpenLDAP backend : 738 738 <itemizedlist> 739 739 <listitem> … … 742 742 the <application>OpenLDAP</application> version used on your print quota database server. 743 743 </para> 744 </listitem> 744 </listitem> 745 745 <listitem> 746 746 <para> … … 748 748 You may download this module from <ulink url="http://python-ldap.sourceforge.net">http://python-ldap.sourceforge.net</ulink> 749 749 </para> 750 </listitem> 750 </listitem> 751 751 </itemizedlist> 752 752 </para> … … 761 761 version used on your database server. 762 762 </para> 763 </listitem> 763 </listitem> 764 764 <listitem> 765 765 <para> 766 The <application>Python-MySQL</application> python module, version 1.2.x or higher. 766 The <application>Python-MySQL</application> python module, version 1.2.x or higher. 767 767 You can download it from <ulink url="http://sourceforge.net/projects/mysql-python">http://sourceforge.net/projects/mysql-python</ulink> 768 768 </para> 769 </listitem> 770 </itemizedlist> 769 </listitem> 770 </itemizedlist> 771 771 </para> 772 772 </listitem> … … 774 774 <para> 775 775 SQLite backend : SQLite is not a database server, but an embeddable database, so 776 if you want to use it you MUST install SQLite on your print server. With 776 if you want to use it you MUST install SQLite on your print server. With 777 777 <application>PostgreSQL</application>, <application>MySQL</application> or 778 778 <application>OpenLDAP</application> you can store your datas on a different … … 782 782 <para> 783 783 <application>SQLite</application> version 3.2.1 or higher and its library. 784 You can download it from 784 You can download it from 785 785 <ulink url="http://www.sqlite.org">http://www.sqlite.org</ulink> 786 786 </para> 787 </listitem> 787 </listitem> 788 788 <listitem> 789 789 <para> 790 790 The <application>Python-SQLite</application> python module version 2.0.5 or higher. 791 You can download it from 791 You can download it from 792 792 <ulink url="http://www.pysqlite.org">http://www.pysqlite.org</ulink> 793 793 </para> 794 </listitem> 794 </listitem> 795 795 </itemizedlist> 796 796 </para> … … 801 801 </para> 802 802 </listitem> 803 </itemizedlist> 804 </para> 805 </listitem> 803 </itemizedlist> 804 </para> 805 </listitem> 806 806 <listitem> 807 807 <para> … … 812 812 printers. 813 813 </para> 814 </listitem> 814 </listitem> 815 815 <listitem> 816 816 <para> … … 820 820 You only need this if you plan to query your printers for their internal page counter via AppleTalk. 821 821 </para> 822 </listitem> 822 </listitem> 823 823 <listitem> 824 824 <para> … … 826 826 You can download it from <ulink url="http://www.egenix.com">http://www.egenix.com</ulink>. 827 827 </para> 828 </listitem> 828 </listitem> 829 829 <listitem> 830 830 <para> 831 831 The Python acccelerator <application>Psyco</application>. It must match your default Python version. 832 832 You can download it from <ulink url="http://psyco.sourceforge.net">http://psyco.sourceforge.net</ulink>. 833 You only need this if you run on the <literal>x86</literal> architecture because 833 You only need this if you run on the <literal>x86</literal> architecture because 834 834 <application>Psyco</application> doesn't yet exist on other architectures. 835 835 </para> 836 </listitem> 836 </listitem> 837 837 <listitem> 838 838 <para> … … 840 840 You can download it from <ulink url="http://pysnmp.sourceforge.net">http://pysnmp.sourceforge.net</ulink>. 841 841 </para> 842 </listitem> 843 <listitem> 844 <para> 845 The <application>JAXML</application> Python module. 842 </listitem> 843 <listitem> 844 <para> 845 The <application>JAXML</application> Python module. 846 846 You can download it from <ulink url="http://www.librelogiciel.com/software/">http://www.librelogiciel.com/software/</ulink>. 847 847 </para> 848 </listitem> 849 <listitem> 850 <para> 851 The <application>ReportLab</application> Toolkit Python module. 848 </listitem> 849 <listitem> 850 <para> 851 The <application>ReportLab</application> Toolkit Python module. 852 852 You can download it from <ulink url="http://www.reportlab.org">http://www.reportlab.org</ulink>. 853 853 </para> 854 </listitem> 855 <listitem> 856 <para> 857 The <application>Python Imaging Library - PIL</application> module. 854 </listitem> 855 <listitem> 856 <para> 857 The <application>Python Imaging Library - PIL</application> module. 858 858 You can download it from <ulink url="http://www.pythonware.com">http://www.pythonware.com</ulink>. 859 859 </para> 860 </listitem> 861 <listitem> 862 <para> 863 The <application>PyOSD</application> Python module. 860 </listitem> 861 <listitem> 862 <para> 863 The <application>PyOSD</application> Python module. 864 864 You can download it from <ulink url="http://repose.cx/pyosd/">http://repose.cx/pyosd/</ulink>. 865 865 </para> 866 </listitem> 867 <listitem> 868 <para> 869 The <application>pkpgcounter</application> Generic Page Description Language parser. 866 </listitem> 867 <listitem> 868 <para> 869 The <application>pkpgcounter</application> Generic Page Description Language parser. 870 870 You can download it from <ulink url="http://www.pykota.com.com/software/pkpgcounter">http://www.pykota.com/software/pkpgcounter</ulink>. 871 871 </para> 872 </listitem> 872 </listitem> 873 873 <listitem> 874 874 <para> … … 878 878 If needed, you can download it from <ulink url="http://www.pangalactic.org/PyPAM/">http://www.pangalactic.org/PyPAM/</ulink>. 879 879 </para> 880 </listitem> 880 </listitem> 881 881 <listitem> 882 882 <para> … … 884 884 You can download it from <ulink url="http://www.pykota.com/software/pkipplib">http://www.pykota.com/software/pkipplib</ulink>. 885 885 </para> 886 </listitem> 887 </itemizedlist> 888 </para> 889 886 </listitem> 887 </itemizedlist> 888 </para> 889 890 890 <para> 891 891 Instead of downloading all these programs' sources and compiling them, which really … … 897 897 distributions. 898 898 </para> 899 899 900 900 <para> 901 901 You can check that all needed software is installed by launching the <command>checkdeps.py</command> 902 902 command : 903 <screen> 904 $ python checkdeps.py 903 <screen> 904 $ python checkdeps.py 905 905 </screen> 906 906 </para> 907 907 908 908 <para> 909 909 Once all these software are installed, installing PyKota itself is a breeze. 910 PyKota being written entirely in the Python language, which is interpreted, 910 PyKota being written entirely in the Python language, which is interpreted, 911 911 there's no need to compile anything. You just have to execute the installation 912 912 script : 913 <screen> 914 $ python setup.py install 913 <screen> 914 $ python setup.py install 915 915 </screen> 916 916 </para> 917 918 <para> 919 The setup script will automatically create the 920 <filename>/usr/share/pykota/conf</filename> directory and put the sample 917 918 <para> 919 The setup script will automatically create the 920 <filename>/usr/share/pykota/conf</filename> directory and put the sample 921 921 configuration files <filename>conf/pykota.conf.sample</filename> and 922 922 <filename>conf/pykotadmin.conf.sample</filename> there, along with 923 923 a <filename>README</filename> file explaining their purpose. 924 924 </para> 925 925 926 926 <para> 927 927 Now you have to create a <literal>pykota</literal> system user and group. The <application>PyKota</application> … … 929 929 home directory. For example we could create the user and group, and set <filename>/etc/pykota</filename> 930 930 as the home directory, but any other home directory will do : 931 <screen> 931 <screen> 932 932 adduser --system --group --home /etc/pykota --gecos PyKota pykota 933 933 </screen> 934 934 </para> 935 935 936 936 <para> 937 937 You now have to copy the sample configuration files into the <filename>~pykota</filename> 938 directory, under the respective names <filename>pykota.conf</filename> and 938 directory, under the respective names <filename>pykota.conf</filename> and 939 939 <filename>pykotadmin.conf</filename>. Once copied there, you just 940 940 have to modify these files to adapt them to your own setup. … … 949 949 to any external command of your choice. 950 950 </para> 951 951 952 952 <para> 953 953 Please create a backup copy of the <filename>~pykota</filename> 954 954 directory before modifying a working installation. 955 955 </para> 956 956 957 957 <para> 958 958 PyKota features some interesting possibilities which allow you to … … 960 960 or on a per printer basis. Please see the sample configuration files 961 961 to see what I mean. In the simplest form, only a <literal>[global]</literal> section is 962 needed. In more complex configurations, you will have to create 962 needed. In more complex configurations, you will have to create 963 963 one section per printer. Each section in the configuration files 964 964 begins with a name between square brackets <literal>[]</literal>. … … 966 966 of the print queue you want to manage with PyKota. 967 967 </para> 968 968 969 969 <para> 970 970 After you have modified <application>PyKota</application>'s configuration files, you have to … … 980 980 file contains the read-write user's identity and password. You must then 981 981 ensure that no normal user can read this file. It should only be readable 982 by the <literal>root</literal> user, which is always the case, and by 982 by the <literal>root</literal> user, which is always the case, and by 983 983 <application>PyKota</application> administrators. In addition, 984 users for which <application>CUPS</application> doesn't run as user <literal>root</literal> will 984 users for which <application>CUPS</application> doesn't run as user <literal>root</literal> will 985 985 have to ensure that the user their printing system is run as 986 986 can read both of these files. An easy way to do so is to put the <literal>lp</literal> user … … 988 988 to give the correct permissions to <application>PyKota</application>'s configuration files : 989 989 <screen> 990 $ chown -R pykota.pykota ~pykota/ 990 $ chown -R pykota.pykota ~pykota/ 991 991 $ chmod 750 ~pykota/ 992 $ chmod 644 ~pykota/pykota.conf 993 $ chmod 640 ~pykota/pykotadmin.conf 992 $ chmod 644 ~pykota/pykota.conf 993 $ chmod 640 ~pykota/pykotadmin.conf 994 994 </screen> 995 995 996 996 <warning> 997 997 <title>Warning</title> 998 998 <para> 999 All the users allowed to read the <filename>~pykota/pykotadmin.conf</filename> 999 All the users allowed to read the <filename>~pykota/pykotadmin.conf</filename> 1000 1000 are considered to be <application>PyKota</application> administrators. So be 1001 1001 careful with these files permissions. … … 1003 1003 </warning> 1004 1004 </para> 1005 1005 1006 1006 <para> 1007 1007 On some systems, you may be able to strenghten permissions like this : 1008 1008 <screen> 1009 $ chown -R pykota.pykota ~pykota/ 1009 $ chown -R pykota.pykota ~pykota/ 1010 1010 $ chmod 750 ~pykota/ 1011 $ chmod 640 ~pykota/pykota.conf 1012 $ chmod 600 ~pykota/pykotadmin.conf 1011 $ chmod 640 ~pykota/pykota.conf 1012 $ chmod 600 ~pykota/pykotadmin.conf 1013 1013 </screen> 1014 1014 </para> 1015 1015 1016 1016 <para> 1017 1017 And on other ones, you may need to relax them, and change the files' owner : 1018 1018 <screen> 1019 $ chown pykota.pykota ~pykota/ 1019 $ chown pykota.pykota ~pykota/ 1020 1020 $ chmod 755 ~pykota/ 1021 $ chown lp.pykota ~pykota/pykota.conf 1022 $ chmod 640 ~pykota/pykota.conf 1023 $ chown lp.pykota ~pykota/pykotadmin.conf 1024 $ chmod 640 ~pykota/pykotadmin.conf 1021 $ chown lp.pykota ~pykota/pykota.conf 1022 $ chmod 640 ~pykota/pykota.conf 1023 $ chown lp.pykota ~pykota/pykotadmin.conf 1024 $ chmod 640 ~pykota/pykotadmin.conf 1025 1025 </screen> 1026 1026 </para> 1027 1027 1028 1028 <para> 1029 1029 This all depends on the printing system you are using, and the user the 1030 1030 printing system is usually running as. You need to remember three things : 1031 1031 1032 1032 <itemizedlist> 1033 1033 <listitem> … … 1035 1035 The user your printing system runs as MUST be allowed to read 1036 1036 both <application>PyKota</application>'s configuration files. 1037 </para> 1038 </listitem> 1039 <listitem> 1037 </para> 1038 </listitem> 1039 <listitem> 1040 1040 <para> 1041 1041 Any user who can read <filename>pykotadmin.conf</filename> … … 1044 1044 </para> 1045 1045 </listitem> 1046 <listitem> 1046 <listitem> 1047 1047 <para> 1048 1048 If <filename>cupsd.conf</filename> contains <literal>RunAsUser</literal>, then … … 1052 1052 </para> 1053 1053 </listitem> 1054 </itemizedlist> 1055 </para> 1056 1054 </itemizedlist> 1055 </para> 1056 1057 1057 <para> 1058 1058 Don't forget to restart your print server sofware if you changed group membership for the user it runs 1059 1059 as, otherwise your change wouldn't be taken into account. 1060 1060 </para> 1061 1061 1062 1062 <para> 1063 1063 Now depending on your printing system, the configuration to do is particular. … … 1065 1065 is not supported anymore. 1066 1066 </para> 1067 1067 1068 1068 <sect3> 1069 1069 <title>With CUPS</title> 1070 1070 1071 1071 <para> 1072 1072 From version 1.16alpha7 on, configuring <application>PyKota</application> to integrate 1073 1073 within <application>CUPS</application> is more than easy. 1074 1074 </para> 1075 1075 1076 1076 <para> 1077 1077 You just have to create a symbolic link to the <command>cupspykota</command> 1078 1078 command in <application>CUPS</application>' backend directory : 1079 <screen> 1080 $ cd /usr/lib/cups/backend 1079 <screen> 1080 $ cd /usr/lib/cups/backend 1081 1081 $ ln -s /usr/share/pykota/cupspykota cupspykota 1082 1082 </screen> 1083 1083 </para> 1084 1084 1085 1085 <para> 1086 1086 If you use CUPS v1.2 or higher, you must … … 1088 1088 backend to correctly support other backends which must be run 1089 1089 as the root user (e.g. the <command>lpd</command> backend) : 1090 <screen> 1090 <screen> 1091 1091 $ chmod 700 /usr/share/pykota/cupspykota 1092 1092 </screen> 1093 1093 </para> 1094 1094 1095 1095 <para> 1096 1096 You have to restart <application>CUPS</application> for this modification to 1097 take effect : 1097 take effect : 1098 1098 <screen> 1099 $ /etc/init.d/cupsys restart 1099 $ /etc/init.d/cupsys restart 1100 1100 </screen> 1101 1101 </para> 1102 1103 <para> 1104 Now point your web browser to CUPS configuration page, usually at 1102 1103 <para> 1104 Now point your web browser to CUPS configuration page, usually at 1105 1105 <ulink url="http://localhost:631">http://localhost:631</ulink> on 1106 1106 your print server. 1107 1107 </para> 1108 1108 1109 1109 <para> 1110 1110 Then when creating new printers or reconfiguring existing ones, just … … 1114 1114 Debian 3.0 Woody is known to have problems : CUPS 1.1.14 doesn't automatically 1115 1115 detect <literal>PyKota managed</literal> devices. So you have to manually 1116 modify CUPS' <filename>printers.conf</filename> file as explained in 1116 modify CUPS' <filename>printers.conf</filename> file as explained in 1117 1117 PyKota's toplevel <filename>README</filename> file. 1118 1118 </para> … … 1123 1123 one. 1124 1124 </para> 1125 1125 1126 1126 <para> 1127 1127 Repeat the above procedure for each print queue on which you want to use 1128 1128 PyKota. That's all ! 1129 1129 </para> 1130 1130 1131 1131 <sect4> 1132 1132 <title>Troubleshooting</title> … … 1136 1136 well as the hardware and software you use. 1137 1137 </para> 1138 1138 1139 1139 <para> 1140 A searchable FAQ is now available at 1140 A searchable FAQ is now available at 1141 1141 <ulink url="http://otrs.librelogiciel.com/otrs/public.pl">http://otrs.librelogiciel.com/public.pl</ulink>. 1142 1142 A FAQ entry explaining in great details how to diagnose a problem correctly is 1143 available at 1143 available at 1144 1144 <ulink url="http://otrs.librelogiciel.com/otrs/public.pl?ID=2">http://otrs.librelogiciel.com/public.pl?ID=2</ulink>. 1145 1145 </para> 1146 1146 1147 1147 <para> 1148 1148 You can also ask questions on IRC : 1149 1149 <screen> 1150 /server irc.freenode.net 1150 /server irc.freenode.net 1151 1151 /join #pykota 1152 1152 </screen> 1153 </para> 1154 </sect4> 1155 1153 </para> 1154 </sect4> 1155 1156 1156 </sect3> 1157 1158 </sect2> 1157 1158 </sect2> 1159 1159 </sect1> 1160 1160 </chapter>