Skip to content
Snippets Groups Projects
Commit 4fbaab84 authored by Alvaro Graves's avatar Alvaro Graves
Browse files

Added configuration script

parent 4e65667d
No related branches found
No related tags found
No related merge requests found
<?
include_once('settings.inc.php');
$conf['endpoint']['config']['output'] = 'json';
$conf['endpoint']['config']['named_graph'] = '';
$conf['endpoint']['config']['show_inline'] = 0;
$conf['metaendpoint']['config']['output'] = 'json';
$conf['metaendpoint']['config']['show_inline'] = 0;
$conf['metaendpoint']['config']['named_graph'] = 'http://slodps.org/metadata';
$conf['ns']['rdf'] = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
$conf['ns']['rdfs'] = 'http://www.w3.org/2000/01/rdf-schema#';
$conf['ns']['dcterms'] = 'http://purl.org/dc/terms/';
$conf['ns']['foaf'] = 'http://xmlns.com/foaf/0.1/';
$conf['ns']['skos'] = 'http://www.w3.org/2004/02/skos/core#';
$conf['ns']['og'] = 'http://opengraphprotocol.org/schema/';
$conf['ns']['owl'] = 'http://www.w3.org/2002/07/owl#';
$conf['ns']['ov'] = 'http://open.vocab.org/terms/';
$conf['ns']['conv'] = 'http://purl.org/twc/vocab/conversion/';
$conf['model']['directory'] = 'models/'; #include trailing slash!
$conf['model']['extension'] = '.model';
$conf['model']['default'] = 'default';
$conf['view']['directory'] = 'views/'; #include trailing slash!
$conf['view']['extension'] = '.view';
$conf['view']['default'] = 'default';
$conf['view']['standard']['baseUrl'] = $conf['basedir'];
$conf['resource']['url_delimiter'] = "%u";
$conf['http_accept']['text/html'] = 'html';
$conf['http_accept']['application/rdf+xml'] = 'rdf';
$conf['http_accept']['text/turtle'] = 'ttl';
$conf['http_accept']['text/plain'] = 'nt';
/* TODO: more generalizable formats
'xhtml' => 'application/xhtml+xml',
'xml' => 'application/xml',
'n3' => 'text/n3',
*/
$conf['http_accept']['default'] = 'html';
?>
<?php <?php
/* ARC2 static class inclusion */ /* ARC2 static class inclusion */
include_once('lib/arc2/ARC2.php'); include_once('lib/arc2/ARC2.php');
include_once('settings.inc.php');
set_time_limit(0); set_time_limit(0);
/* MySQL and endpoint configuration */ /* MySQL and endpoint configuration */
$config = array( $config = array(
/* db */ /* db */
'db_host' => 'localhost', /* optional, default is localhost */ 'db_host' => $conf['metaendpoint']['config']['host'],
'db_name' => 'slodp', 'db_name' => $conf['metaendpoint']['config']['dbname'],
'db_user' => 'sl', 'db_user' => $conf['metaendpoint']['config']['user'],
'db_pwd' => 'ls', 'db_pwd' => $conf['metaendpoint']['config']['pass'],
/* store name */ /* store name */
'store_name' => 'my_endpoint_store', 'store_name' => 'my_endpoint_store',
...@@ -20,8 +22,8 @@ $config = array( ...@@ -20,8 +22,8 @@ $config = array(
'dump' /* dump is a special command for streaming SPOG export */ 'dump' /* dump is a special command for streaming SPOG export */
), ),
'endpoint_timeout' => 60, /* not implemented in ARC2 preview */ 'endpoint_timeout' => 60, /* not implemented in ARC2 preview */
'endpoint_read_key' => '', /* optional */ 'endpoint_read_key' => '',
'endpoint_write_key' => '5A9av7zuDA3', /* optional */ 'endpoint_write_key' => $conf['metaendpoint']['config']['key'],
'endpoint_max_limit' => 0 'endpoint_max_limit' => 0
); );
......
File moved
#!/bin/bash
mysql_port="3360"
mysql_host="localhost"
mysql_user="root"
mysql_pass=""
basedir="http://localhost/"
ns=$basedir
endpoint="http://localhost/sparql?"
everything_ok="n"
while [ "$everything_ok" != "y" ]
do
echo "==Basic Information=="
echo "slodps needs to gather some basic information first to configure the installation properly"
echo -n "Type the base url of your site where slodps' index.php will be located (default '$basedir'): "
read aux_basedir
echo ""
if [ "$aux_basedir" != "" ]
then
basedir=$aux_basedir
fi
echo -n "Type the local namespace you will use (default '$ns'): "
read aux_ns
echo ""
if [ "$aux_ns" != "" ]
then
ns=$aux_ns
fi
echo -n "What is the URL of your SPARQL endpoint? (default $endpoint): "
read aux_endpoint
echo ""
if [ "$aux_endpoint" != "" ]
then
endpoint=$aux_endpoint
fi
echo "==Internal SPARQL endpoint=="
echo "slodps reads from your SPARQL endpoint, however it needs to add metadata to its own SPARQL endpoint"
echo ""
echo "Ok, to create slodps' endpoint I need a MySQL database"
echo -n "What is host where the database is located (default $mysql_host)? "
echo ""
read aux_mysql_host
if [ "$aux_mysql_host" != "" ]
then
mysql_host=$aux_mysql_host
fi
echo -n "What is port the database is listening to (default $mysql_port)? "
read aux_mysql_port
echo ""
if [ "$aux_mysql_port" != "" ]
then
mysql_port=$aux_mysql_port
fi
echo -n "What is user for this database (default $mysql_user)? "
read mysql_user
echo ""
if [ "$aux_mysql_user" != "" ]
then
mysql_user=$aux_mysql_user
fi
echo -n "What is password for $mysql_user? "
read mysql_pass
echo ""
if [ "$aux_mysql_pass" != "" ]
then
mysql_pass=$aux_mysql_pass
fi
echo "==Configuration=="
echo "Ok, so I have the following configuration:"
echo "slodps is installed at $basedir"
echo "The local namespace is $ns"
echo "Your SPARQL endpoint is located at $endpoint"
echo "For slodps internal sparql endpoint the configuration is as follows:"
echo "Host: $mysql_host"
echo "Port: $mysql_port"
echo "User: $mysql_user"
echo "Pass: $mysql_pass"
echo -n "Is everything ok (y/n)?"
read everything_ok
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment