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

Revision 3279, 6.5 kB (checked in by jerome, 16 years ago)

Finished changing copyright years, excepted for contributed stuff
and database schema migration scripts which would only be useful to
people with very very old releases of PyKota : these scripts won't change
for sure, and might disappear anyway...

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