Installation of QuizComposer on current UNIX/Linux Web-server.

This is an HTML-page (install.htm) in the QuizComposer software system. Together with a companion CGI-program (install.py) it can be used to install the QuizComposer system on a computer with the UNIX or Linux operating system, the Apache Web server program (or other server program, presumably), the Bash shell and the Python programming language.

You are expected to have a little experience with UNIX/Linux, Bash and Apache configuration.

You must be either the administrator (root) of the computer or be a user having appropriate rights to install a Web server, either somewhere on the computer or in your home directory. For example, you could be the "User" of the Apache server as defined in the configuration file for the server. You might find this configuration file in a directory under /etc/httpd/conf. You might also be one among a number of users of a computer system haviing an account permitting you to set up a Web server the first page of which has a Universal Resource Location with a format like www.abc.xy/~user. Or you might be the administrator (root) of such a system wishing to set up such a user. In any case, you must have access to two directories, one for Web pages and one for CGI-scripts. In the configuration file they might be defined by the so-called directives DocumentRoot and ScriptAlias. Common names for the directories are public_html and cgi-bin, respectively.

Furthermore you must have access to a "home" directory into which a directory (normally with the name quizcomposer) with the QuizComposer programs and data files will be placed together with directories containing quizzes and questionnaires created by the authors. The "home" directory will also contain a directory (quizcomposerinstall.d) in which all install files (except install.htm and install.py) will be placed. In what follows this directory is denoted the install directory.

Installation of the QuizComposer system commences with the copying of this HTML-page (install.htm) to the DocumentRoot and the companion CGI-program (install.py) to the ScriptAlias and setting appropriate access rights for these files.

You might have to make one or more alterations to the copy of this file, which you put in DocumentRoot. This can be checked as follows. Point to the HTML page with your browser, LEAVE THE PASSWORD FIELD EMPTY, and click any button. IF YOU DO *NOT* GET A MESSAGE ABOUT A MISSING PASSWORD, YOU PROBABLY HAVE TO CHANGE THE ACTION PARAMETER IN THE FORM TAG (the line containing '<FORM ...>'). The first part of the parameter, i.e. /cgi-bin/ must be changed to the first element in the ScriptAlias directive. Other posibilities are that the path to the install program (install.py) does not correspond to the last element in the ScriptAlias directive or that the access rights to one of the two files have not been set correctly.

If, in the test above, YOU DO GET A MESSAGE ABOUT A MISSING PASSWORD, you should go on to consider the values of the install variables in the large entry field. The contents of this field is a shell script used (via the source command) as part of the install script performing the installation. All lines starting with a hash (#) are comments. All other lines define the value of an install variable. Some comment lines display an example value for an install variable. You may wish to alter the value of one or more of these variables so that you won't have to enter the values every time you perform the installation. Values containing a $-sign are evaluated during installation according to the environment for the installation. You can get a listing of the environment by clicking the appropriate button further down in the form. You can also get an evaluation of the values which depend on the environment by clicking an appropriate button further down.

It might be a good idea to copy the complete entry field into a local file for editing and to save the file for subsequent re-installations.

One install variable which can be tricky to set is the CGINAME. If you leave it unset the install.py program will determine the value by scanning the install.htm page for the ACTION parameter in the FORM tag and use that prefix to install.py. In some cases this may not be correct (due partly to the way the Web server is configured, partly to the way Web pages in QuizComposer are placed). You may try to set CGINAME to ../cgi-bin/ or cgi-bin/. Ask for help if you are stuck.

The complete text of the entry field for setting install variables will be copied by the install.py program to a file install.var in a sub-directory of the install directory used for the installation process. The name given to that sub-directory is the date of the installation process (re-installations on the same day use the same sub-directory). Notice the difference between the install directory and the install sub-directories.

Before clicking the the button marked INSTALL QUIZCOMPOSER make sure you are connected to the Web from where two files will be fetched, namely the install script install.sh, and the file install.tgz containing the QuizComposer system itself. Both are read from www.quizcomposer.dk and placed in the installation sub-directory mentioned above. Execution of the install script (install.sh) accomplishes the installation process. Apart from the installing QuizComposer onto your Web server the installation process creates two files, install.log and install.err into the sub-directory for installation. You can have these files displayed by clicking appropriate buttons in the install.htm page. Furthermore, if your QuizComposer installation is to use external programs (such as YACAS) for checking answers to quiz questions, prior to starting the installation process you must place appropriate interface programs (between QuizComposer and the external programs) into the install directory. Using external programs is indicated in an install variable XCHK, see below in the field for defining install variables. The install script install.sh copies the interface programs into the ScriptAlias directory (among the other excutables). Interface programs are sometimes also denoted checker programs.

After an installation you can go to the installation sub-directory (and any previous "neighbouring" sub-directory) and re-perform the installation with the command:
bash install.sh > install.log 2> install.err
or similar. You might wish to alter some of the values for the install variables (by editing the file install.var) or any interface program before excuting the command. Notice that the bash command above is executed in an environment different form the one executed by install.py. Thus, no installation variable may depend on the the latter environment. The environment for the directly executed bash command can be listed with the command env.

Alternatively, you can carry out a re-installation via the install.htm page by pressing the install button after having copied the currently defined install variables (possibly modified) into the entry field for these values. If this is the first installation for the current date (today) a new sub-directory for installation is created - unless you have already created such a directory. Unless the sub-directory already contains files install.tgz and install.sh, these are copied in from www.quizcomposer.dk. If you wish to perform the install process with your own version of the install.sh script under the original environment create the sub-directory with that script in it. (The file install.var is ALWAYS read from the entry field for install variables in the install.htm page even if a file with that name already exists in the sub-directory).

It is IMPORTANT TO NOTICE, that the first non-empty password you type in the first entry field of the installation form (install.htm) will be crypted and the crypt value inserted into the install.py program. On subsequent re-installations you must state the same password. If you forget the password you must remove the crypted password (between quotes) in install.py prior to a new installation.

You can find more information about the install process in the install.py file.


Configuration variables:

Password:

List environment variables for server:

List above install configuration with variables evaluated:

Install QuizComposer system according to above configuration:

List error log file (install.err) for last installation

List log file (install.log) for last installation

Show list of files and directories in install directory:

Delete directories under install directory:
Date (= name) of first directory to delete:
Date of last directory to remove: