[2593] | 1 | # $Id$ |
---|
| 2 | |
---|
[3259] | 3 | PyKota - Print Quotas for CUPS |
---|
[2593] | 4 | |
---|
[3279] | 5 | (c) 2003, 2004, 2005, 2006, 2007, 2008 Jerome Alet <alet@librelogiciel.com> |
---|
[3259] | 6 | This program is free software: you can redistribute it and/or modify |
---|
[2593] | 7 | it under the terms of the GNU General Public License as published by |
---|
[3259] | 8 | the Free Software Foundation, either version 3 of the License, or |
---|
[2593] | 9 | (at your option) any later version. |
---|
| 10 | |
---|
| 11 | This program is distributed in the hope that it will be useful, |
---|
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 14 | GNU General Public License for more details. |
---|
| 15 | |
---|
| 16 | You should have received a copy of the GNU General Public License |
---|
[3259] | 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
[2593] | 18 | |
---|
[2603] | 19 | =================================================================== |
---|
[2593] | 20 | |
---|
| 21 | Documentation : |
---|
| 22 | --------------- |
---|
| 23 | |
---|
| 24 | pykota.sqlite : |
---|
| 25 | |
---|
| 26 | This file can be used to create an empty SQLite3 database |
---|
| 27 | for use with PyKota, in the case you don't want to use |
---|
[2840] | 28 | either PostgreSQL, MySQL, or LDAP : |
---|
[3413] | 29 | |
---|
[2593] | 30 | NB : an SQLite3 database can't be shared between several |
---|
[2840] | 31 | PyKota managed print servers, contrarily to the other |
---|
| 32 | database backends. |
---|
[3413] | 33 | |
---|
[2593] | 34 | HowTo : |
---|
[3413] | 35 | |
---|
[2843] | 36 | - Install SQLite v3.2.1 or higher, and its development files, |
---|
[2593] | 37 | for example on my Debian box : |
---|
[3413] | 38 | |
---|
[2593] | 39 | # apt-get install sqlite3 libsqlite3-dev |
---|
| 40 | |
---|
[3413] | 41 | You can also download SQLite from http://www.sqlite.org |
---|
| 42 | |
---|
[2593] | 43 | - Download and install PySQLite v2.0.5 or higher from : |
---|
[3413] | 44 | |
---|
[2603] | 45 | http://www.pysqlite.org |
---|
[2593] | 46 | |
---|
| 47 | Install it this way : |
---|
| 48 | |
---|
| 49 | # tar -zxf pysqlite-2.0.5.tar.gz |
---|
| 50 | # cd pysqlite-2.0.5 |
---|
| 51 | # python setup.py install |
---|
[3413] | 52 | |
---|
[2818] | 53 | Under Debian, if the package exists for your version of Debian, |
---|
| 54 | simply do : |
---|
[3413] | 55 | |
---|
[2818] | 56 | # apt-get install python-pysqlite2 |
---|
[3413] | 57 | |
---|
[2593] | 58 | - Create an SQLite3 database for PyKota : |
---|
| 59 | |
---|
[2594] | 60 | # sqlite3 ~pykota/pykota.db <pykota.sqlite |
---|
| 61 | # chown pykota.pykota ~pykota/pykota.db |
---|
| 62 | # chmod 660 ~pykota/pykota.db |
---|
| 63 | # chown pykota.pykota ~pykota (seems to be necessary) |
---|
[3413] | 64 | |
---|
[2593] | 65 | NB : adapt the permissions so that the user your printing |
---|
| 66 | system runs as (e.g. user 'lp') can read and write |
---|
| 67 | to the /etc/pykota/pykota.db file. |
---|
[3413] | 68 | |
---|
[2818] | 69 | - In ~pykota/pykotadmin.conf, just comment out all the lines |
---|
[2593] | 70 | |
---|
[2818] | 71 | - In ~pykota/pykota.conf, ensure that the following lines |
---|
| 72 | are present and unique inside the [global] section : |
---|
[2593] | 73 | |
---|
| 74 | storagebackend : sqlitestorage |
---|
| 75 | storagename : /etc/pykota/pykota.db |
---|
[3413] | 76 | |
---|
[2593] | 77 | And comment out all other directives which name begins with 'storage'. |
---|
| 78 | NB : feel free to use a different path to store pykota.db, and |
---|
[2818] | 79 | adapt your configuration files and permissions accordingly. |
---|
[2593] | 80 | |
---|
[3413] | 81 | Your PyKota setup is now ready to be used with an SQLite3 database. |
---|
| 82 | |
---|
[2818] | 83 | IMPORTANT : with PyKota's SQLite backend there's no possibility to separate |
---|
| 84 | readonly accesses from readwrite accesses for now, so don't set your |
---|
| 85 | permissions too loosely if untrusted users have local shell access on |
---|
| 86 | your print server. |
---|
| 87 | |
---|
[2593] | 88 | Please report bugs to : alet@librelogiciel.com |
---|
| 89 | |
---|
| 90 | =================================================================== |
---|