[753] | 1 | <!-- $Id$ --> |
---|
| 2 | |
---|
| 3 | <chapter> |
---|
[856] | 4 | <title>Installation</title> |
---|
[860] | 5 | |
---|
| 6 | <para>Last modified on $Date$</para> |
---|
| 7 | |
---|
[753] | 8 | <para> |
---|
[856] | 9 | Before being able to use <application>PyKota</application>, you have of course to |
---|
| 10 | install it first. But before installing, you must carefully plan your installation. |
---|
[753] | 11 | </para> |
---|
[856] | 12 | |
---|
| 13 | <para> |
---|
| 14 | First you have to determine which machine will be the <application>PyKota</application> |
---|
[860] | 15 | <firstterm>Storage Server</firstterm>. The Storage Server is the host responsible |
---|
[856] | 16 | for keeping a centralized database of print usage for all your printers, users and groups. |
---|
| 17 | </para> |
---|
| 18 | |
---|
| 19 | <para> |
---|
[860] | 20 | Then you have to list all the <firstterm>Print Servers</firstterm> for which |
---|
| 21 | you plan to use <firstterm>print quota</firstterm> facilities. |
---|
[856] | 22 | </para> |
---|
| 23 | |
---|
| 24 | <para> |
---|
[859] | 25 | Now we will see what has to be done on these servers. |
---|
[856] | 26 | <note> |
---|
| 27 | <title>Note</title> |
---|
| 28 | <para> |
---|
| 29 | Of course, depending on the size of your network, you may very well |
---|
| 30 | use the same machine as both a Print Server and a Storage Server. |
---|
| 31 | This is especially the case if you've got only one server. |
---|
| 32 | </para> |
---|
| 33 | </note> |
---|
| 34 | </para> |
---|
| 35 | |
---|
| 36 | <sect1> |
---|
| 37 | <title>Storage Server Installation</title> |
---|
| 38 | |
---|
| 39 | <para> |
---|
| 40 | Depending on <application>PyKota</application>'s version number, different |
---|
| 41 | types of storage backends may be supported, so we will see for each one of |
---|
| 42 | them how to configure it. |
---|
| 43 | </para> |
---|
| 44 | |
---|
| 45 | <sect2> |
---|
| 46 | <title>PostgreSQL</title> |
---|
| 47 | |
---|
| 48 | <para> |
---|
[860] | 49 | <application>PostgreSQL</application> is an <firstterm>Object Relationnal DataBase |
---|
| 50 | Management System</firstterm> distributed under a <firstterm>Free Software</firstterm> |
---|
[856] | 51 | license from the |
---|
| 52 | <ulink url="http://www.postgresql.org">http://www.postgresql.org</ulink> |
---|
| 53 | web site. It certainely is the free <acronym>RDBMS</acronym> which has the most advanced |
---|
| 54 | features, and is widely used all over the world. |
---|
| 55 | </para> |
---|
| 56 | |
---|
| 57 | <para> |
---|
| 58 | To configure your Storage Server, you must have PostgreSQL already working. |
---|
| 59 | The complete installation of <application>PostgreSQL</application> is not covered by |
---|
| 60 | the present manual, please refer to your system's documentation or to |
---|
| 61 | <ulink url="http://www.postgresql.org">http://www.postgresql.org</ulink> for |
---|
| 62 | details. |
---|
| 63 | </para> |
---|
| 64 | |
---|
| 65 | <para> |
---|
| 66 | One thing you have to check, though, is that every Print Server on which you |
---|
[858] | 67 | want to install the print quota mechanism, i.e. the print servers, must be able to connect to the |
---|
[856] | 68 | <application>PostgreSQL</application> server. In the default installation of |
---|
| 69 | <application>PostgreSQL</application> this may not be the case for security reasons, except if both |
---|
| 70 | servers are in fact the same machine. In any case, it is recommended that you |
---|
| 71 | check the <filename>/etc/postgresql/pg_hba.conf</filename> and modify it if |
---|
| 72 | needed. This file is self documented and its modification is straightforward. |
---|
[858] | 73 | You also have to make sure that <application>PostgreSQL</application> accepts <acronym>TCP/IP</acronym> connections. |
---|
| 74 | To do so you either have to launch it with the <option>-i</option> option or |
---|
| 75 | modify the <filename>/etc/postgresql/postgresql.conf</filename>, which is |
---|
| 76 | self documented and easy to modify too. |
---|
[856] | 77 | <tip> |
---|
| 78 | <title>Tip</title> |
---|
| 79 | <para> |
---|
| 80 | Don't forget to restart <application>PostgreSQL</application> if you modify |
---|
| 81 | any of its configuration files, in order for the changes to take effect. |
---|
| 82 | </para> |
---|
| 83 | </tip> |
---|
| 84 | </para> |
---|
| 85 | |
---|
| 86 | <para> |
---|
| 87 | Be careful, you may be unable to connect from a Print Server to the <application>PostgreSQL</application> |
---|
| 88 | server even if the configuration is correct. Sometimes your connections may be blocked by |
---|
| 89 | one or more network firewalls along the route from one machine to the other. If this |
---|
[860] | 90 | is the case, then the best thing you can do is to ask your <firstterm>Network Administrator</firstterm> |
---|
[856] | 91 | to not filter the IP port used by <application>PostgreSQL</application>, which is |
---|
| 92 | usually port 5432/tcp. |
---|
[860] | 93 | <note> |
---|
| 94 | <title>Note</title> |
---|
[856] | 95 | <para> |
---|
| 96 | The TCP/IP network port used by PostgreSQL may be different. When in doubt, ask your |
---|
[860] | 97 | <firstterm>System Administrator</firstterm> for the correct value. |
---|
[856] | 98 | </para> |
---|
[860] | 99 | </note> |
---|
[856] | 100 | </para> |
---|
| 101 | |
---|
| 102 | <para> |
---|
[860] | 103 | Now that your <application>PostgreSQL</application> server is up and running, and |
---|
| 104 | is waiting for your connections, you have to create the Quota Storage DataBase. |
---|
| 105 | To do so, you'll have to feed <application>PostgreSQL</application> with the |
---|
| 106 | <filename>pykota-x.xx/initscripts/pykota-postgresql.sql</filename> file. |
---|
| 107 | This file will create a Quota DataBase administrator and a Quota DataBase user |
---|
| 108 | in the <application>PostgreSQL</application> system, then create an empty |
---|
| 109 | Quota DataBase and set some permissions on it. |
---|
[856] | 110 | </para> |
---|
[860] | 111 | |
---|
| 112 | <para> |
---|
| 113 | To run this script, you can use the <application>psql</application> frontend to |
---|
| 114 | <application>PostgreSQL</application>, but your priviledges must be sufficient |
---|
| 115 | to be allowed to create users and databases. You can launch <application>psql</application> |
---|
| 116 | as the <literal>postgres</literal> user which is <application>PostgreSQL</application>'s |
---|
| 117 | default administrator, and connect to the default database named <literal>template1</literal>. |
---|
| 118 | From a command line interpreter (i.e. shell), type the following commands : |
---|
| 119 | <screen> |
---|
| 120 | jerome@nordine:~$ cd pykota-1.02-official/initscripts/ |
---|
| 121 | jerome@nordine:~/pykota-1.02-official/initscripts$ psql -h localhost -U postgres template1 |
---|
| 122 | Welcome to psql, the PostgreSQL interactive terminal. |
---|
| 123 | |
---|
| 124 | Type: \copyright for distribution terms |
---|
| 125 | \h for help with SQL commands |
---|
| 126 | \? for help on internal slash commands |
---|
| 127 | \g or terminate with semicolon to execute query |
---|
| 128 | \q to quit |
---|
| 129 | |
---|
| 130 | template1=# \i pykota-postgresql.sql |
---|
| 131 | ... a lot of output lines |
---|
| 132 | template1=# \q |
---|
| 133 | </screen> |
---|
| 134 | </para> |
---|
| 135 | |
---|
| 136 | <para> |
---|
| 137 | If no error occured, then your Quota DataBase is ready to be used. |
---|
| 138 | Now you can let the Quota Storage Server alone, the remaining work |
---|
| 139 | will have to be done on each one of the print servers which will |
---|
| 140 | use this particular Quota Storage Server. |
---|
| 141 | <tip> |
---|
| 142 | <title>Tip</title> |
---|
| 143 | <para> |
---|
| 144 | If an error occured, maybe your PostgreSQL version is too old, or |
---|
| 145 | an unexpected problem (like a bug) happened. Please send me an email so that I |
---|
| 146 | can try to solve the problem. Thanks in advance. |
---|
| 147 | </para> |
---|
| 148 | </tip> |
---|
| 149 | </para> |
---|
[856] | 150 | </sect2> |
---|
| 151 | |
---|
| 152 | <sect2> |
---|
| 153 | <title>MySQL</title> |
---|
| 154 | |
---|
| 155 | <para> |
---|
[857] | 156 | A <application>MySQL</application> Storage Backend is planned, but it actually |
---|
| 157 | doesn't exist. |
---|
[856] | 158 | </para> |
---|
| 159 | </sect2> |
---|
| 160 | |
---|
| 161 | <sect2> |
---|
| 162 | <title>LDAP</title> |
---|
| 163 | |
---|
| 164 | <para> |
---|
[857] | 165 | An <application>LDAP</application> Storage Backend is planned, but it actually |
---|
| 166 | doesn't exist. Some people may already be working on this, though. |
---|
[856] | 167 | </para> |
---|
| 168 | </sect2> |
---|
| 169 | |
---|
| 170 | <sect2> |
---|
| 171 | <title>Berkeley DB</title> |
---|
| 172 | |
---|
| 173 | <para> |
---|
[857] | 174 | A <application>Berkeley DB</application> Storage Backend is planned, but it actually |
---|
| 175 | doesn't exist. It seems that remote storage won't be possible with such a backend, |
---|
| 176 | so in other terms this means that you will have a different quota database on |
---|
| 177 | each print server. This may still prove to be useful for small configurations. |
---|
[856] | 178 | </para> |
---|
| 179 | </sect2> |
---|
| 180 | </sect1> |
---|
| 181 | |
---|
| 182 | <sect1> |
---|
| 183 | <title>Print Server Installation</title> |
---|
| 184 | |
---|
| 185 | <para> |
---|
| 186 | For each Print Server on which you plan to implement the print quota |
---|
| 187 | mechanism, you have, of course, to have an already working printing environment. |
---|
| 188 | Currently <application>PyKota</application> only works with the |
---|
| 189 | <ulink url="http://www.cups.org"><application>CUPS</application></ulink> environment, |
---|
| 190 | but more may be added in the future. |
---|
| 191 | </para> |
---|
| 192 | |
---|
| 193 | <para> |
---|
| 194 | TODO |
---|
| 195 | </para> |
---|
| 196 | </sect1> |
---|
[753] | 197 | </chapter> |
---|
| 198 | |
---|
| 199 | <!-- |
---|
| 200 | |
---|
| 201 | $Log$ |
---|
[860] | 202 | Revision 1.6 2003/03/22 14:06:02 jalet |
---|
| 203 | Quota Storage Server installation is OK for PostgreSQL. |
---|
| 204 | |
---|
[859] | 205 | Revision 1.5 2003/03/22 13:11:33 jalet |
---|
| 206 | The port on which the Quota Storage Sever is listening can now |
---|
| 207 | be set in the configuration file (see sample). |
---|
| 208 | Better error handling if PygreSQL is not installed. |
---|
| 209 | Improved documentation. |
---|
| 210 | Version number changed to 1.02alpha |
---|
| 211 | |
---|
[858] | 212 | Revision 1.4 2003/03/22 07:20:38 jalet |
---|
| 213 | More information wrt PostgreSQL tcp/ip configuration. |
---|
| 214 | |
---|
[857] | 215 | Revision 1.3 2003/03/18 22:18:25 jalet |
---|
| 216 | The documentation will only be a sequence of chapters in a single part, not |
---|
| 217 | multiple parts each including chapters. |
---|
| 218 | |
---|
[856] | 219 | Revision 1.2 2003/03/18 22:10:54 jalet |
---|
| 220 | Documentation improvements. |
---|
| 221 | |
---|
[753] | 222 | Revision 1.1 2003/02/08 00:03:35 jalet |
---|
| 223 | Documentation skeleton added |
---|
| 224 | |
---|
| 225 | |
---|
| 226 | --> |
---|