Changeset 3570
- Timestamp:
- 07/17/13 22:08:37 (11 years ago)
- Location:
- pykota/branches/1.26_fixes
- Files:
-
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/branches/1.26_fixes/bin/pksetup
r3494 r3570 1 1 #! /usr/bin/env python 2 # -*- coding: ISO-8859-15-*-2 # -*- coding: utf-8 -*- 3 3 # 4 4 # PyKota … … 187 187 "python-reportlab", 188 188 "python-reportlab-accel", 189 "python-psyco",190 189 "python-pygresql", 191 190 "python-osd", -
pykota/branches/1.26_fixes/checkdeps.py
r3133 r3570 1 1 #! /usr/bin/env python 2 # -*- coding: ISO-8859-15-*-2 # -*- coding: utf-8 -*- 3 3 # 4 4 # PyKota … … 16 16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 17 # GNU General Public License for more details. 18 # 18 # 19 19 # You should have received a copy of the GNU General Public License 20 20 # along with this program; if not, write to the Free Software … … 32 32 try : 33 33 exec "import %s" % module 34 except ImportError : 34 except ImportError : 35 35 return 0 36 else : 36 else : 37 37 return 1 38 38 39 39 def checkCommand(command) : 40 40 """Checks if a command is available or not.""" … … 43 43 input.close() 44 44 return result 45 45 46 46 def checkWithPrompt(prompt, module=None, command=None, helper=None) : 47 47 """Tells the user what will be checked, and asks him what to do if something is absent.""" … … 50 50 if command is not None : 51 51 result = checkCommand(command) 52 elif module is not None : 52 elif module is not None : 53 53 result = checkModule(module) 54 if result : 54 if result : 55 55 sys.stdout.write("OK\n") 56 else : 56 else : 57 57 sys.stdout.write("NO.\n") 58 58 sys.stderr.write("ERROR : %s not available !\n" % prompt) 59 59 sys.stdout.write("%s\n" % helper) 60 61 if __name__ == "__main__" : 60 61 if __name__ == "__main__" : 62 62 print "Checking PyKota dependencies..." 63 63 64 64 # checks if Python version is correct, we need >= 2.2 65 65 if not (sys.version > "2.2") : 66 66 sys.stderr.write("PyKota needs at least Python v2.2 !\nYour version seems to be older than that, please update.\nAborted !\n") 67 67 sys.exit(-1) 68 68 69 69 # checks if some needed Python modules are there or not. 70 70 modulestocheck = [ ("Python-PygreSQL", "pg", "PygreSQL is mandatory if you want to use PostgreSQL as the quota database backend.\nSee http://www.pygresql.org"), … … 78 78 ("Python-ReportLab", "reportlab.pdfgen.canvas", "Python-ReportLab is required if you plan to have PyKota generate banners.\nSee http://www.reportlab.org/"), 79 79 ("Python-Imaging", "PIL.Image", "Python-Imaging is required if you plan to have PyKota generate banners.\nSee http://www.pythonware.com/downloads/"), 80 ("Python-Psyco", "psyco", "Python-Psyco speeds up parsing of print files, you should use it.\nSee http://psyco.sourceforge.net/"),81 80 ("Python-pkpgcounter", "pkpgpdls", "Python-pkpgcounter is mandatory.\nGrab it from http://www.pykota.com/software/pkpgcounter/"), 82 81 ("Python-PAM", "PAM", "Python-PAM is recommended if you plan to use pknotify+PyKotIcon.\nGrab it from http://www.pangalactic.org/PyPAM/"), … … 85 84 ] 86 85 commandstocheck = [ ("GhostScript", "gs", "Depending on your configuration, GhostScript may be needed in different parts of PyKota."), 87 ("SNMP Tools", "snmpget", "SNMP Tools are needed if you want to use SNMP enabled printers."), 86 ("SNMP Tools", "snmpget", "SNMP Tools are needed if you want to use SNMP enabled printers."), 88 87 ("Netatalk", "pap", "Netatalk is needed if you want to use AppleTalk enabled printers.") 89 88 ] 90 89 for (name, module, helper) in modulestocheck : 91 90 checkWithPrompt(name, module=module, helper=helper) 92 91 93 92 # checks if some software are there or not. 94 93 for (name, command, helper) in commandstocheck : 95 94 checkWithPrompt(name, command=command, helper=helper) 96 95 -
pykota/branches/1.26_fixes/debian/control
r3235 r3570 10 10 Package: pykota 11 11 Architecture: all 12 Depends: python, python-egenix-mxdatetime, cups ys, python-pygresql | python-ldap | python-pysqlite2 | python-mysqldb, jaxml | python-jaxml, python-osd, python-reportlab, python-pysnmp4, python-imaging13 Recommends: qa-assistant, snmp, netatalk, python-psyco,npadmin, python-pam, python-chardet12 Depends: python, python-egenix-mxdatetime, cups, python-pygresql | python-ldap | python-pysqlite2 | python-mysqldb, jaxml | python-jaxml, python-osd, python-reportlab, python-pysnmp4, python-imaging 13 Recommends: qa-assistant, snmp, netatalk, npadmin, python-pam, python-chardet 14 14 Description: Print Quota/Accounting system for CUPS 15 PyKota is a full featured, internationalized, centralized and extensible 16 Print Quota system for CUPS. It supports both PostgreSQL, MySQL, SQLite and 17 OpenLDAP (or other LDAP servers) as the quota database backend. 15 PyKota is a full featured, internationalized, centralized and extensible 16 Print Quota system for CUPS. It supports both PostgreSQL, MySQL, SQLite and 17 OpenLDAP (or other LDAP servers) as the quota database backend. 18 18 . 19 19 One installed, type 'pksetup debian' to configure PyKota. 20 20 . 21 This software features most of what you might expect from a modern Print 22 Quota and Accounting Solution. However it can be extended at will 21 This software features most of what you might expect from a modern Print 22 Quota and Accounting Solution. However it can be extended at will 23 23 because it allows one to plug his own administrative scripts at 24 24 several stages of the printing process. 25 25 . 26 Full access to source code is granted to all for no fee via Subversion, but 27 installable tarball, DEB and RPM download is for a fee. Redistribution and 26 Full access to source code is granted to all for no fee via Subversion, but 27 installable tarball, DEB and RPM download is for a fee. Redistribution and 28 28 modification is allowed to all under the terms of the GNU GPL. -
pykota/branches/1.26_fixes/docs/installation.sgml
r3202 r3570 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> … … 349 349 your <acronym>LDAP</acronym> server's schemas directory. 350 350 </para> 351 </note> 351 </note> 352 352 </para> 353 <para> 354 Then edit <filename>/etc/ldap/slapd.conf</filename> and add a line to 353 <para> 354 Then edit <filename>/etc/ldap/slapd.conf</filename> and add a line to 355 355 include the PyKota schema. You should have something 356 356 like : 357 <screen> 357 <screen> 358 358 # Schema and objectClass definitions 359 359 include /etc/ldap/schema/core.schema … … 362 362 include /etc/ldap/schema/inetorgperson.schema 363 363 include /etc/ldap/schema/pykota.schema 364 </screen> 365 </para> 366 364 </screen> 365 </para> 366 367 367 <para> 368 368 While this is not mandatory, it is recommended that you setup … … 379 379 </screen> 380 380 </para> 381 382 <para> 383 Now you must ensure that the DNs you'll use to bind to 381 382 <para> 383 Now you must ensure that the DNs you'll use to bind to 384 384 your OpenLDAP server don't have search queries size limits, 385 385 which gives for example (OpenLDAP 2.1.x or above) : 386 387 <screen> 386 387 <screen> 388 388 # No Limits for PyKota's administrator and read-only user 389 389 limits dn="cn=pykotaadmin,dc=example,dc=com" size.soft=-1 size.hard=soft 390 390 limits dn="cn=pykotauser,dc=example,dc=com" size.soft=-1 size.hard=soft 391 </screen> 392 391 </screen> 392 393 393 Where pykotaadmin and pykotauser are the usernames used to bind to your 394 OpenLDAP server within PyKota, respectively in ReadWrite mode 394 OpenLDAP server within PyKota, respectively in ReadWrite mode 395 395 (as set in pykotadmin.conf) and in ReadOnly mode (as set in pykota.conf). 396 396 </para> 397 397 398 398 <para> 399 399 Finally, stop the <application>OpenLDAP</application> server, generate 400 400 the index files, and restart <application>OpenLDAP</application> 401 <screen> 401 <screen> 402 402 $ /etc/init.d/slapd stop 403 403 $ slapindex … … 405 405 </screen> 406 406 </para> 407 407 408 408 <para> 409 409 With an <acronym>LDAP</acronym> backend, PyKota will need some branches … … 416 416 entries, this may ease the maintainance. 417 417 </para> 418 418 419 419 <para> 420 420 PyKota needs at least an <literal>ou</literal> for printers, for users quotas, for … … 423 423 will probably be attached to each printer. 424 424 </para> 425 425 426 426 <para> 427 427 Actually PyKota doesn't create these <literal>ou</literal>s for you, because it's … … 436 436 If you use RPM or DEB packages, usually the 437 437 <filename>pykota-sample.ldif</filename> file is installed into the 438 <filename>/usr/share/pykota/ldap</filename> directory, along 438 <filename>/usr/share/pykota/ldap</filename> directory, along 439 439 with a README file. 440 440 </para> 441 </note> 442 </para> 443 441 </note> 442 </para> 443 444 444 <para> 445 445 If no error occured, then your print quota database is ready to be used. … … 454 454 can try to fix the problem. Thanks in advance. 455 455 </para> 456 </tip> 457 </para> 458 </sect3> 459 456 </tip> 457 </para> 458 </sect3> 459 460 460 <sect3> 461 461 <title>MySQL</title> 462 462 463 463 <para> 464 464 <application>MySQL</application> is a simple Relationnal DataBase 465 465 Management System distributed under a <firstterm>Free Software</firstterm> 466 license from the 466 license from the 467 467 <ulink url="http://www.mysql.org">http://www.mysql.org</ulink> 468 web site. 469 </para> 470 468 web site. 469 </para> 470 471 471 <para> 472 472 To configure your database, you must have MySQL version 4.1 or higher already working. 473 473 We recommend that you use MySQL 5.0 or higher though. 474 474 The complete installation of <application>MySQL</application> is not covered by 475 the present manual, please refer to your system's documentation or to 475 the present manual, please refer to your system's documentation or to 476 476 <ulink url="http://www.mysql.org">http://www.mysql.org</ulink> for 477 477 details. 478 478 </para> 479 479 480 480 <para> 481 481 One thing you have to check, though, is that every Print Server on which you … … 492 492 any of its configuration files, in order for the changes to take effect. 493 493 </para> 494 </tip> 495 </para> 496 494 </tip> 495 </para> 496 497 497 <para> 498 498 Be careful, you may be unable to connect from a Print Server to the <application>MySQL</application> … … 505 505 <title>Note</title> 506 506 <para> 507 The TCP/IP network port used by MySQL may be different. When in doubt, ask your 508 <firstterm>System Administrator</firstterm> for the correct value. 509 </para> 510 </note> 511 </para> 512 507 The TCP/IP network port used by MySQL may be different. When in doubt, ask your 508 <firstterm>System Administrator</firstterm> for the correct value. 509 </para> 510 </note> 511 </para> 512 513 513 <para> 514 514 Now that your <application>MySQL</application> server is up and running, and … … 517 517 <filename>pykota-1.26_official/initscripts/mysql/pykota-mysql.sql</filename> file. 518 518 This file will create an empty 519 print quota database and set some permissions on it. 519 print quota database and set some permissions on it. 520 520 The database which will be created will be named <literal>pykota</literal> by default. 521 521 Two database users will be defined to have access in readonly and read+write modes under … … 527 527 <title>Note</title> 528 528 <para> 529 You can choose other names and passwords if you want by modifying the 529 You can choose other names and passwords if you want by modifying the 530 530 <filename>initscripts/mysql/pykota-mysql.sql</filename> file 531 531 accordingly, and report your changes into <application>PyKota</application>'s 532 532 configuration files. 533 533 </para> 534 </note> 535 </para> 536 534 </note> 535 </para> 536 537 537 <para> 538 538 To run this script, you can use the <command>mysql</command> frontend to … … 550 550 If you use RPM or DEB packages, usually the 551 551 <filename>pykota-mysql.sql</filename> file gets installed into the 552 <filename>/usr/share/pykota/mysql</filename> directory, along 552 <filename>/usr/share/pykota/mysql</filename> directory, along 553 553 with a README file. 554 554 </para> 555 </note> 556 </para> 557 555 </note> 556 </para> 557 558 558 <para> 559 559 To improve security further, you could encrypt your database connections, or 560 560 take any other step as needed. Please refer to <application>MySQL</application>'s 561 documentation for details. 562 </para> 563 561 documentation for details. 562 </para> 563 564 564 <para> 565 565 For more details, please see <filename>initscripts/mysql/README.mysql</filename>. 566 566 </para> 567 567 568 568 <para> 569 569 If no error occured, then your print quota database is ready to be used. … … 578 578 can try to fix the problem. Thanks in advance. 579 579 </para> 580 </tip> 581 </para> 582 583 </sect3> 584 580 </tip> 581 </para> 582 583 </sect3> 584 585 585 <sect3> 586 586 <title>SQLite</title> 587 587 588 588 <para> 589 589 <application>SQLite</application> is an embeddable Relationnal DataBase 590 590 distributed under a Free Software 591 license from the 591 license from the 592 592 <ulink url="http://www.sqlite.org">http://www.sqlite.org</ulink> 593 web site. 593 web site. 594 594 If is very easy to configure and use, offers a very small memory footprint, 595 595 is very fast, but can only be used on the print server because it doesn't include 596 596 a server daemon : the database is directly embedded in the application. 597 597 </para> 598 598 599 599 <para> 600 600 To configure your database, you must have SQLite already working. 601 601 The complete installation of <application>SQLite</application> is not covered by 602 the present manual, please refer to your system's documentation or to 602 the present manual, please refer to your system's documentation or to 603 603 <ulink url="http://www.sqlite.org">http://www.sqlite.org</ulink> for 604 604 details. 605 605 </para> 606 606 607 607 <para> 608 608 Once <application>SQLite</application> is installed, you have to decide where 609 609 you'll put your database. A good idea is to store it into the <literal>pykota</literal> 610 610 user's home directory. Then to create the database, just type : 611 <screen> 611 <screen> 612 612 # sqlite3 ~pykota/pykota.db <pykota/initscripts/sqlite/pykota.sqlite 613 613 # chown pykota.pykota ~pykota/pykota.db … … 620 620 follow the instructions a bit below which explain how to install PyKota on the print server. 621 621 </para> 622 622 623 623 <para> 624 624 Once this is done, you'll want to set in <filename>~pykota/pykota.conf</filename> the 625 625 following lines in the <literal>[global]</literal> section : 626 <screen> 626 <screen> 627 627 storagebackend : sqlitestorage 628 628 storagename : /etc/pykota/pykota.db … … 643 643 can try to fix the problem. Thanks in advance. 644 644 </para> 645 </tip> 646 </para> 647 </sect3> 648 645 </tip> 646 </para> 647 </sect3> 648 649 649 <sect3> 650 650 <title>Berkeley DB</title> 651 651 652 652 <para> 653 653 A <application>Berkeley DB</application> backend is planned, but it actually … … 656 656 each print server. This may still prove to be useful for small configurations. 657 657 </para> 658 </sect3> 659 </sect2> 660 658 </sect3> 659 </sect2> 660 661 661 <sect2> 662 662 <title>Print Server Installation</title> 663 663 664 664 <para> 665 665 For each Print Server on which you plan to implement the print quota 666 mechanism, you have, of course, to have an already working printing environment. 667 Currently <application>PyKota</application> works with 666 mechanism, you have, of course, to have an already working printing environment. 667 Currently <application>PyKota</application> works with 668 668 <ulink url="http://www.cups.org"><application>CUPS</application></ulink> 669 669 but older releases also supported <ulink url="http://lprng.sourceforge.net"><application>LPRng</application></ulink>. 670 670 <application>LPRng</application> support might be re-added in the future. 671 671 </para> 672 672 673 673 <para> 674 674 Here's the list of software you have to install on each Print Server, version numbers 675 are given as an indication of which was successfully tested, but older versions may 675 are given as an indication of which was successfully tested, but older versions may 676 676 work too. 677 677 <itemizedlist> … … 682 682 You can download it from <ulink url="http://www.cups.org">http://www.cups.org</ulink> 683 683 </para> 684 </listitem> 684 </listitem> 685 685 <listitem> 686 686 <para> … … 692 692 of this language. 693 693 </para> 694 </listitem> 694 </listitem> 695 695 <listitem> 696 696 <para> … … 706 706 version used on your print quota database server. 707 707 </para> 708 </listitem> 708 </listitem> 709 709 <listitem> 710 710 <para> 711 The <application>PygreSQL</application> python module. 711 The <application>PygreSQL</application> python module. 712 712 <application>PygreSQL</application> is normally included in 713 713 <application>PostgreSQL</application>, but you may want to 714 714 download it from <ulink url="http://www.pygresql.org">http://www.pygresql.org</ulink> 715 715 </para> 716 </listitem> 717 </itemizedlist> 716 </listitem> 717 </itemizedlist> 718 718 </para> 719 </listitem> 719 </listitem> 720 720 <listitem> 721 721 <para> 722 OpenLDAP backend : 722 OpenLDAP backend : 723 723 <itemizedlist> 724 724 <listitem> … … 727 727 the <application>OpenLDAP</application> version used on your print quota database server. 728 728 </para> 729 </listitem> 729 </listitem> 730 730 <listitem> 731 731 <para> … … 733 733 You may download this module from <ulink url="http://python-ldap.sourceforge.net">http://python-ldap.sourceforge.net</ulink> 734 734 </para> 735 </listitem> 735 </listitem> 736 736 </itemizedlist> 737 737 </para> … … 746 746 version used on your database server. 747 747 </para> 748 </listitem> 748 </listitem> 749 749 <listitem> 750 750 <para> 751 The <application>Python-MySQL</application> python module, version 1.2.x or higher. 751 The <application>Python-MySQL</application> python module, version 1.2.x or higher. 752 752 You can download it from <ulink url="http://sourceforge.net/projects/mysql-python">http://sourceforge.net/projects/mysql-python</ulink> 753 753 </para> 754 </listitem> 755 </itemizedlist> 754 </listitem> 755 </itemizedlist> 756 756 </para> 757 757 </listitem> … … 759 759 <para> 760 760 SQLite backend : SQLite is not a database server, but an embeddable database, so 761 if you want to use it you MUST install SQLite on your print server. With 761 if you want to use it you MUST install SQLite on your print server. With 762 762 <application>PostgreSQL</application>, <application>MySQL</application> or 763 763 <application>OpenLDAP</application> you can store your datas on a different … … 767 767 <para> 768 768 <application>SQLite</application> version 3.2.1 or higher and its library. 769 You can download it from 769 You can download it from 770 770 <ulink url="http://www.sqlite.org">http://www.sqlite.org</ulink> 771 771 </para> 772 </listitem> 772 </listitem> 773 773 <listitem> 774 774 <para> 775 775 The <application>Python-SQLite</application> python module version 2.0.5 or higher. 776 You can download it from 776 You can download it from 777 777 <ulink url="http://www.pysqlite.org">http://www.pysqlite.org</ulink> 778 778 </para> 779 </listitem> 779 </listitem> 780 780 </itemizedlist> 781 781 </para> … … 786 786 </para> 787 787 </listitem> 788 </itemizedlist> 789 </para> 790 </listitem> 788 </itemizedlist> 789 </para> 790 </listitem> 791 791 <listitem> 792 792 <para> … … 797 797 printers. 798 798 </para> 799 </listitem> 799 </listitem> 800 800 <listitem> 801 801 <para> … … 805 805 You only need this if you plan to query your printers for their internal page counter via AppleTalk. 806 806 </para> 807 </listitem> 807 </listitem> 808 808 <listitem> 809 809 <para> … … 811 811 You can download it from <ulink url="http://www.egenix.com">http://www.egenix.com</ulink>. 812 812 </para> 813 </listitem> 814 <listitem> 815 <para> 816 The Python acccelerator <application>Psyco</application>. It must match your default Python version. 817 You can download it from <ulink url="http://psyco.sourceforge.net">http://psyco.sourceforge.net</ulink>. 818 You only need this if you run on the <literal>x86</literal> architecture because 819 <application>Psyco</application> doesn't yet exist on other architectures. 820 </para> 821 </listitem> 813 </listitem> 822 814 <listitem> 823 815 <para> … … 825 817 You can download it from <ulink url="http://pysnmp.sourceforge.net">http://pysnmp.sourceforge.net</ulink>. 826 818 </para> 827 </listitem> 828 <listitem> 829 <para> 830 The <application>JAXML</application> Python module. 819 </listitem> 820 <listitem> 821 <para> 822 The <application>JAXML</application> Python module. 831 823 You can download it from <ulink url="http://www.librelogiciel.com/software/">http://www.librelogiciel.com/software/</ulink>. 832 824 </para> 833 </listitem> 834 <listitem> 835 <para> 836 The <application>ReportLab</application> Toolkit Python module. 825 </listitem> 826 <listitem> 827 <para> 828 The <application>ReportLab</application> Toolkit Python module. 837 829 You can download it from <ulink url="http://www.reportlab.org">http://www.reportlab.org</ulink>. 838 830 </para> 839 </listitem> 840 <listitem> 841 <para> 842 The <application>Python Imaging Library - PIL</application> module. 831 </listitem> 832 <listitem> 833 <para> 834 The <application>Python Imaging Library - PIL</application> module. 843 835 You can download it from <ulink url="http://www.pythonware.com">http://www.pythonware.com</ulink>. 844 836 </para> 845 </listitem> 846 <listitem> 847 <para> 848 The <application>PyOSD</application> Python module. 837 </listitem> 838 <listitem> 839 <para> 840 The <application>PyOSD</application> Python module. 849 841 You can download it from <ulink url="http://repose.cx/pyosd/">http://repose.cx/pyosd/</ulink>. 850 842 </para> 851 </listitem> 852 <listitem> 853 <para> 854 The <application>pkpgcounter</application> Generic Page Description Language parser. 843 </listitem> 844 <listitem> 845 <para> 846 The <application>pkpgcounter</application> Generic Page Description Language parser. 855 847 You can download it from <ulink url="http://www.pykota.com.com/software/pkpgcounter">http://www.pykota.com/software/pkpgcounter</ulink>. 856 848 </para> 857 </listitem> 849 </listitem> 858 850 <listitem> 859 851 <para> … … 863 855 If needed, you can download it from <ulink url="http://www.pangalactic.org/PyPAM/">http://www.pangalactic.org/PyPAM/</ulink>. 864 856 </para> 865 </listitem> 857 </listitem> 866 858 <listitem> 867 859 <para> … … 869 861 You can download it from <ulink url="http://www.pykota.com/software/pkipplib">http://www.pykota.com/software/pkipplib</ulink>. 870 862 </para> 871 </listitem> 872 </itemizedlist> 873 </para> 874 863 </listitem> 864 </itemizedlist> 865 </para> 866 875 867 <para> 876 868 Instead of downloading all these programs' sources and compiling them, which really … … 882 874 distributions. 883 875 </para> 884 876 885 877 <para> 886 878 You can check that all needed software is installed by launching the <command>checkdeps.py</command> 887 879 command : 888 <screen> 889 $ python checkdeps.py 880 <screen> 881 $ python checkdeps.py 890 882 </screen> 891 883 </para> 892 884 893 885 <para> 894 886 Once all these software are installed, installing PyKota itself is a breeze. 895 PyKota being written entirely in the Python language, which is interpreted, 887 PyKota being written entirely in the Python language, which is interpreted, 896 888 there's no need to compile anything. You just have to execute the installation 897 889 script : 898 <screen> 899 $ python setup.py install 890 <screen> 891 $ python setup.py install 900 892 </screen> 901 893 </para> 902 903 <para> 904 The setup script will automatically create the 905 <filename>/usr/share/pykota/conf</filename> directory and put the sample 894 895 <para> 896 The setup script will automatically create the 897 <filename>/usr/share/pykota/conf</filename> directory and put the sample 906 898 configuration files <filename>conf/pykota.conf.sample</filename> and 907 899 <filename>conf/pykotadmin.conf.sample</filename> there, along with 908 900 a <filename>README</filename> file explaining their purpose. 909 901 </para> 910 902 911 903 <para> 912 904 Now you have to create a <literal>pykota</literal> system user and group. The <application>PyKota</application> … … 914 906 home directory. For example we could create the user and group, and set <filename>/etc/pykota</filename> 915 907 as the home directory, but any other home directory will do : 916 <screen> 908 <screen> 917 909 adduser --system --group --home /etc/pykota --gecos PyKota pykota 918 910 </screen> 919 911 </para> 920 912 921 913 <para> 922 914 You now have to copy the sample configuration files into the <filename>~pykota</filename> 923 directory, under the respective names <filename>pykota.conf</filename> and 915 directory, under the respective names <filename>pykota.conf</filename> and 924 916 <filename>pykotadmin.conf</filename>. Once copied there, you just 925 917 have to modify these files to adapt them to your own setup. … … 934 926 to any external command of your choice. 935 927 </para> 936 928 937 929 <para> 938 930 Please create a backup copy of the <filename>~pykota</filename> 939 931 directory before modifying a working installation. 940 932 </para> 941 933 942 934 <para> 943 935 PyKota features some interesting possibilities which allow you to … … 945 937 or on a per printer basis. Please see the sample configuration files 946 938 to see what I mean. In the simplest form, only a <literal>[global]</literal> section is 947 needed. In more complex configurations, you will have to create 939 needed. In more complex configurations, you will have to create 948 940 one section per printer. Each section in the configuration files 949 941 begins with a name between square brackets <literal>[]</literal>. … … 951 943 of the print queue you want to manage with PyKota. 952 944 </para> 953 945 954 946 <para> 955 947 After you have modified <application>PyKota</application>'s configuration files, you have to … … 965 957 file contains the read-write user's identity and password. You must then 966 958 ensure that no normal user can read this file. It should only be readable 967 by the <literal>root</literal> user, which is always the case, and by 959 by the <literal>root</literal> user, which is always the case, and by 968 960 <application>PyKota</application> administrators. In addition, 969 users for which <application>CUPS</application> doesn't run as user <literal>root</literal> will 961 users for which <application>CUPS</application> doesn't run as user <literal>root</literal> will 970 962 have to ensure that the user their printing system is run as 971 963 can read both of these files. An easy way to do so is to put the <literal>lp</literal> user … … 973 965 to give the correct permissions to <application>PyKota</application>'s configuration files : 974 966 <screen> 975 $ chown -R pykota.pykota ~pykota/ 967 $ chown -R pykota.pykota ~pykota/ 976 968 $ chmod 750 ~pykota/ 977 $ chmod 644 ~pykota/pykota.conf 978 $ chmod 640 ~pykota/pykotadmin.conf 969 $ chmod 644 ~pykota/pykota.conf 970 $ chmod 640 ~pykota/pykotadmin.conf 979 971 </screen> 980 972 981 973 <warning> 982 974 <title>Warning</title> 983 975 <para> 984 All the users allowed to read the <filename>~pykota/pykotadmin.conf</filename> 976 All the users allowed to read the <filename>~pykota/pykotadmin.conf</filename> 985 977 are considered to be <application>PyKota</application> administrators. So be 986 978 careful with these files permissions. … … 988 980 </warning> 989 981 </para> 990 982 991 983 <para> 992 984 On some systems, you may be able to strenghten permissions like this : 993 985 <screen> 994 $ chown -R pykota.pykota ~pykota/ 986 $ chown -R pykota.pykota ~pykota/ 995 987 $ chmod 750 ~pykota/ 996 $ chmod 640 ~pykota/pykota.conf 997 $ chmod 600 ~pykota/pykotadmin.conf 988 $ chmod 640 ~pykota/pykota.conf 989 $ chmod 600 ~pykota/pykotadmin.conf 998 990 </screen> 999 991 </para> 1000 992 1001 993 <para> 1002 994 And on other ones, you may need to relax them, and change the files' owner : 1003 995 <screen> 1004 $ chown pykota.pykota ~pykota/ 996 $ chown pykota.pykota ~pykota/ 1005 997 $ chmod 755 ~pykota/ 1006 $ chown lp.pykota ~pykota/pykota.conf 1007 $ chmod 640 ~pykota/pykota.conf 1008 $ chown lp.pykota ~pykota/pykotadmin.conf 1009 $ chmod 640 ~pykota/pykotadmin.conf 998 $ chown lp.pykota ~pykota/pykota.conf 999 $ chmod 640 ~pykota/pykota.conf 1000 $ chown lp.pykota ~pykota/pykotadmin.conf 1001 $ chmod 640 ~pykota/pykotadmin.conf 1010 1002 </screen> 1011 1003 </para> 1012 1004 1013 1005 <para> 1014 1006 This all depends on the printing system you are using, and the user the 1015 1007 printing system is usually running as. You need to remember three things : 1016 1008 1017 1009 <itemizedlist> 1018 1010 <listitem> … … 1020 1012 The user your printing system runs as MUST be allowed to read 1021 1013 both <application>PyKota</application>'s configuration files. 1022 </para> 1023 </listitem> 1024 <listitem> 1014 </para> 1015 </listitem> 1016 <listitem> 1025 1017 <para> 1026 1018 Any user who can read <filename>pykotadmin.conf</filename> … … 1029 1021 </para> 1030 1022 </listitem> 1031 <listitem> 1023 <listitem> 1032 1024 <para> 1033 1025 If <filename>cupsd.conf</filename> contains <literal>RunAsUser</literal>, then … … 1037 1029 </para> 1038 1030 </listitem> 1039 </itemizedlist> 1040 </para> 1041 1031 </itemizedlist> 1032 </para> 1033 1042 1034 <para> 1043 1035 Don't forget to restart your print server sofware if you changed group membership for the user it runs 1044 1036 as, otherwise your change wouldn't be taken into account. 1045 1037 </para> 1046 1038 1047 1039 <para> 1048 1040 Now depending on your printing system, the configuration to do is particular. … … 1050 1042 is not supported anymore. 1051 1043 </para> 1052 1044 1053 1045 <sect3> 1054 1046 <title>With CUPS</title> 1055 1047 1056 1048 <para> 1057 1049 From version 1.16alpha7 on, configuring <application>PyKota</application> to integrate 1058 1050 within <application>CUPS</application> is more than easy. 1059 1051 </para> 1060 1052 1061 1053 <para> 1062 1054 You just have to create a symbolic link to the <command>cupspykota</command> 1063 1055 command in <application>CUPS</application>' backend directory : 1064 <screen> 1065 $ cd /usr/lib/cups/backend 1056 <screen> 1057 $ cd /usr/lib/cups/backend 1066 1058 $ ln -s /usr/share/pykota/cupspykota cupspykota 1067 1059 </screen> 1068 1060 </para> 1069 1061 1070 1062 <para> 1071 1063 If you use CUPS v1.2 or higher, you must … … 1073 1065 backend to correctly support other backends which must be run 1074 1066 as the root user (e.g. the <command>lpd</command> backend) : 1075 <screen> 1067 <screen> 1076 1068 $ chmod 700 /usr/share/pykota/cupspykota 1077 1069 </screen> 1078 1070 </para> 1079 1071 1080 1072 <para> 1081 1073 You have to restart <application>CUPS</application> for this modification to 1082 take effect : 1074 take effect : 1083 1075 <screen> 1084 $ /etc/init.d/cupsys restart 1076 $ /etc/init.d/cupsys restart 1085 1077 </screen> 1086 1078 </para> 1087 1088 <para> 1089 Now point your web browser to CUPS configuration page, usually at 1079 1080 <para> 1081 Now point your web browser to CUPS configuration page, usually at 1090 1082 <ulink url="http://localhost:631">http://localhost:631</ulink> on 1091 1083 your print server. 1092 1084 </para> 1093 1085 1094 1086 <para> 1095 1087 Then when creating new printers or reconfiguring existing ones, just … … 1099 1091 Debian 3.0 Woody is known to have problems : CUPS 1.1.14 doesn't automatically 1100 1092 detect <literal>PyKota managed</literal> devices. So you have to manually 1101 modify CUPS' <filename>printers.conf</filename> file as explained in 1093 modify CUPS' <filename>printers.conf</filename> file as explained in 1102 1094 PyKota's toplevel <filename>README</filename> file. 1103 1095 </para> … … 1108 1100 one. 1109 1101 </para> 1110 1102 1111 1103 <para> 1112 1104 Repeat the above procedure for each print queue on which you want to use 1113 1105 PyKota. That's all ! 1114 1106 </para> 1115 1107 1116 1108 <sect4> 1117 1109 <title>Troubleshooting</title> … … 1121 1113 well as the hardware and software you use. 1122 1114 </para> 1123 1115 1124 1116 <para> 1125 A searchable FAQ is now available at 1117 A searchable FAQ is now available at 1126 1118 <ulink url="http://otrs.librelogiciel.com/otrs/public.pl">http://otrs.librelogiciel.com/public.pl</ulink>. 1127 1119 A FAQ entry explaining in great details how to diagnose a problem correctly is 1128 available at 1120 available at 1129 1121 <ulink url="http://otrs.librelogiciel.com/otrs/public.pl?ID=2">http://otrs.librelogiciel.com/public.pl?ID=2</ulink>. 1130 1122 </para> 1131 1123 1132 1124 <para> 1133 1125 You can also ask questions on IRC : 1134 1126 <screen> 1135 /server irc.freenode.net 1127 /server irc.freenode.net 1136 1128 /join #pykota 1137 1129 </screen> 1138 </para> 1139 </sect4> 1140 1130 </para> 1131 </sect4> 1132 1141 1133 </sect3> 1142 1143 </sect2> 1134 1135 </sect2> 1144 1136 </sect1> 1145 1137 </chapter> -
pykota/branches/1.26_fixes/qa-assistant/pykota.xml
r3212 r3570 43 43 </states> 44 44 <description>PyKota must be downloaded before being installed. 45 You can download its latest development tree with 45 You can download its latest development tree with 46 46 'svn export svn://svn.librelogiciel.com/pykota/trunk pykota' 47 47 </description> … … 53 53 prevent most of PyKota from working, but some functionnalities will 54 54 be unavailable to you if they are not installed. You can see the 55 status for each of PyKota's dependencies with 55 status for each of PyKota's dependencies with 56 56 'python pykota/checkdeps.py' 57 </description> 57 </description> 58 58 <entry name="python-egenix-mxdatetime" display="true"> 59 59 <states> … … 62 62 </states> 63 63 <description> 64 python-egenix-mxdatetime is required for PyKota to work. 64 python-egenix-mxdatetime is required for PyKota to work. 65 65 You must install it with 'apt-get install python-egenix-mxdatetime' 66 66 </description> … … 84 84 </states> 85 85 <description> 86 python-pygresql allows PyKota to use a PostgreSQL database backend. 86 python-pygresql allows PyKota to use a PostgreSQL database backend. 87 87 If this is what you want you must install it with 'apt-get install python-pygresql' 88 88 </description> … … 95 95 </states> 96 96 <description> 97 python-ldap allows PyKota to use an LDAP database backend. 97 python-ldap allows PyKota to use an LDAP database backend. 98 98 If this is what you want you must install it with 'apt-get install python-ldap' 99 99 </description> … … 106 106 </states> 107 107 <description> 108 python-mysqldb allows PyKota to use a MySQL database backend. 108 python-mysqldb allows PyKota to use a MySQL database backend. 109 109 If this is what you want you must install it with 'apt-get install python-mysqldb' 110 110 </description> … … 117 117 </states> 118 118 <description> 119 python-pysqlite2 allows PyKota to use an SQLite database backend. 119 python-pysqlite2 allows PyKota to use an SQLite database backend. 120 120 If this is what you want you must install it with 'apt-get install python-pysqlite2' 121 121 </description> … … 128 128 </states> 129 129 <description> 130 python-osd is only needed if you want to use the 'pykosd' utility, which is an X-Window 130 python-osd is only needed if you want to use the 'pykosd' utility, which is an X-Window 131 131 print quota reminded for end users. 132 132 You can install it with 'apt-get install python-osd' … … 194 194 <description> 195 195 python-pam allows PyKota to check an user's name and password through PAM at printing time, provided you 196 use the PyKotIcon end user helper tool on all client hosts. 196 use the PyKotIcon end user helper tool on all client hosts. 197 197 If you don't have guest logins or people with administrator (or root) access on their own 198 198 machine, you probably don't need this module. … … 227 227 </description> 228 228 </entry> 229 <entry name="python-psyco" display="true">230 <states>231 <state name="Pass">python-psyco is installed</state>232 <state name="Fail">python-psyco is not installed</state>233 <state name="Not-Applicable">python-psyco is not supported on this platform</state>234 </states>235 <description>236 python-psyco is an accelerator module for the Python language which can make the parsing237 of Page Description Languages by pkpgcounter faster.238 It is only supported on the x86 platform though, so if you use something else you239 won't be able to install it.240 It recommended but not necessary that you install it for PyKota to work.241 You can install it with 'apt-get install python-psyco'242 </description>243 </entry>244 229 </category> 245 230 <category name="Print Server Installation procedure"> 246 231 <description>PyKota needs to be installed on the CUPS server. 247 </description> 232 </description> 248 233 <entry name="Go to PyKota's download directory" display="true"> 249 234 <states> … … 315 300 </states> 316 301 <description> 317 Any user who with read access to ~pykota/pykotadmin.conf will be considered a PyKota 302 Any user who with read access to ~pykota/pykotadmin.conf will be considered a PyKota 318 303 administrator, with full read+write access to PyKota's database. 319 304 Any user with read access to ~pykota/pykota.conf will have read access to PyKota's database. Access … … 376 361 </description> 377 362 </entry> 378 </category> 363 </category> 379 364 </checklist>