CDS AGENDA SOFTWARE () INSTALLATION ==================================================== Revision: $Id: INSTALL,v 1.2.4.9 2003/03/28 10:40:32 tbaron Exp $ About ===== This document specifies how to build, customize, and install the CDS Agenda Software (). (See 'UNINSTALL' file if you look for information on how to uninstall the system!) Contents ======== 0. Prerequisites 1. Quick instructions for the impatient admin 2. Detailed instructions for the patient admin 3. Configuration philosophy explained and elucidated 0. Prerequisites ================ Here is the software you need to have around before you start installing : a) Apache server, compiled with PHP (with --with-imap and --with-ldap options if IMAP and LDAP are to be used) and MySQL support: b) PHP compiled as standalone command-line executable is required too: c) MySQL server (may be on a remote machine), and MySQL client (must be available locally too): d) JavaTM 2 Platform (Note that the configure script checks whether you have all the prerequisite software installed and that it won't let you to continue unless everything is in order. Also the PHP version should be newer than 4.1) 1. Quick instructions for the impatient admin ===================================================== $ mysql -h sqlserver.domain.com -u root -p mysql mysql> CREATE DATABASE cdsagenda; mysql> GRANT ALL PRIVILEGES ON cdsagenda.* TO cdsagenda@webserver.domain.com IDENTIFIED BY 'myp1ss'; $ sudo vi /path/to/apache/conf/httpd.conf ## see below in part 2 $ sudo vi /path/to/php/conf/php.ini ## see below in part 2 $ sudo /path/to/apache/bin/apachectl graceful $ cd /usr/local/src/ $ wget http://cdsware.cern.ch/cdsagenda/download/cdsagenda-4.2.tar.gz $ tar xvfz cdsagenda-4.2.tar.gz $ cd cdsagenda-4.2 $ ./configure --with-htdocsdir=/www/data/cdsagenda/ \ --with-cgibindir=/www/cgi-bin/cdsagenda/ \ --with-utildir=/usr/local/bin/ \ --with-phplibdir=/usr/local/lib/php \ --with-htdocsurl=http://webserver.domain.com/cdsagenda/ \ --with-cgibinurl=http://webserver.domain.com/cgi-bin/cdsagenda/ \ --with-dbhost=sqlserver.domain.com \ --with-dbname=cdsagenda \ --with-dbuser=cdsagenda \ --with-dbpass=myp1ss \ --with-dbhostport=3456 $ gmake install $ gmake create-tables ## optional $ vi /path/to/php/lib/dir/cdsagenda/config/config_runtime.inc ## Part of the runtime config variables are inside this script ## Edit it to adapt the tool to your local installation. ## In particular you should set the superuser_email variable inside ## this file to your email address to be considered as ## administrator by the system. $ netscape http://webserver.domain.com/cdsagenda/manager/ ## optional ## This will allow you to create your first categories in the ## hierarchical organization ## You will be able to access these pages ONLY IF you filled the ## superuser_email variable (see above), and logged in using this ## same email address. 2. Detailed instructions for the patient admin ====================================================== The CDS Agenda Software uses standard GNU autoconf method to build and install its files. This means that you proceed as follows: $ mysql -h sqlserver.domain.com -u root -p mysql mysql> CREATE DATABASE cdsagenda; mysql> GRANT ALL PRIVILEGES ON cdsagenda.* TO cdsagenda@webserver.domain.com IDENTIFIED BY 'myp1ss'; You need to create a dedicated database on your MySQL server that the CDS Agenda can use for its purposes. Please contact your MySQL administrator and ask him to execute the above commands that will create the "cdsagenda" database, a user called "cdsagenda" with password "myp1ss", and that will grant all rights on the "cdsagenda" database to the "cdsagenda" user. (Of course, you are free to choose your own user credentials and the database name; the above values were just an example. See also the configure line below.) $ sudo vi /path/to/apache/conf/httpd.conf Please ask your webserver administrator to put the following lines in your "httpd.conf" configuration file: AddType application/x-httpd-php .php .shtml AddType application/x-httpd-php-source .phps .shtmls DirectoryIndex index.shtml index.php index.html This is to ensure that "*.shtml" files will be interpreted by the web server as PHP files, and that "index.shtml" will be considered as directory index file. $ sudo vi /path/to/php/conf/php.ini Please ask your webserver administrator to put the following lines in your "php.ini" configuration file: file_uploads = On session.save_handler = user session.auto_start = 0 session.name = SESSIONID session.gc_probability = 0 session.gc_maxlifetime = 60000 session.cookie_lifetime = 0 log_errors = on display_errors = off expose_php = off max_execution_time = 160 register_globals = on short_open_tag = on allow_url_fopen=off This is to tell PHP that we will be using our own session handler and our own garbage collector. Also, it sets up some other relevant PHP variables. $ sudo /path/to/apache/bin/apachectl graceful Please ask your webserver admin to restart the Apache server after the above "httpd.conf" and "php.ini" changes. $ cd /usr/local/src/ Change to a directory where we will configure and build the CDS Agenda Software. (The built files will be installed later on into Apache htdocs and cgi-bin trees.) $ wget http://cdsware.cern.ch/cdsagenda/download/cdsagenda-4.2.tar.gz Fetch package from the distribution server. $ tar xvfz cdsagenda-4.2.tar.gz Untar the distriburion tarball. $ cd cdsagenda-4.2 Go to the source directory. $ ./configure --with-htdocsdir=/www/data/cdsagenda/ \ --with-cgibindir=/www/cgi-bin/cdsagenda/ \ --with-utildir=/usr/local/bin/cdsagenda/ \ --with-phplibdir=/usr/local/lib/php \ --with-htdocsurl=http://webserver.domain.com/cdsagenda/ \ --with-cgibinurl=http://webserver.domain.com/cgi-bin/cdsagenda/ \ --with-dbhost=sqlserver.domain.com \ --with-dbname=cdsagenda \ --with-dbuser=cdsagenda \ --with-dbpass=myp1ss \ --with-dbhostport=3456 Configure essential parameters, as the installation directories for HTDOCS files, CGI scripts and DB utilities, the URL of the homepage and CGI scripts, and database host, database name, and database user credentials. The first two directories must be within the Apache's htdocs and cgi-bin paths. The DB utilities may be installed anywhere on the system. Note that CDS Agenda won't install in any other directories but the three mentioned in the above configure line. If the --with-dbhostport is not used, the default value (3306) will be applied. This configuration step is mandatory. $ gmake install Install the web pages, cgi scripts and database utilities in the respective directories, as specified earlier by the configure command. After this step, you should be able to point your browser to the chosen URL of your local installation and see it running! $ gmake create-tables ## optional Optionally, create tables on the MySQL server. You probably want to do this step only once, i.e. only if you have not created any databases yet. $ vi /www/data/cdsagenda/config/config_runtime.inc Optionally, customize your installation. Unlike the installation directories and other essential parameters that were defined in the previous step, the "config_runtime.inc" file enables you to change the way the software will behave. In particular you should set the admin_email and superuser_email variables inside this file to your email address to be considered as administrator by the system. This configuration step is optional, but strongly recommended. $ netscape http://webserver.domain.com/cdsagenda/manager ## optional Optionally, do further runtime configuration of the CDS Agenda, like definition of the hierarchy tree, etc. You will be able to access these pages ONLY IF you filled the superuser_email variable (see above), and logged in using this same email address. Good luck, and thanks for choosing the CDS Agenda Software. - CDS Agenda Development Group