Installing the latest nightly build of UniTime 3.3 on a Debian 6.0 (Squeeze) box (using Oracle 10g XE database).

1) Install Java

apt-get install sun-java6-jdk

2) Install Tomcat

apt-get install tomcat6 tomcat6-admin

Stop tomcat

/etc/init.d/tomcat6 stop

Edit /var/lib/tomcat6/conf/tomcat-users.xml

<?xml version='1.0' encoding='utf-8'?>

<tomcat-users>

  <role rolename="admin"/>

  <role rolename="tomcat"/>

  <role rolename="manager"/>

  <user username="tomcat" password="######"

        roles="tomcat,admin,manager"/>

</tomcat-users>

Edit /etc/default/tomcat6, set the following properties

JAVA_HOME=/usr/lib/jvm/java-6-sun

JAVA_OPTS=”-Djava.awt.headless=true -Xmx1028m -XX:+UseConcMarkSweepGC”

Start tomcat

/etc/init.d/tomcat6 start

Now, the tomcat should be running at http://localhost:8080

3) Install Oracle Database

apt-get install libc6

wget -c \
  http://oss.oracle.com/debian/dists/unstable/main/binary-i386/libaio_0.3.104-1_i386.deb \

  http://oss.oracle.com/debian/dists/unstable/non-free/binary-i386/oracle-xe-universal_10.2.0.1-1.1_i386.deb 

dpkg -i --force-architecture libaio_0.3.104-1_i386.deb

dpkg -i --force-architecture oracle-xe-universal_10.2.0.1-1.1_i386.deb

/etc/init.d/oracle-xe configure

Add the following lines to your ~/.bashrc

export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server

export ORACLE_SID=XE

export PATH=$PATH:$ORACLE_HOME/bin

Install Oracle JDBC driver

cp /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/jdbc/lib/ojdbc14.jar \

  /usr/share/tomcat6/lib

4) Install UniTime

Stop tomcat

/etc/init.d/tomcat6 stop

Create timetable database

wget -c \

http://unitime.cvs.sourceforge.net/viewvc/unitime/UniTime/Documentation/Database/Oracle/woebegon.dat?pathrev=dev_curriculum -O woebegon.dat

sqlplus system@xe

create user timetable identified by ######;

grant dba to timetable;

exit

imp timetable/###### file=woebegon.dat full=y

Edit /etc/tomcat6/catalina.properties, add the following lines

# UniTime custom properties

tmtbl.custom.properties=/etc/tomcat6/unitime.properties

Edit /etc/tomcat6/unitime.properties

# Database connection settings

connection.url=jdbc:oracle:thin:@127.0.0.1:1521:xe

connection.driver_class=oracle.jdbc.driver.OracleDriver

dialect=org.hibernate.dialect.Oracle10gDialect

tmtbl.uniqueid.generator=org.hibernate.id.SequenceGenerator

connection.username=timetable

connection.password=######

default_schema=timetable

Get UniTime.war

wget -U "Mozilla/5.0 (compatible; Konqueror/3.2; Linux)" \

        http://www.unitime.org/builds/UniTime3.3/UniTime.war \

        -O /var/lib/tomcat6/webapps/UniTime.war

Edit /etc/tomcat6/policy.d/04webapps.policy, add the following lines

grant codeBase "file:/var/lib/tomcat6/webapps/UniTime/-" {

        permission java.security.AllPermission;

};

Create data folder

mkdir /var/lib/tomcat6/data

chown tomat6 /var/lib/tomcat6/data

Start tomcat

/etc/init.d/tomcat6 start

Now, the UniTime should be running at http://localhost:8080/UniTime