MINI-HOWTO: Installation of CDS-INDICO Conference Management System in Debian/Ubuntu Author: Chema Casanova Crespo Date: Monday, february 19 2007 Version: 0.1 Disclaimer: The following document is offered in good faith as comprising only safe programming and procedures. No responsibility is accepted by the author for any loss or damage caused in any way to any person or equipment, as a direct or indirect consequence of following these instructions. CHANGELOG: v. 0.1. Initial Release Mon, feb 19 2007 ------------------------------------------------------------------------------------ Introduction. The following installation has been completed based in the indications describes in the INSTALL file of the distribution of INDICO 0.92.1, the installation described here is adapted for debian-etch and ubuntu-edgy. Installing CDS-INDICO. You can download CDS-INDICO from the CERN site: http://cern.ch/indico i've downloaded the version 0.92.1 #wget -c http://cdsware.cern.ch/indico/download/cds-indico-0.92.1.tar.gz To complete de dependencies for installing indico, i installed using apt. #apt-get install libapache2-mod-python python-imaging python-reportlab python-zodb python-xml python-libxslt1 apache2 python2.4 Now you can unzip the tarball: #tar zxvf cds-indico-0.92.1.tar.gz Before compiling indico, you should modify the configuration file config.xml in order to addapt it to your needs, don't forget set your url, email, smtpConfig and paths for installation. --------------------------------------- Indico-0.92.1/config.xml ----------------- htdocs /var/www/MaKaC www-data www-data http://yourvirtualhost.com/MaKaC info@yourorganization.org no yoursmtpserver ---------------------------------------------------------------------- After setting the configuration, you can run, i've done it as root user, but if you modify the installation you can use other user, it will install the data on your system, some of it in /soft/MaKaC/ , this part of the installation should be improved, but it works. #setup.py install Then you have installed INDICO, now it's the moment to configure the apache2 server. I included the following information at my apache2 intallation, between the virtual host tags, saying where i want to publish the Indico Installation, in this configuration it is available at http://yourvirtualhost/MaKaC --------------------------- /etc/apache2/site-available/ -------------- Alias /MaKaC/ "/var/www/MaKaC/" AddHandler mod_python .py DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.py PythonHandler mod_python.publisher PythonDebug On ----------------------------------------------------------------------- Now you should restart apache2 #/etc/init.d/apache2 restart The following steps configure the zeoserver (zope database) as a deamon, because this is the database where indico stores its information. zodb is not configured by default as a daemon in debian/ubuntu. We should create de configuration files for the database, i created the directory /etc/zodb/ where i stored the following files. zodb.config: configuration of the zeoserver zeoctl.conf: configuration of the daemon start/stop for the zeoserver -------------------------------------- /etc/zodb/zodb.config address localhost:9675 monitor-address localhost:8091 path /var/local/zodb/Data.fs path /var/log/zodb.log format %(asctime)s %(message)s -------------------------------------- /etc/zodb/zeoctl.conf program python2.4 /usr/lib/python2.4/site-packages/ZEO/runzeo.py -C /etc/zodb/zodb.config daemon true directory /var/local/zodb socket-name /var/local/zodb/zdsock --------------------------------------------------------------------------- After the creation of the configuration, we should create the directories where data is going to be saved, for this sample i have used mkdir -p /var/local/zodb When the configuration is ready the zeoserver should be configured to run in daemon mode, i created the following file and placed it ad /etc/init.d/ ----------------------------------------- /etc/init.d/zodb-indico --------- #! /bin/sh ### BEGIN INIT INFO # Provides: skeleton # Required-Start: $local_fs $remote_fs # Required-Stop: $local_fs $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Example initscript # Description: This file should be used to construct scripts to be # placed in /etc/init.d. ### END INIT INFO # Author: Chema Casanova Crespo # # Do NOT "set -e" # PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="ZoDB Database for INDICO" NAME=zodb-indico DAEMON=/usr/lib/python2.4/site-packages/zdaemon/zdctl.py DAEMON_ARGS="-C /etc/zodb/zeoctl.conf" PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 # Read configuration variable file if it is present [ -r /etc/default/$NAME ] && . /etc/default/$NAME # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions # # Function that starts the daemon/service # do_start() { # Return # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started $DAEMON $DAEMON_ARGS start # Add code here, if necessary, that waits for the process to be ready # to handle requests from services started subsequently which depend # on this one. As a last resort, sleep for some time. } # # Function that stops the daemon/service # do_stop() { # Return # 0 if daemon has been stopped # 1 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred $DAEMON $DAEMON_ARGS stop } # # Function that sends a SIGHUP to the daemon/service # do_reload() { # # If the daemon can reload its configuration without # restarting (for example, when it is sent a SIGHUP), # then implement that here. # $DAEMON $DAEMON_ARGS reload return 0 } case "$1" in start) [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" do_start case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; stop) [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" do_stop case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; #reload|force-reload) # # If do_reload() is not implemented then leave this commented out # and leave 'force-reload' as an alias for 'restart'. # #log_daemon_msg "Reloading $DESC" "$NAME" #do_reload #log_end_msg $? #;; restart|force-reload) # # If the "reload" option is implemented then remove the # 'force-reload' alias # log_daemon_msg "Restarting $DESC" "$NAME" do_stop case "$?" in 0|1) do_start case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; # Old process is still running *) log_end_msg 1 ;; # Failed to start esac ;; *) # Failed to stop log_end_msg 1 ;; esac ;; *) #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 exit 3 ;; esac : --------------------------------------------------------------------------- After that i executed the following command to prepare the init.d script to run during the booting of the system. #update-rc.d zodb-indico defaults Now is the moment to try the installatio of ZoDB with /etc/init.d/zodb-indico start Now you can try at http://www.yourvirtualhost.com/MaKaC/ If