-
Notifications
You must be signed in to change notification settings - Fork 15
Installation
https://github.com/alangrafu/lodspeakr/blob/master/README says some stuff.
##Requisites
- Check if your system fulfills the minimum Requisites.
- How to install requisites in Ubuntu
- How to install requisites in CentOS
- How to install lodspeakr in Amazon AMI distro
- Go to the directory where you are going to install LODSPeaKr (e.g.,
/var/www/html/mydata/
) - Run
bash < <(curl -sL http://lodspeakr.org/install)
- Answer 3 questions
- Base URL: (in our example,
http://example.org/mydata/
) - Local namespace: The namespace that will be used (e.g.,
http://example.org/mydata/
if serving the URIs in that namespace but it could be a different one) - Location of SPARQL endpoint (e.g.,
http://example.org/sparql
)
- Base URL: (in our example,
- Give permissions to the web server to write
cache
andmeta
dirs. Specific way to do this depends on each system, but typically it works with something like:chown -R www-apache lodspeakr/cache lodspeakr/meta
chown -R g+w lodspeakr/cache lodspeakr/meta
-
chmod -R 777 lodspeakr/cache lodspeakr/meta
(highly discouraged but useful to test when everything fails. It shouldn't be used in production sites)
- Go to
http://example.org/mydata
to see your site working. Now you can start customizing your installation.
It is also possible to pass arguments via command line, thus avoiding human intervention in the installation. Simply add a -s
after bash
and pass the following options:
-
Base URL (
base-url=http://myUrl
) -
local namespace (
base-namespace=http://my/namespace/
) -
URL of the SPARQL endpoint (
sparql-endpoint=http://myendpoint/sparql
).
If any of those parameters is not present, the dialog asking for them will appear. Other options available (discussed below) are:
-
Change permissions (
chmod=777
) -
Change ownership (
chown=www-data
) -
Especify where to obtain the components You may have already existing components that you want to use (see Develop your own components in a different repository), you can specify their location by using
components=/var/www/anotherInstallation/lodspeakr/components
###Automatic change of permissions/ownership
It is also possible to indicate to the LODSPeaKr installer to change permissions to components
, cache
, meta
and settings.inc.php
. This is done by defining chmod=777
(it doesn't have to be 777, but is the most general case). It is also possible to change ownership of those files and directories instead of their permissions (remember to run the installation script using sudo). To do that, add chown=serverusername
as an option.
The options of changing files permissions or ownership are optional. Other options available are:
-
chmod=777
Changes permissions ofmeta
,cache
,components
andsettings.inc.php
to 777 -
chown=www-data
(Installation script needs to be executed with sudo). Changes the owner of the same files and directories towww-data
. You can specify the group as well by addingchown=www-data:alvaro
for example.
###Example
Suppose you want to install LODSPeaKr in http://alia/test
, using a default namespace http://example.org/
and the default sparql endpoint will be http://dbpedia.org/sparql
. Also, for simplicity, you just want to change the permissions to the necessary files and directories to 777
.
bash -s base-url=http://alia/test base-namespace=http://example.org/ sparql-endpoint=http://dbpedia.org/sparql chmod=777 < <(curl -sL http://lodspeakr.org/install)
Now, suppose that instead of changing permissions to 777
to the necessary files, you prefer to change ownership of them to www-data
(apache's username). You need to run the following command using sudo
sudo bash -s base-url=http://alia/test base-namespace=http://example.org/ sparql-endpoint=http://dbpedia.org/sparql chown=www-data < <(curl -sL http://lodspeakr.org/install)
Now, suppose you want to reuse components that you have in your filesystem. You can tell to LODSPeaKr to link to those components instead of creating the default ones
bash -s components=/location/of/existing/components base-url=http://alia/test base-namespace=http://example.org/ sparql-endpoint=http://dbpedia.org/sparql < <(curl -sL http://lodspeakr.org/install)
- Download the source or clone the repository from
http://github.com/alangrafu/lodspeakr
- Edit
settings.default.inc.php
and change the following values: -
$conf['endpoint']['host']
Point to the SPARQL endpoint with your data -
$conf['basedir']
The base URL in which LODSPeaKr will be locations (e.g., http://example.org, http://example.com/data) -
$conf['metaendpoint']['host']
Similar to the endpoint, but this will store the metadata related to the pages about the resources in your data - Change
$conf['ns']['local'] = 'http://yourwebsite.com/'
- If you want, you can add more namespaces as
$conf['ns']['myns'] = 'http://namespacesite.com/'
mv settings.default.inc.php settings.inc.php
-
mkdir compiled; chmod 777 compiled; rm compiled/*
(last one just should be fixed)
- Installed drupal with bitnami into
/Applications/drupal-7.10-2
cd /Applications/drupal-7.10-2/apache2/htdocs/
mkdir hello-world
cd hello-world
bash < <(curl -s http://lodspeakr.org/install)
Notice that /Applications/drupal-7.10-2/apache2/htdocs/hello-world/
is being served at http://localhost:8080/hello-world/
.
For question 1, give the web URL: http://localhost:8080/hello-world/
For question 2, give the data namespace: http://graves.cl/farmersmarket/version/2010-Oct-22/
For question 3, give the SPARQL endpoint: http://dydra.com/agraves/farmers-markets/sparql
chmod 777 -R lodspeakr/cache lodspeakr/meta
like it asks you to.
Go to http://localhost:8080/hello-world/
- Check how Modules works
- Learn about Using lodspk.sh, the command line tool for creating uri, type and service components.
- Why and How to fork LODSPeaKr