| --- |
| title: Installing PredictionIO on Linux / Mac OS X |
| --- |
| |
| ## Quick Install |
| |
| NOTE: <span class="new">**Note:**</span> PredictionIO can now be installed with a single command:<br /> |
| `$ bash -c "$(curl -s https://install.prediction.io/install.sh)"` |
| |
| The above script will complete the rest of the instructions on this page for you |
| so you can skip them. |
| |
| |
| ## Manual Install |
| |
| If you do not want to use the install script above, you can follow the steps |
| below to setup PredictionIO and its dependencies. In these instructions we will |
| assume you are in your home directory. Wherever you see `/home/abc`, replace it |
| with your own home directory. |
| |
| |
| ### Java |
| |
| Ensure you have an appropriate Java version installed. For example: |
| |
| ``` |
| $ java -version |
| java version "1.8.0_40" |
| Java(TM) SE Runtime Environment (build 1.8.0_40-b25) |
| Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode) |
| ``` |
| |
| |
| ### Download PredictionIO |
| |
| Download PredictionIO and extract it. |
| |
| ``` |
| $ cd |
| $ pwd |
| /home/abc |
| $ wget https://d8k1yxp8elc6b.cloudfront.net/PredictionIO-<%= data.versions.pio %>.tar.gz |
| $ tar zxvf PredictionIO-<%= data.versions.pio %>.tar.gz |
| ``` |
| |
| |
| ### Installing Dependencies |
| |
| Let us install dependencies inside a subdirectory of the PredictionIO |
| installation. By following this convention, you can use PredictionIO's default |
| configuration as is. |
| |
| ``` |
| $ mkdir PredictionIO-<%= data.versions.pio %>/vendors |
| ``` |
| |
| |
| #### Spark Setup |
| |
| <%= partial 'shared/install/spark' %> |
| |
| |
| #### Elasticsearch Setup |
| |
| WARNING: You may skip this section if you are using PostgreSQL or MySQL. |
| |
| <%= partial 'shared/install/elasticsearch' %> |
| |
| |
| #### HBase Setup<a class="anchor" name="hbase"> </a> |
| |
| WARNING: You may skip this section if you are using PostgreSQL or MySQL. |
| |
| <%= partial 'shared/install/hbase' %> |
| |
| |
| In addition, you must set your environment variable `JAVA_HOME`. For example, in |
| `/home/abc/.bashrc` add the following line: |
| |
| ``` |
| export JAVA_HOME=/usr/lib/jvm/java-8-oracle |
| ``` |
| |
| |
| <%= partial 'shared/install/dependent_services' %> |
| |
| Now you have installed everything you need! |
| |
| #### [Next: Recommendation Engine Quick Start](/templates/recommendation/quickstart/) |