Installation Last modified on $Date$ Before being able to use PyKota, you have of course to install it first. But before installing, you must carefully plan your installation. First you have to determine which machine will be the PyKota Storage Server. The Storage Server is the host responsible for keeping a centralized database of print usage for all your printers, users and groups. Then you have to list all the Print Servers for which you plan to use print quota facilities. Finally you have to download PyKota's latest version or buy an official package, from http://www.librelogiciel.com/software/. If you've just bought an official package, then as soon as you've receive it you have to decompress and visit its archive, to do so just type the following commands : jerome@nordine:~$ tar -zxf pykota-1.02-official.tar.gz jerome@nordine:~$ cd pykota-1.02-official jerome@nordine:~/pykota-1.02-official$ You can see many files in this directory, the first ones to read are README, then COPYING and LICENSE. They will give you basic installation instructions and explain the licensing terms under which PyKota is distributed. Of course they are also mostly boring to read ! Detailed installation and operating instructions are defined in the ./docs directory, in the form of SGML documentation in the DocBook format. You have to compile these files into readable documentation like the HTML or PDF formats, or buy an official PyKota package which already contains these compiled forms of the documentation. Now we will see what has to be done on each of the servers we are planning to use. Note Of course, depending on the size of your network, you may very well use the same machine as both a Print Server and a Storage Server. This is especially the case if you've got only one server. Storage Server Installation Depending on PyKota's version number, different types of storage backends may be supported, so we will see for each one of them how to configure it. PostgreSQL PostgreSQL is an Object Relationnal DataBase Management System distributed under a Free Software license from the http://www.postgresql.org web site. It certainely is the free RDBMS which has the most advanced features, and is widely used all over the world. To configure your Storage Server, you must have PostgreSQL already working. The complete installation of PostgreSQL is not covered by the present manual, please refer to your system's documentation or to http://www.postgresql.org for details. One thing you have to check, though, is that every Print Server on which you want to install the print quota mechanism, i.e. the print servers, must be able to connect to the PostgreSQL server. In the default installation of PostgreSQL this may not be the case for security reasons, except if both servers are in fact the same machine. In any case, it is recommended that you check the /etc/postgresql/pg_hba.conf and modify it if needed. This file is self documented and its modification is straightforward. You also have to make sure that PostgreSQL accepts TCP/IP connections. To do so you either have to launch it with the option or modify the /etc/postgresql/postgresql.conf, which is self documented and easy to modify too. Tip Don't forget to restart PostgreSQL if you modify any of its configuration files, in order for the changes to take effect. Be careful, you may be unable to connect from a Print Server to the PostgreSQL server even if the configuration is correct. Sometimes your connections may be blocked by one or more network firewalls along the route from one machine to the other. If this is the case, then the best thing you can do is to ask your Network Administrator to not filter the IP port used by PostgreSQL, which is usually port 5432/tcp. Note The TCP/IP network port used by PostgreSQL may be different. When in doubt, ask your System Administrator for the correct value. Now that your PostgreSQL server is up and running, and is waiting for your connections, you have to create the Quota Storage DataBase. To do so, you'll have to feed PostgreSQL with the pykota-x.xx/initscripts/pykota-postgresql.sql file. This file will create a Quota DataBase administrator and a Quota DataBase user in the PostgreSQL system, then create an empty Quota DataBase and set some permissions on it. To run this script, you can use the psql frontend to PostgreSQL, but your priviledges must be sufficient to be allowed to create users and databases. You can launch psql as the postgres user which is PostgreSQL's default administrator, and connect to the default database named template1. From a command line interpreter (i.e. shell), type the following commands : jerome@nordine:~$ cd pykota-1.02-official/initscripts/ jerome@nordine:~/pykota-1.02-official/initscripts$ psql -h localhost -U postgres template1 Welcome to psql, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help on internal slash commands \g or terminate with semicolon to execute query \q to quit template1=# \i pykota-postgresql.sql ... a lot of output lines template1=# \q If no error occured, then your Quota DataBase is ready to be used. Now you can let the Quota Storage Server alone, the remaining work will have to be done on each one of the print servers which will use this particular Quota Storage Server. Tip If an error occured, maybe your PostgreSQL version is too old, or an unexpected problem (like a bug) happened. Please send me an email so that I can try to solve the problem. Thanks in advance. MySQL A MySQL Storage Backend is planned, but it actually doesn't exist. LDAP An LDAP Storage Backend is planned, but it actually doesn't exist. Some people may already be working on this, though. Berkeley DB A Berkeley DB Storage Backend is planned, but it actually doesn't exist. It seems that remote storage won't be possible with such a backend, so in other terms this means that you will have a different quota database on each print server. This may still prove to be useful for small configurations. Print Server Installation For each Print Server on which you plan to implement the print quota mechanism, you have, of course, to have an already working printing environment. Currently PyKota only works with the CUPS environment, but more may be added in the future. TODO