Technical Solution
[SOLVED] How to Install ODK Aggregate in Ubuntu Server?
Open Data Kit (ODK) is an open-source suite of tools that helps to Build survey form, Collect data on a mobile device and send it to a server and Aggregate the collected data on a server and extract it in useful formats. ODK Aggregate can be deployed on Google's App Engine, by creating google account. ODK Aggregate can also be deployed locally on a Tomcat server backed with a MySQL or PostgreSQL database server.
Steps to setup ODK Aggregate in our server,
- Install Java
$ sudo apt-get install java7-jdk
java -version
- Then open ~/.bashrc with your editor and add:
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
at the bottom of that file. - Install tomcat7
sudo apt-get install tomcat7
- Edit context.xml (under Tomcat 7's conf directory - /var/lib/tomcat7/conf) to have the attribute 'useHttpOnly' set to false.
- Download the correct version of ODK Aggregator and then install it.
sudo wget https://s3.amazonaws.com/opendatakit.downloads/ODK\ Aggregate\ v1.4.7\ linux-x64-installer.run (For 64 bit) $ sudo chmod +x ODK\ Aggregate\ v1.4.7\ linux-x64-installer.run $ ./ODK\ Aggregate\ v1.4.7\ linux-x64-installer.run
- Download and Install Latest MySQL Connector (http://dev.mysql.com/downloads/connector/j/5.1.html)
$ sudo wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.36.tar.gz $ sudo tar -xzf mysql-connector-java-5.1.36.tar.gz $ sudo cp mysql-connector-java-5.1.36/mysql-connector-java-5.1.36-bin.jar /usr/share/tomcat7/lib/
- The installer will produce a WAR file (web archive) containing the configured ODK Aggregate server, a create_db_and_user.sql script for creating the database and user and a Readme.html file with instructions on how to complete the installation.
- Set up database (run script)
- Place war file on web server
$ cd ~/ODK Aggregate $ sudo cp ODK\ Aggregate/ODKAggregate.war /var/lib/tomcat7/webapps/
- Restart Apache
sudo service tomcat7 restart
- Visit http://domain_name:8080/ODKAggregate/
NOTE: It may take a few moments for the Apache Tomcat server to detect the ODKAggregate.war. if you get a 404 error, wait a few moments then refresh your browser. If you want ODKAggregate to be reached at justhttp://domain_name:8080/
, you can rename it to ROOT.war before copying it to the /webapps directory.