View Source

{toc}

h1. General prerequisites

* [Java 7 or later|http://www.oracle.com/technetwork/java/javase/downloads/index.html]
* [Apache Cassandra 2.x.x|http://cassandra.apache.org/]
* [Apache Solr >= 4.7.0|http://lucene.apache.org/solr/]
* Credentials to our Nexus publishing repos

h1. Standard (and easy) setup

This guide is the bare minimum which needs to be done in order to setup a working system. Scalability and high availability are addressed separately.

# Install and run Cassandra as usual
# [Install Solr 4.7.0 or later|https://cwiki.apache.org/confluence/display/solr/Installing+Solr]
## In your {{solr.solr.home}} directory create a new directory named {{recommend}} and unpack the contents of [{{recommendation-solr-core-1.x.y-bin.zip}}|http://maven.ontotext.com/content/repositories/publishing-releases/com/ontotext/recommend/recommendations-solr-core/1.0.1/recommendations-solr-core-1.0.1-bin.zip] there.
## Add Java system property {{cassandra.host}} to a comma-separated list of hosts running Cassandra set-up in step 1. For example, if Cassandra is running on 192.168.1.1 then add {{-Dcassandra.host=192.168.1.1}} to the Java command starting Solr
## Start Solr
# Deploy [recommendations-web.war|http://maven.ontotext.com/content/repositories/publishing-releases/com/ontotext/recommend/recommendations-web/1.0.1/recommendations-web-1.0.1.war] to application container of your choice, we usually use [Apache Tomcat|http://tomcat.apache.org/tomcat-7.0-doc/appdev/installation.html]. Some Java system properties need to be set on the container (in the case of Tomcat, they should go in {{bin/setenv.sh}} or {{bin/setenv.bat}} depending on your platform):
#* {{-Dcom.ontotext.recommend.solr=http://<solrhost>:<solrport>/<solrpath>/recommend}} where _solrhost_ and _solrport_ point to the box running Solr set up in step 2.; and _solrpath_ is the Solr web app name, usually just {{solr}}.
#* {{-Dcassandra.host=<cassandra-host>}}, same as in the Solr setup
#* (optional) {{-Ddocumentation.services.basePath=http://<this-host>:<this-port>/<this-app>}} - if you'd like to see Swagger documentation, you need to set this to the host:port/webapp of the container running recommendations-web.war. This won't be needed for future versions of recommendations.