summaryrefslogtreecommitdiff
path: root/topics/engineering
diff options
context:
space:
mode:
authorMunyoki Kilyungi2024-09-20 17:25:00 +0300
committerMunyoki Kilyungi2024-09-20 17:25:00 +0300
commitc7d3883fb95f89056443262821e65fbf22748873 (patch)
treef6a1f4ea29b04b856e66f773b0075b2d975a2176 /topics/engineering
parente8bf18188e86c49ff6e470cb021acd23f437864b (diff)
downloadgn-gemtext-c7d3883fb95f89056443262821e65fbf22748873.tar.gz
Add new blog entry on setting up virtuoso.
* topics/engineering/working-with-virtuoso-locally.gmi: New article. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'topics/engineering')
-rw-r--r--topics/engineering/working-with-virtuoso-locally.gmi76
1 files changed, 76 insertions, 0 deletions
diff --git a/topics/engineering/working-with-virtuoso-locally.gmi b/topics/engineering/working-with-virtuoso-locally.gmi
new file mode 100644
index 0000000..16b5a22
--- /dev/null
+++ b/topics/engineering/working-with-virtuoso-locally.gmi
@@ -0,0 +1,76 @@
+# Working with Virtuoso for Local Development
+
+* author: bonfacem
+* reviewed-by: jnduli
+
+Using guix, install the Virtuoso server:
+
+```
+guix install virtuoso-ose # or any other means to install virtuoso
+cd /path/to/virtuoso/database/folder
+cp $HOME/.guix-profile/var/lib/virtuoso/db/virtuoso.ini ./virtuoso.ini
+# modify the virtuoso.ini file to save files to the folder you'd prefer
+virtuoso-t +foreground +wait +debug
+```
+
+In the virtuoso.ini file, update the following fields. Here are example entries:
+
+```
+DirsAllowed = ., /gnu/store/60xg4nj45p6bicinf5fc9xnc92nbsdx4-virtuoso-ose-7.2.11/share/virtuoso/vad, /usr/share/proj
+```
+
+## Common Virtuoso Operations
+
+Use isql to load up data:
+
+```
+isql
+# subsquent commands run in isql prompt
+# this folder is relative to the folder virtuoso was started from
+ld_dir ('path/to/folder/with/ttls', '*.ttl', 'http://genenetwork.org');
+rdf_loader_run();
+checkpoint;
+```
+
+Add data using HTTP:
+
+```
+# Replace dba:dba with <user>:<password>
+curl --digest --user 'dba:dba' --verbose --url\
+"http://localhost:8890/sparql-graph-crud-auth?graph=http://genenetwork.org"\
+-T test-data.ttl
+```
+
+Delete data using HTTP:
+
+```
+# Replace dba:dba with <user>:<password>
+curl --digest --user 'dba:dba' --verbose --url\
+"http://localhost:8890/sparql-graph-crud-auth?graph=http://genenetwork.org" -X DELETE
+```
+
+Query the graph data:
+
+```
+curl --verbose --url\
+"http://localhost:8890/sparql-graph-crud?graph=http://genenetwork.org"
+```
+
+Check out more cURL examples here:
+
+=> https://vos.openlinksw.com/owiki/wiki/VOS/VirtGraphProtocolCURLExamples SPARQL 1.1 Graph Store HTTP Protocol cURL Exampple Collection
+
+## Setting Passwords
+
+Virtuoso's default user is "dba" and its default password is "dba". To change a password, use isql to run:
+
+```
+set password "dba" "dba";
+CHECKPOINT;
+```
+
+## More
+
+Read a fuller more complete tutorial on Virtuoso here:
+
+=> https://issues.genenetwork.org/topics/systems/virtuoso Virtuoso