This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
forked from OpenSKOS/OpenSKOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL.txt
163 lines (120 loc) · 6.22 KB
/
INSTALL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
1. Install the OpenSKOS code
===============================================================================
Copy the code to a location of your choice. Make sure all files are readable by
your webserver. Make sure the "data/uploads" directory is writable for the webserver.
For security reasons you can place this "data" directory outside your
webserver's document root.
1.1 Configuration
-------------------------------------------------------------------------------
To configure OpenSKOS you have to rename:
APPROOT/application/configs/application.ini.dist
to
APPROOT/application/configs/application.ini
Now you van edit the APPROOT/application/configs/application.ini
You can have separate config settings for specific deployments. The
configuration section marked by the Environment Variable "APPLICATION_ENV" (see
3.1 Setting Up Your VHOST). Most settings are self explanatory.
If you experience any problems you may want to modify settings in the config,
to show you more verbose error messages:
resources.frontController.params.displayExceptions=1
phpSettings.display_errors = 1
1.1.1 OAI-PMH setup
-------------------------------------------------------------------------------
OpenSKOS includes a OAI harvester. To configure OAI Service providers, use the
"instances" part of the configuration. Two types of instances are supported:
- openskos (instances of OpenSKOS)
- external (any OAI-PMH provider that provides SKOS/XML-RDF data)
The setup for "openskos" types is easy:
instances.openskos.type=openskos
instances.openskos.url=http://HOSTNAME
instances.openskos.label=YOUR LABEL
For "external" types use this syntax:
instances.example1.type=external
instances.example1.url=http://HOSTNAME
instances.example1.label=EXAMPLE LABEL
#optional, default=oai_rdf
instances.example1.metadataPrefix=METADATAPREFIX
#optional:
instances.example1.set=SETSPEC
You can define multiple instances by using a different key (in the above example
the key "example1" is used").
2. Zend Framework
===============================================================================
Download a 1.11 branch from http://framework.zend.com/ and make sure it is in
you php include path. You can do this by setting the "include_path" directive
in your php.ini.
3. Webserver with PHP support
===============================================================================
You can install your favorite webserver with PHP support.
All development and testing was done using Apache/2.2.15 with PHP 5.3.8
Make sure your PHP installation supports at least one supported Database
adapters (see http://framework.zend.com/manual/en/zend.db.adapter.html)
3.1 Setting Up Your VHOST
-------------------------------------------------------------------------------
The following is a sample VHOST you might want to consider for your project.
<VirtualHost *:80>
DocumentRoot "/PATH/TO/CODE/public"
ServerName YOUR.SERVER.NAME
# This should be omitted in the production environment
SetEnv APPLICATION_ENV development
<Directory "/PATH/TO/CODE/public">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
4. Database setup
===============================================================================
Install your choice of Zend Framework supported Database engine (see
http://framework.zend.com/manual/en/zend.db.adapter.html). The credentials to
access your database can be configured in the application's configuration.
Once you have created an empty database, you have to run the SQL script
APPROOT/data/openskos-create.sql to create the db-tables.
You also have to run the php-script to create a tenant:
php APPROOT/tools/tenant.php --code INST_CODE --name INST_NAME --email EMAIL --password PWD create
With this account created you can login into the dashboard,
where you can manage all the other entities of the application.
5. Apache Solr Setup
===============================================================================
You have to have a java VM installed prior to installing Solr!
Download a 3.4 release of Apache Solr and extract it somewhere on your server:
http://www.apache.org/dyn/closer.cgi/lucene/solr/
- go to the "example" directory and create a directory named "openskos"
- copy the "data/solr/conf" directory of the OpenSKOS checkout to the
SOLR-INSTALL_DIR/example/openskos directory
You can now start Solr (in this example with 1.024Mb memory assigned):
java -Dsolr.solr.home="./openskos" -Xms1024m -Xmx1024m -jar start.jar
6. Data Ingest
===============================================================================
Once you have the application running you can start adding data,
managed in "collections".
You can create a collection in the dashboard.
There are three ways to populate a collection:
6.1 REST-interface
-------------------------------------------------------------------------------
Send data via the REST-API, e.g. like this:
> curl -H "Accept: text/xml" -X POST -T sample-concept.rdf http://localhost/OpenSKOS/public/api/concept
You find the required format of the input data described in the API-docs under:
http://openskos.org/api#concept-create
You may send only one concept per call.
Also, you have to identify the tenant and provide the API key,
which you assign to the user in the dashboard.
6.2 Uploader
-------------------------------------------------------------------------------
Upload a dataset (a SKOS/RDF file) via a form in the dashboard:Manage collections.
Here you can provide many concepts within one file (XPath: /rdf:RDF/rdf:Description)
Once you successfully upload the file, it is scheduled for import,
as seen in dashboard:Manage jobs.
The import job can be started with ./tools/jobs.php,
a CLI script intended to be run with a Cron like task runner.
6.3 OAI ???
-------------------------------------------------------------------------------
Third possiblity is to replicate an existing dataset via OAI-PMH,
either from other OpenSKOS-instances or from an external source providing SKOS-data.
???
For this, you set the [OAI baseURL]-field of a collection to the OAI-PMH endpoint of an external provider
and let the source be harvested.
The harvest job can be started with ./tools/harvest.php,
another CLI script meant to be run as a cron-task.
???