Fuseki on CentOS
Joachim Neubert edited this page Mar 20, 2023
·
10 revisions
Based on https://github.com/NatLibFi/Skosmos/wiki/InstallTutorial - only a few additions
sudo yum install java-11-openjdk java-11-openjdk-devel
sudo alternatives --config java
- leave the database dirs under their default (
/var/lib/fuseki/databases
) - make all created directories owned by fuseki:fuseki
- symlink that directory to another location if necessary
- create
/var/lib/fuseki/databases/temp
, which is not referenced in config.ttl, for batch operations (tdbloader, textindexer) in parallel to a running Fuseki, and make it owned by the operating user - locate text indexes in a
text
subdirectory beyond the dataset directory
cd /etc/systemd/system
sudo ln -s /opt/fuseki/fuseki.service .
or provide customized version (as of v4.6.1, necessary for adding the --tdb2
flag), e.g. in /usr/local/etc/systemd/system/
Logging to file needs /etc/rsyslog.d/fuseki.conf
:
if $programname == 'fuseki' then /var/log/fuseki/stderrout.log
if $programname == 'fuseki' then stop
To activate:
sudo systemctl restart rsyslog
Not sure if the following works_
Leave /opt/fuseki/log4j2.properties
untouched, and modify a copy of it in /etc/fuseki
.
Add a line to /etc/systemd/system/fuseki.service
:
Environment=LOGGING=-Dlog4j.configurationFile=/etc/fuseki/log4j2.properties
- Extract apache-jena-fuseki-x.y.z.tar.gz to
/opt
- Stop service (if running)
- Replace
/opt/fuseki
symlink - Start fuseki
sudo /opt/fuseki/fuseki start
On old machine:
export DS=eurovoc; curl -H "Accept: application/n-quads" http://localhost:8080/fuseki/$DS/data \
| gzip > ${DS}_mig.nq.gz
On new machine:
export DS=eurovoc; zcat /var/lib/fuseki/backups/${DS}_mig.nq.gz \
| curl -X PUT -d@- -H "Content-Type: application/n-quads" http://localhost:3030/$DS/data