Go to home dir /home/ec2-user/
sudo yum install java-1.8.0-openjdk
sudo yum install java-1.8.0-openjdk-devel
sudo /usr/sbin/alternatives --config java
wget http://ftp.piotrkosoft.net/pub/mirrors/ftp.apache.org/incubator/predictionio/0.10.0-incubating/apache-predictionio-0.10.0-incubating.tar.gz
tar zxvf apache-predictionio-0.10.0-incubating.tar.gz
cd apache-predictionio-0.10.0-incubating
./make-distribution.sh
tar zxvf PredictionIO-0.10.0-incubating.tar.gz
mkdir PredictionIO-0.10.0-incubating/vendors
wget http://d3kbcqa49mib13.cloudfront.net/spark-1.5.1-bin-hadoop2.6.tgz
tar zxvfC spark-1.5.1-bin-hadoop2.6.tgz PredictionIO-0.10.0-incubating/vendors
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.4.tar.gz
tar zxvfC elasticsearch-1.4.4.tar.gz PredictionIO-0.10.0-incubating/vendors
edit configuration
vi PredictionIO-0.10.0-incubating/vendors/elasticsearch-1.4.4/config/elasticsearch.yml
set network.host: 127.0.0.1
wget http://archive.apache.org/dist/hbase/hbase-1.0.0/hbase-1.0.0-bin.tar.gz
tar zxvfC hbase-1.0.0-bin.tar.gz PredictionIO-0.10.0-incubating/vendors
mkdir PredictionIO-0.10.0-incubating/vendors/vendors/hbase-1.0.0/data
and configure by editing PredictionIO-0.10.0-incubating/vendors/hbase-1.0.0/conf/hbase-site.xml
. Check other file in this gist.
Export or add to .bashrc
export JAVA_OPTS="-Xmx4g"
export PIO_HOME=/home/ec2-user/apache-predictionio-0.10.0-incubating/PredictionIO-0.10.0-incubating
export PATH=$PATH:/home/ec2-user/apache-predictionio-0.10.0-incubating/PredictionIO-0.10.0-incubating/bin
Edit PredictionIO-0.10.0-incubating/conf/pio-env.sh
. Check other file in this gist.
PredictionIO-0.10.0-incubating/bin/pio-start-all
PredictionIO-0.10.0-incubating/bin/pio status
you should get
[INFO] [Console$] Inspecting PredictionIO...
[INFO] [Console$] PredictionIO 0.10.0-incubating is installed at /home/ec2-user/apache-predictionio-0.10.0-incubating/PredictionIO-0.10.0-incubating
[INFO] [Console$] Inspecting Apache Spark...
[INFO] [Console$] Apache Spark is installed at /home/ec2-user/apache-predictionio-0.10.0-incubating/PredictionIO-0.10.0-incubating/vendors/spark-1.5.1-bin-hadoop2.6
[INFO] [Console$] Apache Spark 1.5.1 detected (meets minimum requirement of 1.3.0)
[INFO] [Console$] Inspecting storage backend connections...
[INFO] [Storage$] Verifying Meta Data Backend (Source: ELASTICSEARCH)...
[INFO] [Storage$] Verifying Model Data Backend (Source: LOCALFS)...
[INFO] [Storage$] Verifying Event Data Backend (Source: HBASE)...
[INFO] [Storage$] Test writing to Event Store (App Id 0)...
[INFO] [HBLEvents] The namespace pio_event doesn't exist yet. Creating now...
[INFO] [HBLEvents] The table pio_event:events_0 doesn't exist yet. Creating now...
[INFO] [HBLEvents] Removing table pio_event:events_0...
[INFO] [Console$] (sleeping 5 seconds for all messages to show up...)
[INFO] [Console$] Your system is all ready to go.
Visit http://<YOUR_MACHINE>:7070
you should get
{"status":"alive"}