Note: AMI Linux comes with Java pre-installed, not sure about VA environment.
Download Apache-Jena + Fuseki
wget http://www-us.apache.org/dist/jena/binaries/apache-jena-fuseki-3.4.0.tar.gz
tar -xvzf apache-jena-fuseki-3.4.0.tar.gz

Fix java versioning (this version of fuseki needs jdk 1.8, ami comes with 1.7):
sudo yum install java-1.8.0
sudo yum remove java-1.7.0-openjdk

Please note: All loaded ontologies are provided in a .tar.gz.
tar -xvzf Ontologies_08182017.tar.gz


Load ALL ontologies into one large default graph (note:database directory path will change later):

Updated for .79:
tdbloader --loc /home/ec2-user/apache-jena-fuseki-3.4.0/run/databases/ MVP_Master_Internal_Ontology_08282017.owl NCIT/NCIT_1706d.rdf HP/HP_06302017.rdf DOID/DOID_2017_0613.rdf CDISC/adam-terminology.rdf CDISC/glossary-terminology.rdf CDISC/sdtm-terminology.rdf CDISC/cdash-terminology.rdf CDISC/qs-terminology.rdf CDISC/send-terminology.rdf ICD10/ICD10CM.ttl ICD9/HOM-ICD9_04262011.rdf SnomedCT_USEditionRF2_Production_20170301T120000.ttl






Fixing web interface so that non-localhost users can login:
apache-jena-fuseki-3.4.0/run/shiro.ini file must be edited to enable non-localhost Fuseki 3030 web access (without this the interface will be non-functional).
These lines must be changed (see #comments per line)
admin=12plaintextpass34 ##Changed, note: just needs a value...fuseki does not seem to actually use admin or other accounts in present config
##/$/** = localhostFilter  ##Changed: Commented out
 "/$/** = authcBasic,user[admin]" ##Changed: Removed ##

Command to run fuseki-server as standalone server w/ default database of apache-jena-fuseki-3.4.0/run/databases/:
apache-jena-fuseki-3.4.0/fuseki-server --update --loc=/home/ec2-user/apache-jena-fuseki-3.4.0/run/databases /ds


fuseki-server --update --loc=/home/ec2-user/apache-jena-fuseki-3.4.0/run/databases /ds

<>


Fuseki setup (as a Service rather than standalone):

Moving Fuseki out of usr/share/fuseki directory:
mkdir /usr/share/fuseki
mv apache-jena-fuseki-3.4.0/* /usr/share/fuseki/

Creating /etc/default/fuseki file:
touch /etc/default/fuseki
Add this line (these are the arguments that will be called with the fuseki service script):
FUSEKI_ARGS='--update --loc=/usr/share/fuseki/run/databases /ds'

To start/stop fuseki:
sudo ./usr/share/fuseki/fuseki start
sudo ./usr/share/fuseki/fuseki stop

For convenience:
Added /etc/profile.d/jena-fuseki.sh to adjust path & add variables. Unfortunately symbolic links to fuseki don't seem to work using this (e.g. you have to go to /usr/share/fuseki/ to start/stop fuseki)

/etc/profile.d/jena-fuseki.sh contents:
export PATH=$PATH:/usr/share/fuseki/bin:/usr/share/jena/bin


