root / pykota / trunk / initscripts / postgresql / README.postgresql @ 2992

Revision 2955, 6.6 kB (checked in by jerome, 18 years ago)

Improved documentation

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1# $Id$
2
3PyKota - Print Quotas for CUPS and LPRng
4
5(c) 2003, 2004, 2005, 2006 Jerome Alet <alet@librelogiciel.com>
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; if not, write to the Free Software
18Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
20============================================================
21
22Documentation for the pykota-postgresql.sql script :
23----------------------------------------------------
24
25This script is to be used to create an empty Quota Storage
26DataBase using PostgreSQL as a backend.
27
28If you have already installed PyKota, and have datas in your
29Quota Storage DataBase, you may prefer to skip this section
30and read the next one.
31
32        - edit the pykota-postgresql.sql file and modify the passwords on
33          the 'CREATE USER' lines.
34         
35        - Launch the psql frontend and connect to the
36          database template1 as a PostgreSQL administrator
37          (i.e. the postgres user) :
38         
39          as user 'root' :
40         
41            # su - postgres
42           
43          you're now user 'postgres', then continue with :   
44         
45            $ psql -f pykota-postgresql.sql template1
46           
47          or depending on your settings you may prefer : 
48         
49            $ psql -h localhost -U postgres -f pykota-postgresql.sql template1
50         
51        - If no error message appears, your PostgreSQL PyKota storage
52          is now ready for use. NB : a lot of NOTICE messages might appear,
53          this is perfectly normal.
54         
55        - In ~pykota/pykota.conf, ensure that the following lines
56          are present and unique inside the [global] section :
57       
58            storagebackend : pgstorage
59            storageserver : localhost
60            storagename : pykota
61            storageuser : pykotauser
62            storageuserpw : readonlypw
63           
64            NB : replace 'readonlypw' with the password you chose
65            for user 'pykotauser' when you modified pykota-postgresql.sql
66           
67        - In ~pykota/pykotadmin.conf ensure that the following lines
68          are present and unique inside the [global] section :
69       
70            storageadmin : pykotaadmin
71            storageadminpw : readwritepw
72           
73            NB : replace 'readwritepw' with the password you chose
74            for user 'pykotaadmin' when you modified pykota-postgresql.sql
75       
76        - IMPORTANT : if your database is not located on the print server,
77          replace 'localhost' in the lines above with your database server's
78          hostname or IP address. If your database server doesn't listen on
79          its standard port, add the port number at the end of the hostname
80          with a colon to separate the hostname from the port.
81          See pykota/conf/pykota.conf.sample for examples.
82         
83============================================================
84
85Upgrade scripts :
86
87  DON'T DO ANYTHING IF THIS IS YOUR FIRST INSTALLATION
88  OF PYKOTA.
89
90  Some scripts to upgrade old PyKota databases to the new
91  database schema are included. You may have to run all
92  of them or only some of them, depending on your
93  version of PyKota. Usually running them several times, for
94  example if you used several different development versions
95  of PyKota, won't do any harm.
96 
97  If you're connected as user 'root', you have to be user 'postgres'
98  instead :
99         
100            # su - postgres
101           
102  You're now user 'postgres', then continue the upgrade by following
103  the instructions below, depending on the version you actually use :
104 
105  * An SQL script to upgrade a 1.22 PyKota Storage DataBase to
106    1.23 is included. Launch it this way on the Quota Storage Server :
107   
108        $ psql -U postgres pykota
109        pykota=# \i upgrade-to-1.23.sql
110        pykota=# \q
111        $
112       
113    This script adds many fields to existing tables, and a table to
114    manage billing codes.
115   
116  * An SQL script to upgrade a 1.20 PyKota Storage DataBase to
117    1.21 is included. Launch it this way on the Quota Storage Server :
118   
119        $ psql -U postgres pykota
120        pykota=# \i upgrade-to-1.21.sql
121        pykota=# \q
122        $
123       
124    This script adds many fields to existing tables, and also adds
125    some tables in indexes.
126   
127  * An SQL script to upgrade a 1.18 PyKota Storage DataBase to
128    1.19 is included. Launch it this way on the Quota Storage Server :
129   
130        $ psql -U postgres pykota
131        pykota=# \i upgrade-to-1.19.sql
132        pykota=# \q
133        $
134       
135    This script adds a field to the print job history. The field that
136    is added is : hostname
137   
138  * An SQL script to upgrade a pre-1.16 PyKota Storage DataBase to
139    1.16 is included. Launch it this way on the Quota Storage Server :
140   
141        $ psql -U postgres pykota
142        pykota=# \i upgrade-to-1.16.sql
143        pykota=# \q
144        $
145       
146    This script adds some fields to the print job history, so that
147    more complete information will be known. The fields that
148    are added are : jobprice, filename, title, copies and print
149    command options. Also some indexes are created to speed things up.
150 
151What is below is for historical reasons only, real people don't use 
152such old beasts, and YOU SHOULDN'T EITHER !
153
154  * An SQL script to upgrade a pre-1.14 PyKota Storage DataBase to
155    1.14 is included. Launch it this way on the Quota Storage Server :
156   
157        $ psql -U postgres pykota
158        pykota=# \i upgrade-to-1.14.sql
159        pykota=# \q
160        $
161       
162    This script adds an "email" field for each user. This field, if not   
163    NULL, is used as the email address of the user when sending warning
164    messages in case he is over quota.
165   
166  * An sql script to upgrade a pre-1.01 PyKota Quota Storage DataBase to
167    1.01 is still included for historical reasons. PLEASE DON'T USE IT !
168 
169  * If you are already running an old version of PyKota (<1.03) and
170    want to upgrade to 1.03, YOU HAVE TO RUN the
171    upgrade-from-before-1.03.py shell script. NOT LAUNCHING THIS SCRIPT
172    WILL CAUSE PYKOTA TO STOP WORKING ! PLEASE NEVER RUN THIS SCRIPT IF
173    YOUR EXISTING VERSION OF PYKOTA IS ALREADY 1.03 OR HIGHER.
Note: See TracBrowser for help on using the browser.