Changeset 3572 for pykota/branches/1.26_fixes/README
- Timestamp:
- 07/17/13 22:12:19 (11 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/branches/1.26_fixes/README
r3201 r3572 30 30 31 31 ==================================================================== 32 32 33 33 Planned features are described in the TODO file. 34 34 … … 37 37 38 38 - The 'hardware' method consists in querying the printer (via SNMP 39 or Netatalk or any other method of your choice) for its internal 39 or Netatalk or any other method of your choice) for its internal 40 40 pages counter. 41 41 This is done both at the beginning and at the end of a 42 print job. The counters difference is then used to 42 print job. The counters difference is then used to 43 43 decrease the user's account balance or increase his quota usage. 44 44 45 45 - The 'software' method consists in delegating the computation of the 46 46 job's size in number of pages to any external command of your choice. … … 54 54 Of course this means you have to install pkpgcounter if you want to 55 55 use the default PDL parser. 56 57 - The 'ink' method consists in using pkpgcounter's code to compute 56 57 - The 'ink' method consists in using pkpgcounter's code to compute 58 58 how much of each page is covered by ink in each color of a particular 59 59 colorspace chosen between CMYK, CMY, RGB, and BW (grayscale). 60 60 These values are then summed up together and multiplied by a set 61 61 of coefficients defined in PyKota's configuration files. 62 62 63 63 PyKota is known to work with most printers, excepted GDI ones (Windows 64 64 only). At least one of the accounting methods above should work … … 73 73 74 74 You can now purchase 8x5x365@NextBusinessDay Technical 75 Support Contracts from us. The yearly fee is computed with 75 Support Contracts from us. The yearly fee is computed with 76 76 the following formula : 77 77 78 78 (100.0 * NbPrintServers) + (2.5 * NbPrinters) + (0.04 * NbUsers) EUROS. 79 79 80 80 This fee includes the VAT, and a free subscription to Official 81 81 PyKota packages. 82 82 83 83 Please send an email to alet@librelogiciel.com if you're 84 interested in purchasing such a contract. 84 interested in purchasing such a contract. 85 85 86 86 Remember that purchasing a support contract for Free Software like PyKota 87 is a great way to show your appreciation for the work already being done 87 is a great way to show your appreciation for the work already being done 88 88 on this project, and will help to improve this software in the future. 89 89 … … 102 102 have to compile it into HTML or PDF yourself by using 103 103 the appropriate tools as installed on your system. 104 104 105 105 PyKota's collaborative documentation is available from : 106 106 107 107 http://www.pykota.com/wiki/ 108 108 109 109 You may learn more about PyKota, if it fits your own organization, 110 110 its internal working, and some potential performance drawbacks and 111 111 how to avoid them, in a document created by Ryan Suarez at : 112 112 113 113 http://archive.macosxlabs.org/forum/webcrossing_archive/documentation/Pykota_and_CUPS/Pykota_and_CUPS.html 114 114 115 115 You may also find the following document interesting : 116 116 117 117 http://es.tldp.org/Tutoriales/doc-openldap-samba-cups-python/ 118 119 This document, written in Spanish by Sergio Gonzalez Gonzalez, 118 119 This document, written in Spanish by Sergio Gonzalez Gonzalez, 120 120 describes the integration of PyKota into an OpenLDAP + Samba 121 + CUPS installation. Even for people who can't read spanish 121 + CUPS installation. Even for people who can't read spanish 122 122 this document is really interesting, and contains lots of 123 123 screenshots. 124 125 126 Prerequisite : 124 125 126 Prerequisite : 127 127 -------------- 128 128 129 129 See : 130 130 131 131 http://www.pykota.com/wiki/Dependencies 132 132 133 133 for an up-to-date list, or see below (maybe not up-to-date) : 134 134 135 135 You need to have the following tools installed on the CUPS Server : 136 136 137 137 - CUPS (http://www.cups.org) 138 138 - Python v2.3 or higher (http://www.python.org) 139 139 - eGenix' mxDateTime Python extension (http://www.egenix.com) 140 140 - The pkpgcounter command line tool, version 1.56 or higher. This 141 tool is now mandatory for PyKota to work. 141 tool is now mandatory for PyKota to work. 142 142 (http://www.pykota.com/software/pkpgcounter) 143 - The pkipplib Python library (http://www.pykota.com/software/pkipplib) 143 - The pkipplib Python library (http://www.pykota.com/software/pkipplib) 144 144 - The JAXML Python module to be able to dump datas in the XML format. 145 145 (http://www.librelogiciel.com/software/) 146 - The Python-PAM module if you need the pknotify command to be able 146 - The Python-PAM module if you need the pknotify command to be able 147 147 to check usernames and passwords. (http://www.pangalactic.org/PyPAM) 148 148 - The Python-SNMP module to query printers for their page counter. 149 (http://pysnmp.sourceforge.net) 149 (http://pysnmp.sourceforge.net) 150 150 IMPORTANT : version 3.4.2 or higher is REQUIRED. 151 151 Versions 2.x won't work. Versions 4.x now work (tested with v4.1.5a). 152 152 - The Python-OSD module to use the graphical print quota reminder. 153 153 (http://repose.cx/pyosd/) 154 - The Python-chardet module to autodetect user's character set when 154 - The Python-chardet module to autodetect user's character set when 155 155 printing. (http://chardet.feedparser.org) 156 156 - SNMP tools (specifically the snmpget command) if you prefer to … … 160 160 request your printer's lifetime page counter via AppleTalk. 161 161 (http://netatalk.sourceforge.net) 162 - The ReportLab Python module (http://www.reportlab.org) if you want 162 - The ReportLab Python module (http://www.reportlab.org) if you want 163 163 to have PyKota generate nice banners for you. 164 - The Python Imaging Library (aka PIL) module 165 (http://www.pythonware.com/downloads) if you want to have PyKota 164 - The Python Imaging Library (aka PIL) module 165 (http://www.pythonware.com/downloads) if you want to have PyKota 166 166 generate nice banners for you. 167 167 - PostgreSQL's PygreSQL Python extension and the PostgreSQL client 168 168 libraries if you plan to use PostgreSQL as the database backend. 169 169 (http://www.postgresql.org and http://www.pygreql.org) 170 or 171 - python-ldap Python module and the OpenLDAP client libraries 170 or 171 - python-ldap Python module and the OpenLDAP client libraries 172 172 if you plan to use an LDAP server as the database backend. 173 173 (http://www.openldap.org and http://python-ldap.sourceforge.net) 174 or 174 or 175 175 - SQLite v3.2.7 and the SQLite libraries if you plan to use SQLite 176 as the database backend (http://www.sqlite.org). You also need the 176 as the database backend (http://www.sqlite.org). You also need the 177 177 PySQLite module v2.0.5 or higher (http://www.pysqlite.org) 178 178 or 179 - The MySQL-python bindings. 180 IMPORTANT: If you are using MySQL 4.1, then MySQL-python must be 179 - The MySQL-python bindings. 180 IMPORTANT: If you are using MySQL 4.1, then MySQL-python must be 181 181 version 1.2 or greater. Version 1.0 does not work correctly with 4.1. 182 183 184 On Intel i386 architecture, and for performance reasons, it is 185 strongly suggested that you install the Python accelerator Psyco, 186 available at : 187 188 http://psyco.sourceforge.net 189 190 Under Debian : 191 192 $ apt-get install python-psyco 193 194 Other architectures may be supported as well in the future, check 195 this on Psyco's website. 196 197 Installing Psyco is not mandatory, but it will speedup PCL5 parsing 198 by almost 3 times. PostScript and PDF parsing can also benefit, 199 but in an almost unnoticeable manner since this part of the code 200 is already optimal. For PCL5 this is a completely different matter, 201 and if you install Psyco you will never regret it ! 202 Same remark applies for PCL6 (aka PCLXL) : the parser is completely 203 different, but the performance gain with Psyco is impressive. 204 182 183 205 184 You may also benefit from having the following tools installed to 206 185 deal with some printers : 207 186 208 187 - npadmin 209 188 - netcat 210 189 - ghostscript 211 190 212 191 You need to have the following tools installed on the database 213 192 server : 214 193 215 194 - PostgreSQL (http://www.postgresql.org) 216 217 or 218 195 196 or 197 219 198 - OpenLDAP, or any other LDAP server (http://www.openldap.org) 220 221 or 222 199 200 or 201 223 202 - SQLite, v3.2.7 or higher (http://www.sqlite.org). 224 203 Beware : with SQLite the database server and the print 225 204 servers MUST be the very same machine. 226 227 or 228 205 206 or 207 229 208 - MySQL 4.1 or higher. 5.x is recommended. 230 209 231 210 This list of prerequisite software may change in the future, when 232 PyKota will support more functionnalities you will be given 211 PyKota will support more functionnalities you will be given 233 212 alternatives. 234 235 Of course the Print Server and the database server can be the 236 very same machine if you've got a tiny network, or you can have 213 214 Of course the Print Server and the database server can be the 215 very same machine if you've got a tiny network, or you can have 237 216 multiple Print Servers all storing their quotas on the same database 238 217 server if you've got a bigger network. (NB : with SQLite, the database 239 218 can't be shared between several print servers) 240 241 Hint : 219 220 Hint : 242 221 ------ 243 222 244 - The Debian GNU/Linux distribution is to our knowledge the 223 - The Debian GNU/Linux distribution is to our knowledge the 245 224 easiest distribution to install PyKota on, because almost all 246 225 of PyKota dependencies are already included, excepted … … 253 232 manually. 254 233 255 Then : 234 Then : 256 235 ------ 257 236 258 237 Download the latest PyKota version from the Subversion tree : 259 238 … … 263 242 264 243 $ python checkdeps.py 265 244 266 245 An availability report for all the software needed by PyKota 267 246 will be displayed : you'll have to install the missing 268 247 software if you want PyKota to work correctly. 269 248 270 249 To install the software, just type : 271 250 … … 278 257 279 258 $ pksetup debian 280 281 or : 259 260 or : 282 261 283 262 $ pksetup ubuntu 284 263 285 264 and follow the instructions to install PyKota in interactive mode, then 286 265 skip the remaining of the section below. … … 291 270 292 271 $ adduser --system --group --home /etc/pykota --gecos PyKota pykota 293 272 294 273 Put the user your printing system is run as in the pykota system group : 295 274 296 275 $ adduser lp pykota 297 276 298 277 NB : on our system, the CUPS printing system runs as system user 'lp'. 299 278 Please adapt this to your own system. … … 304 283 change the passwords, or, in the case of the LDAP backend, adapt it 305 284 to your own LDAP DIT, and execute the initialization script 306 to create an empty PyKota database. Upgrade scripts may be 285 to create an empty PyKota database. Upgrade scripts may be 307 286 provided as well. NB : if you use PostgreSQL, a good way to 308 287 make PyKota work first time is to modify PostgreSQL's pg_hba.conf … … 312 291 and PostgreSQL's documentation for details on this subject. 313 292 314 Copy the conf/pykota.conf.sample and conf/pykotadmin.conf.sample 315 sample configuration files to ~pykota/pykota.conf and 316 ~pykota/pykotadmin.conf 293 Copy the conf/pykota.conf.sample and conf/pykotadmin.conf.sample 294 sample configuration files to ~pykota/pykota.conf and 295 ~pykota/pykotadmin.conf 317 296 The installation script usually copies these files into /usr/share/pykota 318 297 … … 320 299 be searched first in user pykota's home directory, then in /etc/pykota. 321 300 322 You need to adapt these files to your own needs. Especially you may 323 have to create sections named after your own printers, and change 324 the administrator's email address which by default is 325 root@localhost. Read and try to understand these two very well 326 commented files, so that you'll encounter less problems later. 301 You need to adapt these files to your own needs. Especially you may 302 have to create sections named after your own printers, and change 303 the administrator's email address which by default is 304 root@localhost. Read and try to understand these two very well 305 commented files, so that you'll encounter less problems later. 327 306 328 307 The rest of the installation depends on your printing system : 329 308 330 309 - CUPS Printing System : 331 310 332 311 Once and for all : 333 334 Create a symbolic link to the cupspykota backend 312 313 Create a symbolic link to the cupspykota backend 335 314 in CUPS's backend directory : 336 315 337 316 $ cd /usr/lib/cups/backend 338 317 $ ln -s /usr/share/pykota/cupspykota cupspykota 339 340 If you use CUPS v1.2 or higher, please do this as well : 341 318 319 If you use CUPS v1.2 or higher, please do this as well : 320 342 321 $ chmod 700 /usr/share/pykota/cupspykota 343 322 344 323 This allows the cupspykota backend to support other 345 324 backends which must be run as user root, like the 346 325 lpd backend for example. 347 326 348 327 Restart CUPS so that the new backend can be detected. 349 328 350 329 $ /etc/init.d/cupsys restart 351 352 for example under Debian, or any similar command depending 330 331 for example under Debian, or any similar command depending 353 332 on your operating system of choice. 354 333 355 334 For new printers : 356 357 Go to CUPS management interface (http://localhost:631) 335 336 Go to CUPS management interface (http://localhost:631) 358 337 and choose the appropriate PyKota managed device depending 359 338 on the type of printer you use. For example, if your 360 339 printer is waiting on : 361 340 362 341 socket://myprinter.example.com:9100 363 364 Then choose : 365 342 343 Then choose : 344 366 345 cupspykota:socket://myprinter.example.com:9100 367 368 Configure your printer as usual. 369 370 Now double check /etc/pykota/pykota.conf 371 346 347 Configure your printer as usual. 348 349 Now double check /etc/pykota/pykota.conf 350 372 351 You should manually create a section named after the 373 352 printer you've just added, unless you have set 374 353 all options globally. 375 376 The new pkturnkey command can help you with correct settings 354 355 The new pkturnkey command can help you with correct settings 377 356 for your printers. To have pkturnkey give you some hints 378 357 about what to put into pykota.conf for a particular 379 358 print queue, just use its --doconf command line switch : 380 359 381 360 $ pkturnkey --doconf TheNameOfThePrintQueue 382 361 383 362 pkturnkey will try to tell you what is the best accounting 384 363 method for each printer and will print some lines you'll 385 364 just have to copy&paste in the appropriate sections in 386 365 /etc/pykota/pykota.conf 387 366 388 367 For more informations about what pkturnkey can do for you, 389 368 see pkturnkey's manual page or use the --help command 390 369 line switch : 391 370 392 371 $ pkturnkey --help | less 393 372 394 373 That's all. 395 374 396 375 For existing print queues : 397 376 398 377 You want to route the print queue through PyKota, 399 378 and you can do this in several manners. 400 379 401 380 $ pkprinters --add --cups TheNameOfThePrintQueue 402 403 or 404 381 382 or 383 405 384 if your printer's DeviceURI is something like : 406 385 407 386 socket://myprinter.example.com:9100 408 409 then you can do this : 410 387 388 then you can do this : 389 411 390 $ pkprinters --add TheNameOfThePrintQueue 412 391 $ lpadmin -p TheNameOfThePrintQueue \ 413 392 -v cupspykota://socket://myprinter.example.com:9100 414 415 Finally, you could do it manually by modifying the 393 394 Finally, you could do it manually by modifying the 416 395 the DeviceURI lines in /etc/cups/printers.conf : 417 You would have to preprend 'cupspykota://' in front 396 You would have to preprend 'cupspykota://' in front 418 397 of what is already on these lines. For example, replace : 419 398 420 399 DeviceURI socket://myprinter.example.com:9100 421 422 with : 423 400 401 with : 402 424 403 DeviceURI cupspykota://socket://myprinter.example.com:9100 425 426 or : 427 404 405 or : 406 428 407 DeviceURI cupspykota://socket://myprinter.example.com:9100 429 408 430 409 Save the file and restart CUPS for the changes to take effect. 431 410 432 411 Here too, you may find it interesting to use the pkturnkey command as 433 412 described above to help with manual configuration of the file … … 435 414 436 415 - LPRng Printing System : 437 416 438 417 IMPORTANT : This release of PyKota DOES NOT support LPRng. 439 418 440 419 If you want to use PyKota with LPRng, you have to download 441 420 an earlier release of PyKota, for example v1.22HotFix1. 442 421 443 422 Now you can begin to populate the PyKota's database with printers, 444 423 users and groups : 445 446 Add printers and users to the quota system and set their quota values : 424 425 Add printers and users to the quota system and set their quota values : 447 426 448 427 You can either use pkturnkey, or do the same things manually by … … 452 431 453 432 $ pkprinters --help 454 433 455 434 will tell you how to create, manage or delete printers and 456 435 printers groups. 457 436 458 437 $ pkprinters --add --charge 0.05 hp2100 459 438 460 439 would add the printer named hp2100 with a price per page 461 440 of 0.05 unit. … … 464 443 465 444 $ pkusers --add --limitby balance --balance 10.0 jerome 466 445 467 446 would create user jerome and give him ten credits to spend 468 447 on any printer. 469 448 470 449 Finally create print quota entries : 471 450 472 451 $ edpykota --add --printer hp2100 john paul george ringo 473 474 This will create print quota entries for The Beatles on 452 453 This will create print quota entries for The Beatles on 475 454 printer hp2100. The print quota entry holds the number of 476 455 pages printed on a particular printer for a particular … … 478 457 of balance limits. See pkusers and edpykota's manual 479 458 pages for details. 480 481 Your users now should be able to print but not exceed their 459 460 Your users now should be able to print but not exceed their 482 461 printing quota. 483 462 … … 485 464 486 465 $ repykota --printer hp2100 487 466 488 467 or : 489 468 490 469 $ repykota 491 470 492 471 which will print quota usage for all users on all printers, 493 472 along with totals, if you are a PyKota Administator. If you are 494 473 a regular user, only your own quota report will be produced. 495 496 You can also use these commands : 497 498 $ pkusers --list 474 475 You can also use these commands : 476 477 $ pkusers --list 499 478 $ edpykota --list 500 479 501 480 $ pkusers --list john paul george ringo 502 481 $ edpykota --list --printer hp2100 john paul george ringo 503 482 504 483 Quota reports are also available remotely by using the CGI script 505 printquota.cgi provided in the cgi-bin/ subdirectory. You can 484 printquota.cgi provided in the cgi-bin/ subdirectory. You can 506 485 also use the CSS stylesheet present in the stylesheets/ subdirectory 507 and put it at your web server's DocumentRoot, to benefit from a nicer 486 and put it at your web server's DocumentRoot, to benefit from a nicer 508 487 look, especially quota violations will appear in different colors. 509 488 … … 515 494 516 495 http://otrs.librelogiciel.com/otrs/public.pl?ID=2 517 496 518 497 ============================================================ 519 498 … … 524 503 them available under the GNU General Public License : 525 504 526 - Kanakorn Horsiritham developped phpPykotaAdmin which is 505 - Kanakorn Horsiritham developped phpPykotaAdmin which is 527 506 a web based database independant administrative GUI, 528 507 written in PHP. 529 508 530 509 http://opensource.psu.ac.th/~kanakorn/mambo/ 531 532 He was also kind enough to write an installation guide 510 511 He was also kind enough to write an installation guide 533 512 in english for CUPS and PyKota with phpPykotaAdmin on Fedora 534 513 Core 3. You'll find this document on the same website. 535 514 536 515 This great software currently at version 0.3 is a wonderful 537 basis for an administrative GUI since it only depends on 516 basis for an administrative GUI since it only depends on 538 517 PyKota commands to be present to successfully manage 539 PyKota's database. 540 518 PyKota's database. 519 541 520 However this tool is very old now and doesn't work 542 521 with more recent versions of PyKota. It could be 543 522 a good starting point if you planned to develop such 544 523 a web user interface though. 545 546 Additionnal software will be listed here when they will be 524 525 Additionnal software will be listed here when they will be 547 526 ready. 548 527 … … 554 533 A mailing list is dedicated to Pykota, you can subscribe to it 555 534 or consult its archives at : 556 535 557 536 http://cgi.librelogiciel.com/mailman/listinfo/pykota 558 559 The mailing list is the preferred way to obtain support, because 537 538 The mailing list is the preferred way to obtain support, because 560 539 all members can help and can also benefit from the solutions 561 proposed by other members. 562 540 proposed by other members. 541 563 542 Posts by non-members are usually rejected. 564 543 565 544 The mailing list language is english and only english. 566 567 IRC : 545 546 IRC : 568 547 ----- 569 548 570 549 You can also chat with us : 571 550 572 551 /server irc.freenode.net 573 552 /join #pykota 574 575 Preferred language on this channel is english, but french 553 554 Preferred language on this channel is english, but french 576 555 is also accepted. Try to avoid exposing complex problems 577 556 in french because english speaking people on the channel 578 557 wouldn't benefit from the solutions. 579 558 580 559 PyKota's main author is known as 'tamere' on IRC. 581 560 582 561 ============================================================ 583 562 584 563 Please e-mail bugs to the mailing list at : pykota@librelogiciel.com 585 564 or to the main author at : alet@librelogiciel.com (Jerome Alet)