Skip to content

Installing Project Dependencies

carabalb edited this page Sep 14, 2018 · 15 revisions

Start with a fresh Ubuntu 12.04.02 LTS instance, such as an Amazon EC2 instance. OneBusAway works with other environments as well, but Ubuntu is friendliest to the beginner.

  • install the following packages
    $ sudo apt-get install openjdk-6-jdk git tomcat6 mysql-server libtool libtool-bin autoconf automake uuid-dev g++ make pkg-config
  • Let tomcat use more memory to load larger bundles
    $ vim /etc/default/tomcat6
    > JAVA_OPTS="-Djava.awt.headless=true -Xmx1g -XX:MaxPermSize=512m -XX:+UseConcMarkSweepGC"
    $ sudo /etc/init.d/tomcat6 restart
  • install maven3 from source (ubuntu still favours maven2)
    $ mkdir ~/src
    $ cd ~/src
    $ wget http://apache.cs.utah.edu/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
    $ cd /usr/share && sudo tar zxvf ~/src/apache-maven-3.0.5-bin.tar.gz
    $ sudo mv apache-maven-3.0.5/ maven3
    $ sudo cp maven3/bin/mvn /usr/bin/mvn
    $ echo "M2_HOME=/usr/share/maven3" >/tmp/mavenrc && sudo cp /tmp/mavenrc /etc/mavenrc
  • install zeromq (queue-based messaging)
    $ cd ~/src
    $ wget http://download.zeromq.org/zeromq-2.2.0.tar.gz
    $ tar zxf zeromq-2.2.0.tar.gz
    $ cd zeromq-2.2.0
    $ sudo ln -s /usr/lib/jvm/java-6-openjdk-amd64 /usr/lib/jvm/default-java  # this depends on your java install
    $ export JAVA_HOME=/usr/lib/jvm/default-java
    $ ./autogen.sh
    $ ./configure --prefix=/usr
    $ make && sudo make install
  • install jzmq (java bindings for zeromq)
    $ cd ~/src
    $ git clone https://github.com/zeromq/jzmq.git
    $ cd jzmq
    $ git checkout d8d8b03a7f86f7738a5cddfa6e501dfa2ecf50ed  #known stable version
    $ ./autogen.sh
    $ ./configure --prefix=/usr
    $ make && sudo make install
  • create two databases
    $ mysql -u root -p
    mysql> create database onebusaway_nyc;
    mysql> create database onebusaway_nyc_archive;
    mysql> \q
  • download the onebusaway src
    $ cd ~/src
    $ git clone https://github.com/camsys/onebusaway-nyc.git
  • Install a recent version of Eclipse (at least Juno 3.8) that supports Maven overlays. The Springsource version 3.1.0 comes with goodies that work well with OneBusAway, but standard Eclipse (again Juno 3.8) should work. Strictly speaking Eclipse is not required; all building occurs via Maven, so substitute your favourite editor here if you are an advanced user.
    $ cd ~/src
    $ // for 32 bit
    $ wget http://download.springsource.com/release/STS/3.1.0/dist/e3.8/spring-tool-suite-3.1.0.RELEASE-e3.8-linux-gtk.tar.gz
    $ tar zxf spring-tool-suite-3.1.0.RELEASE-e3.8-linux-gtk.tar.gz
    $ // for 64 bit
    $ wget http://download.springsource.com/release/STS/3.1.0/dist/e3.8/spring-tool-suite-3.1.0.RELEASE-e3.8-linux-gtk-x86_64.tar.gz
    $ tar zxf spring-tool-suite-3.1.0.RELEASE-e3.8-linux-gtk-x86_64.tar.gz
    $ cd springsource/sts-3.1.0.RELEASE/
    $ ./STS
  • create a fresh workspace
   Workspace /home/ubuntu/Documents/workspace-onebusaway-nyc
  • Click Open Dashboard
  • In the Package Explorer, right click, Import -> Maven -> Existing Maven Projects
    Root Directory: ~/src/onebusaway-nyc
  • Click Finish
  • In the Package Explorer, right click on onebusaway-nyc, Team -> Share Project -> Git, Next
  • Check Use or create repository in parent folder of project
  • Click Finish
Clone this wiki locally