June 28, 2013
Getting started with ODK - Install Android Emulator
Following this tutorial
Make sure you have all the Java requirements:
$ sudo apt-get install openjdk-6-jre openjdk-6-jdk icedtea6-plugin
Download the SDK tools (not the ADT bundle)
Unpack the tar ball
$ cd ~/
$ sudo tar -xzf Downloads/android-sdk_r22.0.1-linux.tgz
Fix permissions (?)
$ sudo chown -R mobile1:mobile1 android-sdk-linux/
$ cd android-sdk-linux/tools
Error: Missing platform-tools (uhoh?)
Install updates whenever prompted
$ cd ~/
$ sudo nano .bashrc
Add this to bottom:
$ source ~/.bashrc
Open the emulator
$ android avd
And create a new phone. Promptly get errors
Starting emulator for AVD 'mobile1' Failed to load libGL.so error libGL.so: cannot open shared object file: No such file or directory Failed to load libGL.so error libGL.so: cannot open shared object file: No such file or directory
$ sudo apt-get install libgl1-mesa-dev
Getting started with ODK - Build a Survey
Once ODK Aggregate is set up, the next step is to build a survey form.
The simplest way to build a test form is to use Build which is a offers a GUI platform via a website that builds the xml spec for you. For more complicated forms the suggestion is to use XLSForm which allows you to specify the form via an Excel form and then convert that to the required XML.
Copy and paste the instructions:
Using the Application
1. Please read all the instructions and notes before beginning.
2. Go to http://build.opendatakit.org and sign in.
3. Add a new prompt, by dragging the elements from the bottom of the screen onto the blank canvas.
4. For each prompt, modify its properties on the right portion of the screen.
5. Prompts can also be rearranged through drag and drop.
6. When the form is finished, go to the File menu, Save and then Export to XML.
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
- Set some global variables (unsure of how important this step is!
$ sudo nano ~/.bashrc
Add this to bottom
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: 127.0.0.1
7. Set up database (run script)
$ mysql --user root --password
mysql> source /home/mobile1/ODK Aggregate/create_db_and_user.sql
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
10. Now what to do?
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.