Show
Ignore:
Timestamp:
09/27/08 22:02:37 (16 years ago)
Author:
jerome
Message:

Removed unnecessary spaces at EOL.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/docs/installation.sgml

    r3283 r3413  
    33<chapter> 
    44  <title id="installation">Installation</title> 
    5    
     5 
    66  <para>Last modified on $Date$</para> 
    7    
     7 
    88  <para> 
    99    Before being able to use <application>PyKota</application>, you have of course to 
    1010    install it first. But before installing, you must carefully plan your installation. 
    1111  </para> 
    12    
     12 
    1313  <para> 
    1414    First you have to determine which machine will be the <application>PyKota</application> 
     
    1616    for keeping a centralized database of print usage for all your printers, users and groups. 
    1717  </para> 
    18    
     18 
    1919  <para> 
    2020    Then you have to list all the <firstterm>Print Servers</firstterm> for which 
    2121    you plan to use print quota facilities. 
    2222  </para> 
    23    
     23 
    2424  <para> 
    2525    With most database backends, several print servers can share a single database, however 
     
    2727    as your print quota database backend. 
    2828  </para> 
    29    
     29 
    3030  <para> 
    3131    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 
    3333    <ulink url="http://www.pykota.com/software/pykota">http://www.pykota.com/software/pykota</ulink>. 
    3434    If you've just bought an official package, then as soon as you've receive it you 
    3535    have to decompress and visit its archive, to do so just type the following commands : 
    3636    <screen> 
    37 jerome@nordine:~$ tar -zxf pykota-1.26_official.tar.gz     
     37jerome@nordine:~$ tar -zxf pykota-1.26_official.tar.gz 
    3838jerome@nordine:~$ cd pykota-1.26_official 
    3939jerome@nordine:~/pykota-1.26_official$ 
    4040    </screen> 
    4141  </para> 
    42    
     42 
    4343  <para> 
    4444    You can see many files in this directory, the first ones to read are <filename>README</filename>, 
    4545    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 
    4747    <application>PyKota</application> is distributed. Of course they are also mostly 
    4848    boring to read ! Detailed installation and operating instructions are defined 
     
    5454    know this because that's what you are currently reading ! 
    5555  </para> 
    56    
     56 
    5757  <sect1> 
    5858    <title>Interactive step-by-step installation of PyKota with pksetup</title> 
    59      
     59 
    6060    <para> 
    6161      <command>pksetup</command> is a command line tool with which you'll be able 
     
    6666      several servers to install identically. 
    6767    </para> 
    68      
     68 
    6969    <para> 
    7070      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 
    7272      <ulink url="http://www.ubuntu.com">Ubuntu</ulink> distributions. 
    7373      In addition, the database backend which will be installed with 
     
    7777      the installation manually, then read and follow the instructions in the next section. 
    7878    </para> 
    79      
     79 
    8080    <para> 
    8181      To launch the installation procedure, just type <literal>pksetup</literal> 
    8282      followed with the name of your distribution, like : 
    83     <screen>     
     83    <screen> 
    8484jerome@nordine:~/pykota-1.26_official$ ./bin/pksetup debian 
    85     </screen>   
     85    </screen> 
    8686      and then follow the instructions and answer to the several questions you'll 
    8787      be asked. 
    8888    </para> 
    8989  </sect1> 
    90    
     90 
    9191  <sect1> 
    9292    <title>Manual installation</title> 
     
    100100          This is especially the case if you've got only one server. 
    101101        </para> 
    102       </note>   
     102      </note> 
    103103    </para> 
    104      
     104 
    105105    <sect2> 
    106106      <title>Database server installation</title> 
    107        
     107 
    108108      <para> 
    109109        Depending on <application>PyKota</application>'s version number, different 
     
    111111        them how to configure it. 
    112112      </para> 
    113        
     113 
    114114      <sect3> 
    115115        <title>PostgreSQL</title> 
    116          
     116 
    117117        <para> 
    118118          <application>PostgreSQL</application> is an <firstterm>Object Relationnal DataBase 
    119119          Management System</firstterm> distributed under a <firstterm>Free Software</firstterm> 
    120           license from the  
     120          license from the 
    121121          <ulink url="http://www.postgresql.org">http://www.postgresql.org</ulink> 
    122122          web site. It certainely is the free <acronym>RDBMS</acronym> which has the most advanced 
    123123          features, and is widely used all over the world. 
    124124        </para> 
    125          
     125 
    126126        <para> 
    127127          To configure your database, you must have PostgreSQL already working. 
    128128          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 
    130130          <ulink url="http://www.postgresql.org">http://www.postgresql.org</ulink> for 
    131131          details. 
    132132        </para> 
    133          
     133 
    134134        <para> 
    135135          One thing you have to check, though, is that every Print Server on which you 
     
    146146          is not necessary though if your print quota database server and your Print Server are 
    147147          the very same host. 
    148         </para>   
    149          
     148        </para> 
     149 
    150150        <para> 
    151151          Here's an excerpt from a <filename>pg_hba.conf</filename> file. This one rejects all 
    152152          connections to PyKota's database excepted when made from the same host by <application>PostgreSQL</application> users 
    153153          <literal>pykotauser</literal> or <literal>pykotaadmin</literal> with the correct password. 
    154     <screen>         
     154    <screen> 
    155155          local all    postgres                              ident sameuser 
    156156          local all    all                                   reject 
     
    160160    </screen> 
    161161       </para> 
    162         
     162 
    163163       <para> 
    164164          Of course if your print server and your database servers have different <acronym>IP</acronym> 
     
    173173              any of its configuration files, in order for the changes to take effect. 
    174174            </para> 
    175           </tip>   
    176         </para> 
    177          
     175          </tip> 
     176        </para> 
     177 
    178178        <para> 
    179179          Be careful, you may be unable to connect from a Print Server to the <application>PostgreSQL</application> 
     
    186186            <title>Note</title> 
    187187            <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 
    194194        <para> 
    195195          Now that your <application>PostgreSQL</application> server is up and running, and 
     
    203203          itself, he is only defined in <application>PostgreSQL</application> and don't 
    204204          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>. 
    206206          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 
    209209          <footnote><para>a <application>PyKota</application> administrator is an user who can read the <filename>~pykota/pykotadmin.conf</filename> file.</para></footnote> 
    210210          launches a pykota command. This prevents normal 
     
    217217            <title>Note</title> 
    218218            <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 
    220220              <filename>initscripts/postgresql/pykota-postgresql.sql</filename> file 
    221221              accordingly, and report your changes into <application>PyKota</application>'s 
    222222              configuration files. 
    223223            </para> 
    224           </note>   
    225         </para> 
    226          
     224          </note> 
     225        </para> 
     226 
    227227        <para> 
    228228          To run this script, you can use the <command>psql</command> frontend to 
     
    236236    jerome@nordine:~/pykota-1.26_official/initscripts$ psql -h localhost -U postgres template1 
    237237    Welcome to psql, the PostgreSQL interactive terminal. 
    238      
     238 
    239239    Type:  \copyright for distribution terms 
    240240         \h for help with SQL commands 
     
    242242         \g or terminate with semicolon to execute query 
    243243         \q to quit 
    244      
    245     template1=# \i pykota-postgresql.sql  
     244 
     245    template1=# \i pykota-postgresql.sql 
    246246              ... a lot of output lines 
    247     pykota=#        
     247    pykota=# 
    248248          </screen> 
    249249          <note> 
     
    252252              If you use RPM or DEB packages, usually the 
    253253              <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 
    255255              with a README file. 
    256256            </para> 
    257           </note>   
    258         </para> 
    259          
     257          </note> 
     258        </para> 
     259 
    260260        <para> 
    261261          If you want to you can change passwords later in 
    262           <application>PostgreSQL</application> for the  
     262          <application>PostgreSQL</application> for the 
    263263          <literal>pykotaadmin</literal> and <literal>pykotauser</literal> users. 
    264264          To do so, just type the following lines while still being at the <command>psql</command> 
     
    272272          </screen> 
    273273        </para> 
    274          
     274 
    275275        <para> 
    276276          The <literal>\q</literal> command above will quit the <command>psql</command> 
    277277          program and return you to the shell's command line prompt. 
    278278        </para> 
    279          
     279 
    280280        <para> 
    281281          To improve security further, you could encrypt your database connections, or 
    282282          take any other step as needed. Please refer to <application>PostgreSQL</application>'s 
    283           documentation for details.  
     283          documentation for details. 
    284284          <warning> 
    285285            <title>Warning</title> 
     
    293293              though, it is just a general rule to keep in mind. 
    294294            </para> 
    295           </warning>   
    296         </para> 
    297          
     295          </warning> 
     296        </para> 
     297 
    298298        <para> 
    299299          For more details, please see <filename>initscripts/mysql/README.postgresql</filename>. 
    300300        </para> 
    301          
     301 
    302302        <para> 
    303303          If no error occured, then your print quota database is ready to be used. 
     
    312312              can try to fix the problem. Thanks in advance. 
    313313            </para> 
    314           </tip>   
    315         </para> 
    316          
    317       </sect3>   
    318        
     314          </tip> 
     315        </para> 
     316 
     317      </sect3> 
     318 
    319319      <sect3> 
    320320        <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 
    324324          as a print quota database backend. 
    325325          Some other LDAP servers can be used, but this is currently untested in production. 
    326326        </para> 
    327          
     327 
    328328        <para> 
    329329          <application>OpenLDAP</application> is a Lightweight Directory Access Protocol server 
     
    331331          You can download it from <ulink url="http://www.openldap.org">http://www.openldap.org</ulink>. 
    332332        </para> 
    333          
     333 
    334334        <para> 
    335335          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 
    337337          schemas directory. 
    338338          Under Debian GNU/Linux, this is something like : 
    339           <screen>         
     339          <screen> 
    340340    $ cp pykota.schema /etc/ldap/schema 
    341341          </screen> 
     
    343343            <title>Note</title> 
    344344            <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 
    347347              <filename>/etc/ldap</filename>. 
    348348            </para> 
     
    357357              your <acronym>LDAP</acronym> server's schemas directory. 
    358358            </para> 
    359           </note>   
     359          </note> 
    360360       </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 
    363363         include the PyKota schema. You should have something 
    364364         like : 
    365          <screen>     
     365         <screen> 
    366366    # Schema and objectClass definitions 
    367367    include         /etc/ldap/schema/core.schema 
     
    370370    include         /etc/ldap/schema/inetorgperson.schema 
    371371    include         /etc/ldap/schema/pykota.schema 
    372           </screen>         
    373         </para> 
    374          
     372          </screen> 
     373        </para> 
     374 
    375375        <para> 
    376376          While this is not mandatory, it is recommended that you setup 
     
    387387          </screen> 
    388388        </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 
    392392          your OpenLDAP server don't have search queries size limits, 
    393393          which gives for example (OpenLDAP 2.1.x or above) : 
    394            
    395     <screen>         
     394 
     395    <screen> 
    396396    # No Limits for PyKota's administrator and read-only user 
    397397    limits dn="cn=pykotaadmin,dc=example,dc=com" size.soft=-1 size.hard=soft 
    398398    limits dn="cn=pykotauser,dc=example,dc=com" size.soft=-1 size.hard=soft 
    399     </screen>         
    400      
     399    </screen> 
     400 
    401401          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 
    403403          (as set in pykotadmin.conf) and in ReadOnly mode (as set in pykota.conf). 
    404404        </para> 
    405          
     405 
    406406        <para> 
    407407          Finally, stop the <application>OpenLDAP</application> server, generate 
    408408          the index files, and restart <application>OpenLDAP</application> 
    409           <screen>     
     409          <screen> 
    410410    $ /etc/init.d/slapd stop 
    411411    $ slapindex 
     
    416416          <title>Note</title> 
    417417          <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 
    419419        '/sbin/service ldap start' instead. 
    420420          </para> 
     
    430430          entries, this may ease the maintainance. 
    431431        </para> 
    432          
     432 
    433433        <para> 
    434434          PyKota needs at least an <literal>ou</literal> for printers, for users quotas, for 
     
    437437          will probably be attached to each printer. 
    438438        </para> 
    439          
     439 
    440440        <para> 
    441441          Actually PyKota doesn't create these <literal>ou</literal>s for you, because it's 
     
    450450              If you use RPM or DEB packages, usually the 
    451451              <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 
    453453              with a README file. 
    454454            </para> 
    455           </note>   
    456         </para> 
    457          
     455          </note> 
     456        </para> 
     457 
    458458        <para> 
    459459          If no error occured, then your print quota database is ready to be used. 
     
    468468              can try to fix the problem. Thanks in advance. 
    469469            </para> 
    470           </tip>   
    471         </para> 
    472       </sect3>   
    473        
     470          </tip> 
     471        </para> 
     472      </sect3> 
     473 
    474474      <sect3> 
    475475        <title>MySQL</title> 
    476          
     476 
    477477        <para> 
    478478          <application>MySQL</application> is a simple Relationnal DataBase 
    479479          Management System distributed under a <firstterm>Free Software</firstterm> 
    480           license from the  
     480          license from the 
    481481          <ulink url="http://www.mysql.org">http://www.mysql.org</ulink> 
    482           web site.  
    483         </para> 
    484          
     482          web site. 
     483        </para> 
     484 
    485485        <para> 
    486486          To configure your database, you must have MySQL version 4.1 or higher already working. 
    487487          We recommend that you use MySQL 5.0 or higher though. 
    488488          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 
    490490          <ulink url="http://www.mysql.org">http://www.mysql.org</ulink> for 
    491491          details. 
    492492        </para> 
    493          
     493 
    494494        <para> 
    495495          One thing you have to check, though, is that every Print Server on which you 
     
    506506              any of its configuration files, in order for the changes to take effect. 
    507507            </para> 
    508           </tip>   
    509         </para> 
    510          
     508          </tip> 
     509        </para> 
     510 
    511511        <para> 
    512512          Be careful, you may be unable to connect from a Print Server to the <application>MySQL</application> 
     
    519519            <title>Note</title> 
    520520            <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 
    527527        <para> 
    528528          Now that your <application>MySQL</application> server is up and running, and 
     
    531531          <filename>pykota-1.26_official/initscripts/mysql/pykota-mysql.sql</filename> file. 
    532532          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. 
    534534          The database which will be created will be named <literal>pykota</literal> by default. 
    535535          Two database users will be defined to have access in readonly and read+write modes under 
     
    541541            <title>Note</title> 
    542542            <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 
    544544              <filename>initscripts/mysql/pykota-mysql.sql</filename> file 
    545545              accordingly, and report your changes into <application>PyKota</application>'s 
    546546              configuration files. 
    547547            </para> 
    548           </note>   
    549         </para> 
    550          
     548          </note> 
     549        </para> 
     550 
    551551        <para> 
    552552          To run this script, you can use the <command>mysql</command> frontend to 
     
    564564              If you use RPM or DEB packages, usually the 
    565565              <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 
    567567              with a README file. 
    568568            </para> 
    569           </note>   
    570         </para> 
    571          
     569          </note> 
     570        </para> 
     571 
    572572        <para> 
    573573          To improve security further, you could encrypt your database connections, or 
    574574          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 
    578578        <para> 
    579579          For more details, please see <filename>initscripts/mysql/README.mysql</filename>. 
    580580        </para> 
    581          
     581 
    582582        <para> 
    583583          If no error occured, then your print quota database is ready to be used. 
     
    592592              can try to fix the problem. Thanks in advance. 
    593593            </para> 
    594           </tip>   
    595         </para> 
    596          
    597       </sect3>   
    598        
     594          </tip> 
     595        </para> 
     596 
     597      </sect3> 
     598 
    599599      <sect3> 
    600600        <title>SQLite</title> 
    601          
     601 
    602602        <para> 
    603603          <application>SQLite</application> is an embeddable Relationnal DataBase 
    604604          distributed under a Free Software 
    605           license from the  
     605          license from the 
    606606          <ulink url="http://www.sqlite.org">http://www.sqlite.org</ulink> 
    607           web site.  
     607          web site. 
    608608          If is very easy to configure and use, offers a very small memory footprint, 
    609609          is very fast, but can only be used on the print server because it doesn't include 
    610610          a server daemon : the database is directly embedded in the application. 
    611611        </para> 
    612          
     612 
    613613        <para> 
    614614          To configure your database, you must have SQLite already working. 
    615615          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 
    617617          <ulink url="http://www.sqlite.org">http://www.sqlite.org</ulink> for 
    618618          details. 
    619619        </para> 
    620          
     620 
    621621        <para> 
    622622          Once <application>SQLite</application> is installed, you have to decide where 
    623623          you'll put your database. A good idea is to store it into the <literal>pykota</literal> 
    624624          user's home directory. Then to create the database, just type : 
    625     <screen>         
     625    <screen> 
    626626    # sqlite3 ~pykota/pykota.db &lt;pykota/initscripts/sqlite/pykota.sqlite 
    627627    # chown pykota.pykota ~pykota/pykota.db 
     
    634634          follow the instructions a bit below which explain how to install PyKota on the print server. 
    635635        </para> 
    636          
     636 
    637637        <para> 
    638638          Once this is done, you'll want to set in <filename>~pykota/pykota.conf</filename> the 
    639639          following lines in the <literal>[global]</literal> section : 
    640     <screen>         
     640    <screen> 
    641641    storagebackend : sqlitestorage 
    642642    storagename : /etc/pykota/pykota.db 
     
    657657              can try to fix the problem. Thanks in advance. 
    658658            </para> 
    659           </tip>   
    660         </para> 
    661       </sect3>   
    662        
     659          </tip> 
     660        </para> 
     661      </sect3> 
     662 
    663663      <sect3> 
    664664        <title>Berkeley DB</title> 
    665          
     665 
    666666        <para> 
    667667          A <application>Berkeley DB</application> backend is planned, but it actually 
     
    670670          each print server. This may still prove to be useful for small configurations. 
    671671        </para> 
    672       </sect3>   
    673     </sect2>   
    674      
     672      </sect3> 
     673    </sect2> 
     674 
    675675    <sect2> 
    676676      <title>Print Server Installation</title> 
    677        
     677 
    678678      <para> 
    679679        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 
    682682        <ulink url="http://www.cups.org"><application>CUPS</application></ulink> 
    683683        but older releases also supported <ulink url="http://lprng.sourceforge.net"><application>LPRng</application></ulink>. 
    684684        <application>LPRng</application> support might be re-added in the future. 
    685685      </para> 
    686        
     686 
    687687      <para> 
    688688        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 
    690690        work too. 
    691691        <itemizedlist> 
    692692          <listitem> 
    693693            <para> 
    694               <application>CUPS</application> version 1.3.4 or higher. NB :  
     694              <application>CUPS</application> version 1.3.4 or higher. NB : 
    695695              <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. 
    697697              You can download it from <ulink url="http://www.cups.org">http://www.cups.org</ulink> 
    698698            </para> 
    699           </listitem>   
     699          </listitem> 
    700700          <listitem> 
    701701            <para> 
     
    707707              of this language. 
    708708            </para> 
    709           </listitem>   
     709          </listitem> 
    710710          <listitem> 
    711711            <para> 
     
    721721                          version used on your print quota database server. 
    722722                        </para> 
    723                       </listitem>   
     723                      </listitem> 
    724724                      <listitem> 
    725725                        <para> 
    726                           The <application>PygreSQL</application> python module.  
     726                          The <application>PygreSQL</application> python module. 
    727727                          <application>PygreSQL</application> is normally included in 
    728728                          <application>PostgreSQL</application>, but you may want to 
    729729                          download it from <ulink url="http://www.pygresql.org">http://www.pygresql.org</ulink> 
    730730                        </para> 
    731                       </listitem>   
    732                     </itemizedlist>   
     731                      </listitem> 
     732                    </itemizedlist> 
    733733                  </para> 
    734                 </listitem>   
     734                </listitem> 
    735735                <listitem> 
    736736                  <para> 
    737                     OpenLDAP backend :  
     737                    OpenLDAP backend : 
    738738                    <itemizedlist> 
    739739                      <listitem> 
     
    742742                          the <application>OpenLDAP</application> version used on your print quota database server. 
    743743                        </para> 
    744                       </listitem>   
     744                      </listitem> 
    745745                      <listitem> 
    746746                        <para> 
     
    748748                          You may download this module from <ulink url="http://python-ldap.sourceforge.net">http://python-ldap.sourceforge.net</ulink> 
    749749                        </para> 
    750                       </listitem>   
     750                      </listitem> 
    751751                    </itemizedlist> 
    752752                  </para> 
     
    761761                          version used on your database server. 
    762762                        </para> 
    763                       </listitem>   
     763                      </listitem> 
    764764                      <listitem> 
    765765                        <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. 
    767767                          You can download it from <ulink url="http://sourceforge.net/projects/mysql-python">http://sourceforge.net/projects/mysql-python</ulink> 
    768768                        </para> 
    769                       </listitem>   
    770                     </itemizedlist>   
     769                      </listitem> 
     770                    </itemizedlist> 
    771771                  </para> 
    772772                </listitem> 
     
    774774                  <para> 
    775775                    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 
    777777                    <application>PostgreSQL</application>, <application>MySQL</application> or 
    778778                    <application>OpenLDAP</application> you can store your datas on a different 
     
    782782                        <para> 
    783783                          <application>SQLite</application> version 3.2.1 or higher and its library. 
    784                           You can download it from  
     784                          You can download it from 
    785785                          <ulink url="http://www.sqlite.org">http://www.sqlite.org</ulink> 
    786786                        </para> 
    787                       </listitem>   
     787                      </listitem> 
    788788                      <listitem> 
    789789                        <para> 
    790790                          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 
    792792                          <ulink url="http://www.pysqlite.org">http://www.pysqlite.org</ulink> 
    793793                        </para> 
    794                       </listitem>   
     794                      </listitem> 
    795795                    </itemizedlist> 
    796796                  </para> 
     
    801801                  </para> 
    802802                </listitem> 
    803               </itemizedlist>   
    804             </para> 
    805           </listitem>   
     803              </itemizedlist> 
     804            </para> 
     805          </listitem> 
    806806          <listitem> 
    807807            <para> 
     
    812812              printers. 
    813813            </para> 
    814           </listitem>   
     814          </listitem> 
    815815          <listitem> 
    816816            <para> 
     
    820820              You only need this if you plan to query your printers for their internal page counter via AppleTalk. 
    821821            </para> 
    822           </listitem>   
     822          </listitem> 
    823823          <listitem> 
    824824            <para> 
     
    826826              You can download it from <ulink url="http://www.egenix.com">http://www.egenix.com</ulink>. 
    827827            </para> 
    828           </listitem>   
     828          </listitem> 
    829829          <listitem> 
    830830            <para> 
    831831              The Python acccelerator <application>Psyco</application>. It must match your default Python version. 
    832832              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 
    834834              <application>Psyco</application> doesn't yet exist on other architectures. 
    835835            </para> 
    836           </listitem>   
     836          </listitem> 
    837837          <listitem> 
    838838            <para> 
     
    840840              You can download it from <ulink url="http://pysnmp.sourceforge.net">http://pysnmp.sourceforge.net</ulink>. 
    841841            </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. 
    846846              You can download it from <ulink url="http://www.librelogiciel.com/software/">http://www.librelogiciel.com/software/</ulink>. 
    847847            </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. 
    852852              You can download it from <ulink url="http://www.reportlab.org">http://www.reportlab.org</ulink>. 
    853853            </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. 
    858858              You can download it from <ulink url="http://www.pythonware.com">http://www.pythonware.com</ulink>. 
    859859            </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. 
    864864              You can download it from <ulink url="http://repose.cx/pyosd/">http://repose.cx/pyosd/</ulink>. 
    865865            </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. 
    870870              You can download it from <ulink url="http://www.pykota.com.com/software/pkpgcounter">http://www.pykota.com/software/pkpgcounter</ulink>. 
    871871            </para> 
    872           </listitem>   
     872          </listitem> 
    873873          <listitem> 
    874874            <para> 
     
    878878              If needed, you can download it from <ulink url="http://www.pangalactic.org/PyPAM/">http://www.pangalactic.org/PyPAM/</ulink>. 
    879879            </para> 
    880           </listitem>   
     880          </listitem> 
    881881          <listitem> 
    882882            <para> 
     
    884884              You can download it from <ulink url="http://www.pykota.com/software/pkipplib">http://www.pykota.com/software/pkipplib</ulink>. 
    885885            </para> 
    886           </listitem>   
    887         </itemizedlist>   
    888       </para> 
    889        
     886          </listitem> 
     887        </itemizedlist> 
     888      </para> 
     889 
    890890      <para> 
    891891        Instead of downloading all these programs' sources and compiling them, which really 
     
    897897        distributions. 
    898898      </para> 
    899        
     899 
    900900      <para> 
    901901         You can check that all needed software is installed by launching the <command>checkdeps.py</command> 
    902902         command : 
    903         <screen>       
    904     $ python checkdeps.py       
     903        <screen> 
     904    $ python checkdeps.py 
    905905        </screen> 
    906906      </para> 
    907        
     907 
    908908      <para> 
    909909        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, 
    911911        there's no need to compile anything. You just have to execute the installation 
    912912        script : 
    913         <screen>       
    914     $ python setup.py install       
     913        <screen> 
     914    $ python setup.py install 
    915915        </screen> 
    916916      </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 
    921921        configuration files <filename>conf/pykota.conf.sample</filename> and 
    922922        <filename>conf/pykotadmin.conf.sample</filename> there, along with 
    923923        a <filename>README</filename> file explaining their purpose. 
    924924      </para> 
    925        
     925 
    926926      <para> 
    927927        Now you have to create a <literal>pykota</literal> system user and group. The <application>PyKota</application> 
     
    929929        home directory. For example we could create the user and group, and set <filename>/etc/pykota</filename> 
    930930        as the home directory, but any other home directory will do : 
    931     <screen>       
     931    <screen> 
    932932      adduser --system --group --home /etc/pykota --gecos PyKota pykota 
    933933    </screen> 
    934934      </para> 
    935        
     935 
    936936      <para> 
    937937        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 
    939939        <filename>pykotadmin.conf</filename>. Once copied there, you just 
    940940        have to modify these files to adapt them to your own setup. 
     
    949949        to any external command of your choice. 
    950950      </para> 
    951        
     951 
    952952      <para> 
    953953        Please create a backup copy of the <filename>~pykota</filename> 
    954954        directory before modifying a working installation. 
    955955      </para> 
    956        
     956 
    957957      <para> 
    958958        PyKota features some interesting possibilities which allow you to 
     
    960960        or on a per printer basis. Please see the sample configuration files 
    961961        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 
    963963        one section per printer. Each section in the configuration files 
    964964        begins with a name between square brackets <literal>[]</literal>. 
     
    966966        of the print queue you want to manage with PyKota. 
    967967      </para> 
    968        
     968 
    969969      <para> 
    970970        After you have modified <application>PyKota</application>'s configuration files, you have to 
     
    980980        file contains the read-write user's identity and password. You must then 
    981981        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 
    983983        <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 
    985985        have to ensure that the user their printing system is run as 
    986986        can read both of these files. An easy way to do so is to put the <literal>lp</literal> user 
     
    988988        to give the correct permissions to <application>PyKota</application>'s configuration files : 
    989989        <screen> 
    990     $ chown -R pykota.pykota ~pykota/       
     990    $ chown -R pykota.pykota ~pykota/ 
    991991    $ 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 
    994994        </screen> 
    995          
     995 
    996996        <warning> 
    997997          <title>Warning</title> 
    998998          <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> 
    10001000            are considered to be <application>PyKota</application> administrators. So be 
    10011001            careful with these files permissions. 
     
    10031003        </warning> 
    10041004      </para> 
    1005        
     1005 
    10061006      <para> 
    10071007        On some systems, you may be able to strenghten permissions like this : 
    10081008        <screen> 
    1009     $ chown -R pykota.pykota ~pykota/       
     1009    $ chown -R pykota.pykota ~pykota/ 
    10101010    $ 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 
    10131013        </screen> 
    10141014      </para> 
    1015        
     1015 
    10161016      <para> 
    10171017        And on other ones, you may need to relax them, and change the files' owner : 
    10181018        <screen> 
    1019     $ chown pykota.pykota ~pykota/       
     1019    $ chown pykota.pykota ~pykota/ 
    10201020    $ 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 
    10251025        </screen> 
    10261026      </para> 
    1027        
     1027 
    10281028      <para> 
    10291029        This all depends on the printing system you are using, and the user the 
    10301030        printing system is usually running as. You need to remember three things : 
    1031          
     1031 
    10321032        <itemizedlist> 
    10331033          <listitem> 
     
    10351035              The user your printing system runs as MUST be allowed to read 
    10361036              both <application>PyKota</application>'s configuration files. 
    1037             </para>   
    1038           </listitem>   
    1039           <listitem>         
     1037            </para> 
     1038          </listitem> 
     1039          <listitem> 
    10401040            <para> 
    10411041              Any user who can read <filename>pykotadmin.conf</filename> 
     
    10441044            </para> 
    10451045          </listitem> 
    1046           <listitem>         
     1046          <listitem> 
    10471047            <para> 
    10481048              If <filename>cupsd.conf</filename> contains <literal>RunAsUser</literal>, then 
     
    10521052            </para> 
    10531053          </listitem> 
    1054         </itemizedlist>   
    1055       </para> 
    1056        
     1054        </itemizedlist> 
     1055      </para> 
     1056 
    10571057      <para> 
    10581058        Don't forget to restart your print server sofware if you changed group membership for the user it runs 
    10591059        as, otherwise your change wouldn't be taken into account. 
    10601060      </para> 
    1061        
     1061 
    10621062      <para> 
    10631063        Now depending on your printing system, the configuration to do is particular. 
     
    10651065        is not supported anymore. 
    10661066      </para> 
    1067        
     1067 
    10681068      <sect3> 
    10691069        <title>With CUPS</title> 
    1070          
     1070 
    10711071        <para> 
    10721072          From version 1.16alpha7 on, configuring <application>PyKota</application> to integrate 
    10731073          within <application>CUPS</application> is more than easy. 
    10741074        </para> 
    1075          
     1075 
    10761076        <para> 
    10771077          You just have to create a symbolic link to the <command>cupspykota</command> 
    10781078          command in <application>CUPS</application>' backend directory : 
    1079           <screen>         
    1080     $ cd /usr/lib/cups/backend         
     1079          <screen> 
     1080    $ cd /usr/lib/cups/backend 
    10811081    $ ln -s /usr/share/pykota/cupspykota cupspykota 
    10821082          </screen> 
    10831083        </para> 
    1084          
     1084 
    10851085        <para> 
    10861086          If you use CUPS v1.2 or higher, you must 
     
    10881088          backend to correctly support other backends which must be run 
    10891089          as the root user (e.g. the <command>lpd</command> backend) : 
    1090           <screen>         
     1090          <screen> 
    10911091    $ chmod 700 /usr/share/pykota/cupspykota 
    10921092          </screen> 
    10931093        </para> 
    1094          
     1094 
    10951095        <para> 
    10961096          You have to restart <application>CUPS</application> for this modification to 
    1097           take effect :  
     1097          take effect : 
    10981098          <screen> 
    1099     $ /etc/init.d/cupsys restart         
     1099    $ /etc/init.d/cupsys restart 
    11001100          </screen> 
    11011101        </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 
    11051105          <ulink url="http://localhost:631">http://localhost:631</ulink> on 
    11061106          your print server. 
    11071107        </para> 
    1108          
     1108 
    11091109        <para> 
    11101110          Then when creating new printers or reconfiguring existing ones, just 
     
    11141114              Debian 3.0 Woody is known to have problems : CUPS 1.1.14 doesn't automatically 
    11151115              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 
    11171117              PyKota's toplevel <filename>README</filename> file. 
    11181118            </para> 
     
    11231123          one. 
    11241124        </para> 
    1125          
     1125 
    11261126        <para> 
    11271127          Repeat the above procedure for each print queue on which you want to use 
    11281128          PyKota. That's all ! 
    11291129        </para> 
    1130          
     1130 
    11311131        <sect4> 
    11321132          <title>Troubleshooting</title> 
     
    11361136            well as the hardware and software you use. 
    11371137          </para> 
    1138            
     1138 
    11391139          <para> 
    1140             A searchable FAQ is now available at  
     1140            A searchable FAQ is now available at 
    11411141            <ulink url="http://otrs.librelogiciel.com/otrs/public.pl">http://otrs.librelogiciel.com/public.pl</ulink>. 
    11421142            A FAQ entry explaining in great details how to diagnose a problem correctly is 
    1143             available at  
     1143            available at 
    11441144            <ulink url="http://otrs.librelogiciel.com/otrs/public.pl?ID=2">http://otrs.librelogiciel.com/public.pl?ID=2</ulink>. 
    11451145          </para> 
    1146            
     1146 
    11471147          <para> 
    11481148            You can also ask questions on IRC : 
    11491149            <screen> 
    1150     /server irc.freenode.net           
     1150    /server irc.freenode.net 
    11511151    /join #pykota 
    11521152            </screen> 
    1153           </para>   
    1154         </sect4>   
    1155          
     1153          </para> 
     1154        </sect4> 
     1155 
    11561156      </sect3> 
    1157        
    1158     </sect2>   
     1157 
     1158    </sect2> 
    11591159  </sect1> 
    11601160</chapter>