« SAS Log Options | Main | Getting started with ODK - Build a Survey »

June 26, 2013

Getting started with ODK - Install Aggregate on Ubuntu 12

1. Install Ubuntu 12.04 (LTS) on a Virtual Machine
2. Install Java
$ sudo apt-get install sun-java6-jdk

3. Install Tomcat Webserver
$ sudo apt-get install tomcat6
Decent config instructions
Visit http://localhost:8080/

- Set some global variables (unsure of how important this step is!
$ sudo nano ~/.bashrc

Add this to bottom

export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
export CATALINA_HOME=/usr/share/tomcat6
export CATALINA_OUT=/var/log/tomcat6/catalina.out
export CATALINA_BASE=/var/lib/tomcat6/webapps

4. (Optional) Install XFCE to speed up VM
$ sudo apt-get install xfce4 xfce4-goodies
- add terminal shortcut:
Settings>>Keyboard Settings and add the following four shortcuts
Code: xfce4-terminal Ctrl+alt+x
- add workspace application shortcut
Go to Xfce4 parameters > window manager settings > Keyboard tab

5. Install MySQL Server
$ sudo apt-get install mysql-server

6. Run ODK Aggregator configuration script
Download the correct version (linux 32 bit in this case).
$ cd ~/Downloads
$ chmod +x ODK\ Aggregate\ v1.3.1\ linux-installer.run
$ ./ODK\ Aggregate\ v1.3.1\ linux-installer.run

- Set Parent Directory to ~/
- Platform: MySQL
- No SSL (for now)
- HTTP Port: 8080
- IP Address or DNS: localhost

- Download MySQL Connector (http://dev.mysql.com/downloads/connector/j/5.1.html
$ cd ~/Downloads
$ sudo tar -xzf mysql-connector-java-5.1.25.tar.gz
$ sudo cp mysql-connector-java-5.1.25/mysql-connector-java-5.1.25-bin.jar /usr/share/tomcat6/lib/

- Database Port: 3306
- Database Host:

7. Set up database (run script)
$ mysql --user root --password
mysql> source /home/mobile1/ODK Aggregate/create_db_and_user.sql
mysql> exit

8. Place war file on web server

$ cd ~/ODK Aggregate
$ sudo cp ODK\ Aggregate/ODKAggregate.war /var/lib/tomcat6/webapps/
- the war file should automagically unpack and create an ODKAggregate directory. If this does not happen, something is messed up with your Java install or something ;)

9. Visit http://localhost:8080/ODKAggregate
- Loging with Google identity
- ???
- Profit!

10. Now what to do?


Install the emulator

User tutorial

Install Aggregate

Install Collect

Install Tomcat

Potentially useful blurb:

You can't just copy the aggregate folder, as it has embedded within it the fully-qualified hostname and ports used to communicate with the server on which it is deployed. Either run the installer to generate an appropriate war file for the new hostname, ports and database, or, to do it manually, the relevant file to change is .../WEB-INF/lib/odk-settings.jar (this is what is created during the install process). The relevant files to change within that jar are (1) jdbc.properties -- to alter what database is being used and (2) server.properties -- to alter what hostname, port, etc. is used when interacting with the server.

Posted by kkwaiser at June 26, 2013 10:57 AM


Login to leave a comment. Create a new account.