Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Prediction IO Install Notes on Ubuntu Precise (12.04)

Ubuntu 12.04 PredictionIO Install Notes

Website:
http://prediction.io

Install Guide:
http://docs.prediction.io/installation/install-predictionio-on-linux.html

Installation

1. Preparation

Enable super hacker mode

sudo su

Download some utils

apt-get install -y wget curl unzip

2. Install Oracle Java JDK 7

Reference:
http://webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html

add-apt-repository ppa:webupd8team/java
apt-get update

Automatically accept the oracle license. Otherwise the install requires user intervention.

echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections

Then install java!

apt-get install -y oracle-java7-installer

Assert that java 7 is indeed installed

java -version

After that, we setup the environment variables

apt-get install -y oracle-java7-set-default

3. Installing PredictionIO

The NameNode and DataNode problem isn't a problem for us, because I think it would only happen if /tmp was full. In our case, we don't have a lot of data so for short term I think we can ignore this. One thing to note is that the right location for the file is conf/hadoop/hdfs-site.xml.

a) Preparations

Let's create a predictionIO user:

PREDICTIONIO_USER=predictionIO

useradd $PREDICTIONIO_USER -m -s /bin/bash

Then let's create our install directory, and move to it:

INSTALL_DIR=/opt/predictionIO

mkdir -p $INSTALL_DIR && cd $_
chown -R $PREDICTIONIO_USER:$PREDICTIONIO_USER .

Now let's login as our new user:

su $PREDICTIONIO_USER

And let's create ssh keys for Hadoop:

ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

b) Download the binary release

PREDICTIONIO_BINARY_RELEASE=PredictionIO-0.4.2.zip

wget http://download.prediction.io/$PREDICTIONIO_BINARY_RELEASE
unzip $PREDICTIONIO_BINARY_RELEASE
cd $_

c) Setup Vendors

First you want to get the path to your java install dir. It's probably:

/usr/lib/jvm/java-7-oracle

Then we can just run the setup script:

./bin/setup-vendors.sh

That script will have to be hacked to support unnatended setup...

d) Setup PredictionIO

Pretty easy:

./bin/setup.sh

Starting it:

./bin/start-all.sh

Note that unlike what the docs say, mongodb doesn't need to be running before calling the start script.

The script will output the following error:

LF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

PredictionIO will still work, but I don't think it will log stuff. You could try to install the slf4j library, but that didn't fix it for me:

 apt-get install libslf4j-java

After the thing has started, you'll have to create a user:

./bin/user

Now you're all done! Just open up your browser to localhost:8000 to get to the admin page.

Ports

Subsystem Port
Hadoop 9001
Admin 9000
API 8000

Troubleshooting

I had some problems installing this thing. See my thread on the google group:
https://groups.google.com/forum/#!topic/predictionio-user/5GDDFAET5fw

@LucasLemanowicz

This comment has been minimized.

Copy link

commented Jul 22, 2013

Hey Nick, thanks for the instructions. I'm turning this into a chef script so we can easy provision Vagrant instances.

@surjikal

This comment has been minimized.

Copy link
Owner Author

commented Jul 22, 2013

:D awesome

@jrcconstela

This comment has been minimized.

Copy link

commented Sep 26, 2013

Also working with v0.6.1

@pokonski

This comment has been minimized.

Copy link

commented Nov 25, 2013

And with 0.6.4

@we4tech

This comment has been minimized.

Copy link

commented Jan 6, 2014

Thanks it worked with 0.7 :) :

@surjikal

This comment has been minimized.

Copy link
Owner Author

commented Jan 12, 2014

word

@travcunn

This comment has been minimized.

Copy link

commented Mar 27, 2014

There is a typo in the user management command. Creating users is done with:

./bin/users
@chrismark

This comment has been minimized.

Copy link

commented Sep 4, 2015

Will try this in 14.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.