-
Notifications
You must be signed in to change notification settings - Fork 2
Recommended Installation
(tested to work with uSeekM 1.2.0-a5 on a debian/squeezy platform.)
$ ruby -v
ruby 1.9 ...
Version number should be greater than 1.9
Install java JDK and Tomcat6 servlet container from APT repositories:
$ sudo apt-get install sun-java6-jdk tomcat6-admin tomcat6-common tomcat6-examples tomcat6
Install PostgreSQL database (for indexing)
important!
If you already have Postgresql database installed, installing a new one may make
you to upgrade your whole database (a very painful proccess). In that case omit next step.
$ sudo apt-get install postgresql-9.1 postgresql-contrib-9.1
Create a database named 'useekm':
$ sudo -u postgres createdb useekm
# sudo -u postgres psql -d useekm -c 'CREATE LANGUAGE plpgsql'
# sudo -u postgres psql -d useekm -f /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql
# sudo -u postgres psql -d useekm -f /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_sys.sql
Download webapp archives (WARs) to be deployed under Tomcat6 (we choose version 1.2.0-a5):
$ sudo mkdir -p ~/packages
$ cd ~/packages
$ sudo wget --no-check-certificate https://dev.opensahara.com/nexus/content/repositories/re\
leases/com/opensahara/useekm-http-server/1.2.0-a5/useekm-http-server-1.2.0-a5.war
$ sudo wget --no-check-certificate https://dev.opensahara.com/nexus/content/repositories/re\
leases/com/opensahara/useekm-http-workbench/1.2.0-a5/useekm-http-workbench-1.2.0-a5.war
Copy and rename archives into Tomcat6's webapp directory (requires restart to take effect).
Afterwards, visit Tomcat's admin interface, at http://localhost:8080/manager/html
and
verify that the archives are properly deployed and hosted under the appropriate
URL prefix (i.e. /openrdf-sesame
and /openrdf-workbench
):
# cp ~/packages/useekm-http-workbench-1.2.0-a5.war /var/lib/tomcat6/webapps/openrdf-workbench.war
# cp ~/packages/useekm-http-server-1.2.0-a5.war /var/lib/tomcat6/webapps/openrdf-sesame.war
# /etc/init.d/tomcat6 restart
Now a new RDF repository should be created with a set of minimal configuration options. Let's name it "geoknow":
# mkdir -p /var/opt/useekm/geoknow
Create a configuration file for your repository at /var/opt/useekm/geoknow/config.xml
by editing the following template:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<!-- The id "repository" is mandatory! -->
<bean id="repository" class="org.openrdf.repository.sail.SailRepository">
<constructor-arg>
<bean class="com.useekm.indexing.IndexingSail">
<constructor-arg ref="sail" />
<constructor-arg ref="indexerSettings" />
</bean>
</constructor-arg>
</bean>
<!-- This example uses the NativeStore as the underlying sail, you could also use the MemoryStore -->
<bean id="sail" class="org.openrdf.sail.nativerdf.NativeStore" />
<!-- Please customize the indexer settings: -->
<bean id="indexerSettings" lazy-init="true" class="com.useekm.indexing.postgis.PostgisIndexerSettings">
<property name="defaultSearchConfig" value="simple" />
<property name="dataSource" ref="pgDatasource" />
<property name="matchers">
<list>
<!-- CUSTOMIZE: list all the predicates that need indexing (text and/or geo): -->
<bean class="com.useekm.indexing.postgis.PostgisIndexMatcher">
<property name="predicate" value="http://www.w3.org/2000/01/rdf-schema#label" />
<property name="searchConfig" value="simple" />
</bean>
<bean class="com.useekm.indexing.postgis.PostgisIndexMatcher">
<property name="predicate" value="http://www.opengis.net/ont/geosparql#asWKT" />
</bean>
</list>
</property>
<!-- You can add additional configuration, such as index partitions to optimize performance. See the documentation. -->
</bean>
<bean id="pgDatasource" lazy-init="true" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="org.postgresql.Driver"/>
<property name="url" value="jdbc:postgresql://localhost:5432/useekm"/> <!-- CUSTOMIZE! -->
<property name="username" value="postgres"/> <!-- CUSTOMIZE! -->
<property name="password" value="postgres"/> <!-- CUSTOMIZE! -->
</bean>
</beans>
Finally, change ownership of the directories that expect server output (logs etc.):
# chown root:tomcat6 -R /usr/share/tomcat6/.aduna/openrdf-sesame
# chmod 0775 -R /usr/share/tomcat6/.aduna/openrdf-sesame
Restart Tomcat6 and visit http://localhost:8080/openrdf-workbench
.
You should be able to create a new server instance by using http://127.0.0.1:8080/openrdf-sesame
as the address. Note that this is a local (to the Tomcat instance) address.
Afterwards, you should be able to create a new repository named 'geoknow'. Specify the
server's absolute file path of the configuration file (that is /var/opt/useekm/geoknow/config.xml
)
Using Sesame with a different Indexer
- ElasticSearch
To be done
Choosing a different Database
- 4Store. To be done
Visit this Wiki page
Fill your Database
To be done
$ wget https://github.com/ieru/kosa/archive/master.zip
$ unzip master.zip
$ cd kosa
Install required gems
(if you use rvm, type 'rvm all do gem install __GEMS BELOW__')
$ sudo gem install bundle bundler sinatra nokogiri rest-client json dm-core dm-sqlite-adapter rdf \
rdf-aggregate-repo rdf-isomorphic rdf-json rdf-microdata rdf-n3 rdf-rdfa rdf-rdfxml rdf-turtle \
rdf-trig rdf-xsd rdf-4store json-ld linkeddata sparql sinatra-respond_to sparql-client
Create Bundle
$ ./bundle.sh
$ ./bundle.dpl.sh
Last step is to connect you application with a web server.
You can read this guide to run yo app
Thats it!