-
Install Java (instructions for following three steps from here):
sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer
-
Install Scala:
wget http://scala-lang.org/files/archive/scala-2.10.2-RC2.tgz tar -xzf scala-2.10.2-RC2.tgz sudo mv scala-2.10.2-RC2 /usr/share/scala
-
Edit
~/.profile
to add the following environment variables:export SCALA_HOME=/usr/share/scala export PATH=$PATH:$SCALA_HOME/bin
-
Install Neo4J (instructions from here):
# start root shell sudo -s # Import our signing key wget -O - http://debian.neo4j.org/neotechnology.gpg.key | apt-key add - # Create an Apt sources.list file echo 'deb http://debian.neo4j.org/repo stable/' > /etc/apt/sources.list.d/neo4j.list # Find out about the files in our repository apt-get update # Install Neo4j, community edition apt-get install neo4j # start neo4j server, available at http://localhost:7474 of the target machine neo4j start
-
Install MongoDB (instructions from here):
# The Ubuntu package management tool (i.e. dpkg and apt) ensure package consistency and authenticity by requiring that distributors sign packages with GPG keys. Issue the following command to import the MongoDB public GPG Key: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 # Create a /etc/apt/sources.list.d/mongodb.list file using the following command. echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list # Now issue the following command to reload your repository: sudo apt-get update # Issue the following command to install the latest stable version of MongoDB: sudo apt-get install mongodb-10gen # When this command completes, you have successfully installed MongoDB!
-
Log out and log back in again for environment variable changes to take effect.
-
Install Play (Scala web framework) (instructions from here):
wget http://downloads.typesafe.com/play/2.1.0/play-2.1.0.zip unzip play-2.1.0 sudo mv play-2.1.0 /opt sudo ln -s /opt/play-2.1.0 /opt/play sudo ln -s /opt/play/play /usr/local/bin/play # uncomment the following line to confirm everything installed ok # play
-
There's a weird dependency issue with play-iteratees_2.10-RC2.
-
Run the platform (will install dependencies on first run):
cd src/platform sudo ./start-app.sh
-
Navigate to
http://localhost:9000
to see the API.
-
Change to the scripts folder:
cd scripts
-
Generate an encrypted password, which will be printed to your console:
./bcrypt <password>
-
Take the output of that prompt, which will begin with a $, and create a user (replace
<username>
and<encryptedpassword>
below)mongo use dfid db.users.insert({'username': '<username>', 'password': '<encryptedpassword>', 'retryCount': 0})
The front-end runs on middleman
, which is a Ruby gem.
-
Ensure you've got ruby installed. You can run:
ruby -v
If you get a response, Ruby is installed. If not, run:
sudo apt-get install ruby rubygems
-
Change to the site directory:
cd src/platform/site
-
Install dependencies:
sudo bundle install
-
Run the server:
sudo bundle exec middleman server
-
Navigate to:
http://0.0.0.0:4567/
-
You'll probably get an error, because there's no data loaded. To do that, run:
http://0.0.0.0:9000/admin
-
Log in with the username and password you created above.