QStore4S Installation
System Requirements
To install QStore4S you need:
- Tomcat 6 (you can probably use Tomcat 7 as well, but we have not yet tested it)
- Neo4j (the latest version of the code works with Neo4j 2.2)
Download QStore4S
Download the latest version of QStore4S from Github: http://sourceforge.net/projects/store4s/files/; or clone the repository: QStore4S GitHub page.
Build with Maven
If you are comfortable using Maven, you can build and deploy QStore4S with Maven. Simply run the following command:
mvn -P [dev/test/prod] tomcat:deploy -Dneo4j.password=[neo4j-password]
or if you already deployed QStore4S before:
mvn -P [dev/test/prod] tomcat:redeploy -Dneo4j.password=[neo4j-password]
Choose a profile (dev, test, or prod -- by default dev and prod deploy QStore4S at /qstore4s
, and test deploys it to /qstore-test
), and specify the password for your Neo4j instance.
This is the simplest way to deploy QStore4S. It assumes that your Neo4j user is called "neo4j" and that Tomcat is running on the same computer from which you are calling Maven. Additionally, you can specify the following properties when calling Maven:
neo4j.username
: the username for your Neo4j instance; default isneo4j
.neo4j.password
: the password for your Neo4j instance; default ispassword
. We strongly recommend that you don't use the default password for your Neo4j instance.tomcat.deploy.path
: path to your Tomcat manager; default ishttp://localhost:8080/manager/
. If you deploy to Tomcat 7, this should behttp://localhost:8080/manager/text
.deploy.path.dev
: the name of the deployed QStore4S instance when running profiledev
; default isqstore4s
.deploy.path.test
: the name of the deployed QStore4S instance when running profiletest
; default isqstore-test
.deploy.path.prod
: the name of the deployed QStore4S instance when running profileprod
; default isqstore4s
.
Build and Deploy Manually
If you don't want to or can't use Maven to build and deploy QStore4S, you can also do it manually.
WAR-file Configuration
There is one file that need to be configured. The file is:
- WEB-INF/spring/root-context.xml
If you've downloaded the latest war-file from Sourceforge, decompress the war-file and find the following file in the decompressed folder. Change the following property in the file.
- root-context.xml:
Find the following piece of XML in the file and change the URL value with the URL of your Neo4j instance.
<bean id="graphDatabaseService" class="org.springframework.data.neo4j.rest.SpringCypherRestGraphDatabase"> <constructor-arg value="http://localhost:7474/db/data/" index="0" /> <constructor-arg value="neo4j" index="1" /> <constructor-arg value="myneo4j" index="2" /> </bean>
Building
Now, build a war file out of your decompressed QStore4S folder (in which you made the changes).
Deploy
Finally, deploy the newly generated war-file in your Tomcat and restart Tomcat. Please make sure that before you deploy QStore4S to your Tomcat server that your Neo4j server is running, otherwise Tomcat will throw exceptions.