yum install -y \
bzip2 \
git \
java-1.8.0-openjdk \
java-1.8.0-openjdk-devel \
python-setuptools python-dev python-numpy \
install mysql-connector-python \
easy_install predictionio \
tar \
unzip \
&& \
yum clean all
You can discover Java JDK for JAVA_HOME
with which javac
and do ls -l to follow the symlinks
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-3.b13.el7_2.x86_64
PIO_HOME=/opt/predictionio
PATH=$PATH:$PIO_HOME/bin
cd /opt
git clone https://github.com/apache/incubator-predictionio.git predictionio
cd predictionio
NOTE: During the transition to the Apache ASF predictionion the URLs in the
pio
documentation might be unreliable, you can use action-ml fork in the meantime:
git clone https://github.com/actionml/PredictionIO.git predictionio
Make sure you are on the master branch or use the tag for the desired release version.
mkdir -p vendors
cd vendors
curl https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.4.tar.gz | tar xvz && mv elasticsearch-1.4.4 elasticsearch
curl http://d3kbcqa49mib13.cloudfront.net/spark-1.5.1-bin-hadoop2.6.tgz | tar xvz && mv spark-1.5.1 spark
curl http://archive.apache.org/dist/hbase/1.1.2/hbase-1.1.2-bin.tar.gz | tar xvz && mv hbase-1.1.2 hbase
Go to cd $PIO_HOME && vim conf/pio_env.sh
and add
#!/usr/bin/env bash
# SPARK_HOME: Apache Spark is a hard dependency and must be configured.
SPARK_HOME=$PIO_HOME/vendors/spark
# Filesystem paths where PredictionIO uses as block storage.
PIO_FS_BASEDIR=$HOME/.pio_store
PIO_FS_ENGINESDIR=$PIO_FS_BASEDIR/engines
PIO_FS_TMPDIR=$PIO_FS_BASEDIR/tmp
# PredictionIO Storage Configuration
# Storage Repositories
PIO_STORAGE_REPOSITORIES_METADATA_NAME=pio_meta
PIO_STORAGE_REPOSITORIES_METADATA_SOURCE=ELASTICSEARCH
PIO_STORAGE_REPOSITORIES_EVENTDATA_NAME=pio_event
PIO_STORAGE_REPOSITORIES_EVENTDATA_SOURCE=HBASE
PIO_STORAGE_REPOSITORIES_MODELDATA_NAME=pio_model
PIO_STORAGE_REPOSITORIES_MODELDATA_SOURCE=LOCALFS
# Elasticsearch Example
PIO_STORAGE_SOURCES_ELASTICSEARCH_TYPE=elasticsearch
#PIO_STORAGE_SOURCES_ELASTICSEARCH_HOSTS=localhost
#PIO_STORAGE_SOURCES_ELASTICSEARCH_PORTS=9300
PIO_STORAGE_SOURCES_ELASTICSEARCH_HOME=$PIO_HOME/vendors/elasticsearch
# Local File System Example
PIO_STORAGE_SOURCES_LOCALFS_TYPE=localfs
PIO_STORAGE_SOURCES_LOCALFS_PATH=$PIO_FS_BASEDIR/models
# HBase Example
PIO_STORAGE_SOURCES_HBASE_TYPE=hbase
PIO_STORAGE_SOURCES_HBASE_HOME=$PIO_HOME/vendors/hbase
Refer to infrastructure
repo to retrieve the templates name.service to place them in /usr/lib/systemd/system/
for:
elasticsearch.service
hbase.service
pioeventserver.service
pio.service
Use systemctl start service
, and check status with journalctl -xe
.
# Event server
curl -XGET PIO_ADDRESS:7070
# PIO Engine server
curl -XGET PIO_ADDRESS:8000
where will I find the infrastructure repo?
please help me with that