Changeset 3413 for pykota/trunk/initscripts/postgresql/README.postgresql
- Timestamp:
- 09/27/08 22:02:37 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/initscripts/postgresql/README.postgresql
r3279 r3413 31 31 - edit the pykota-postgresql.sql file and modify the passwords on 32 32 the 'CREATE USER' lines. 33 33 34 34 - Launch the psql frontend and connect to the 35 35 database template1 as a PostgreSQL administrator 36 36 (i.e. the postgres user) : 37 37 38 38 as user 'root' : 39 39 40 40 # su - postgres 41 42 you're now user 'postgres', then continue with : 43 41 42 you're now user 'postgres', then continue with : 43 44 44 $ psql -f pykota-postgresql.sql template1 45 46 or depending on your settings you may prefer : 47 45 46 or depending on your settings you may prefer : 47 48 48 $ psql -h localhost -U postgres -f pykota-postgresql.sql template1 49 50 - If no error message appears, your PostgreSQL PyKota storage 49 50 - If no error message appears, your PostgreSQL PyKota storage 51 51 is now ready for use. NB : a lot of NOTICE messages might appear, 52 52 this is perfectly normal. 53 53 54 54 - In ~pykota/pykota.conf, ensure that the following lines 55 55 are present and unique inside the [global] section : 56 56 57 57 storagebackend : pgstorage 58 58 storageserver : localhost … … 60 60 storageuser : pykotauser 61 61 storageuserpw : readonlypw 62 62 63 63 NB : replace 'readonlypw' with the password you chose 64 64 for user 'pykotauser' when you modified pykota-postgresql.sql 65 65 66 66 - In ~pykota/pykotadmin.conf ensure that the following lines 67 67 are present and unique inside the [global] section : 68 68 69 69 storageadmin : pykotaadmin 70 70 storageadminpw : readwritepw 71 71 72 72 NB : replace 'readwritepw' with the password you chose 73 73 for user 'pykotaadmin' when you modified pykota-postgresql.sql 74 75 - IMPORTANT : if your database is not located on the print server, 76 replace 'localhost' in the lines above with your database server's 74 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 77 hostname or IP address. If your database server doesn't listen on 78 78 its standard port, add the port number at the end of the hostname 79 79 with a colon to separate the hostname from the port. 80 80 See pykota/conf/pykota.conf.sample for examples. 81 81 82 82 ============================================================ 83 83 … … 89 89 Some scripts to upgrade old PyKota databases to the new 90 90 database schema are included. You may have to run all 91 of them or only some of them, depending on your 91 of them or only some of them, depending on your 92 92 version of PyKota. Usually running them several times, for 93 93 example if you used several different development versions 94 94 of PyKota, won't do any harm. 95 95 96 96 If you're connected as user 'root', you have to be user 'postgres' 97 97 instead : 98 98 99 99 # su - postgres 100 100 101 101 You're now user 'postgres', then continue the upgrade by following 102 102 the instructions below, depending on the version you actually use : 103 103 104 104 * An SQL script to upgrade a 1.22 PyKota Storage DataBase to 105 105 1.23 is included. Launch it this way on the Quota Storage Server : 106 106 107 107 $ psql -U postgres pykota 108 108 pykota=# \i upgrade-to-1.23.sql 109 109 pykota=# \q 110 110 $ 111 111 112 112 This script adds many fields to existing tables, and a table to 113 113 manage billing codes. 114 114 115 115 * An SQL script to upgrade a 1.20 PyKota Storage DataBase to 116 116 1.21 is included. Launch it this way on the Quota Storage Server : 117 117 118 118 $ psql -U postgres pykota 119 119 pykota=# \i upgrade-to-1.21.sql 120 120 pykota=# \q 121 121 $ 122 122 123 123 This script adds many fields to existing tables, and also adds 124 124 some tables in indexes. 125 125 126 126 * An SQL script to upgrade a 1.18 PyKota Storage DataBase to 127 127 1.19 is included. Launch it this way on the Quota Storage Server : 128 128 129 129 $ psql -U postgres pykota 130 130 pykota=# \i upgrade-to-1.19.sql 131 131 pykota=# \q 132 132 $ 133 133 134 134 This script adds a field to the print job history. The field that 135 135 is added is : hostname 136 136 137 137 * An SQL script to upgrade a pre-1.16 PyKota Storage DataBase to 138 138 1.16 is included. Launch it this way on the Quota Storage Server : 139 139 140 140 $ psql -U postgres pykota 141 141 pykota=# \i upgrade-to-1.16.sql 142 142 pykota=# \q 143 143 $ 144 144 145 145 This script adds some fields to the print job history, so that 146 146 more complete information will be known. The fields that 147 are added are : jobprice, filename, title, copies and print 147 are added are : jobprice, filename, title, copies and print 148 148 command options. Also some indexes are created to speed things up. 149 150 What is below is for historical reasons only, real people don't use 149 150 What is below is for historical reasons only, real people don't use 151 151 such old beasts, and YOU SHOULDN'T EITHER ! 152 152 153 153 * An SQL script to upgrade a pre-1.14 PyKota Storage DataBase to 154 154 1.14 is included. Launch it this way on the Quota Storage Server : 155 155 156 156 $ psql -U postgres pykota 157 157 pykota=# \i upgrade-to-1.14.sql 158 158 pykota=# \q 159 159 $ 160 161 This script adds an "email" field for each user. This field, if not 160 161 This script adds an "email" field for each user. This field, if not 162 162 NULL, is used as the email address of the user when sending warning 163 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. 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.