Skip to content
osma edited this page Sep 26, 2014 · 26 revisions

How to install Skosmos

0. Preparation

The rest of this document assumes you have a Linux machine with Apache and PHP already installed. This guide works with at least Ubuntu 12.04 and RHEL6/CentOS6.

Make sure that Apache works and that PHP is enabled. If you have just installed PHP, you may need to restart Apache.

You will also need a SPARQL endpoint with SKOS vocabulary data. See InstallFusekiJenaText for instructions on installing Fuseki with the jena-text extension for this purpose. Alternatively, you can use any other SPARQL 1.1 compliant RDF store, but performance will likely not be very good with large vocabularies since there is no text index support with generic SPARQL 1.1.

1. Get the code

Choose a directory for installing Skosmos. In this example, we'll use /opt/skosmos

Go to the parent directory:

  • cd /opt

You will need to either download the code as a tar.gz archive, or get the most recent code from Github.

1.1 Download tarball/zip

You can download archives of released versions from here: https://github.com/NatLibFi/Skosmos/releases

1.2 Clone from github

Clone the code from Github:

Development version:

  • git clone https://github.com/NatLibFi/Skosmos.git skosmos

Current stable versio (maintenance branch):

  • git clone -b v0.5-maintenance https://github.com/NatLibFi/Skosmos.git skosmos

2. Install dependencies

Skosmos requires a number of PHP libraries, which are installed using [http://getcomposer.org Composer]. Install them like this:

  • php composer.phar install --no-dev

This will create vendor and components subdirectories containing the libraries.

Later you may want/need to update the dependencies:

  • php composer.phar update --no-dev

If you want to do your own development, run unit tests, generate documentation etc., you should omit the --no-dev options and Composer will install required packages for development as well.

If Composer asks for your Github username and password, you may have hit the Github API rate limit - see the Composer documentation for details (either give your username/password or use an OAuth token)

3. Setup Apache

The simplest way to make Apache display the code is to add a symbolic link into the !DocumentRoot.

First find out what your !DocumentRoot setting is (check the apache config). In RHEL6, it's /var/www/html and in Debian/Ubuntu it's /var/www .

Now add a symbolic link:

  • cd /var/www/html
  • ln -s /opt/skosmos skosmos

Now you should be able to access the front page of Skosmos using the URL http://myhost/skosmos . If not, check the following:

Check that mod_rewrite is enabled in the Apache configuration

Check that !AllowOverride All is set for the !DocumentRoot

4. Configure PHP

The default PHP configuration provided by your distribution is probably fine for Skosmos, but you may want to check php.ini anyway. Here are some things to check:

  • Make sure you have the date.timezone setting configured, otherwise you may get errors displaying date values.

  • If you use vocabularies, such as Lexvo, that link to DBpedia or other resources with potentially a large number of triples, you may need to adjust the memory_limit setting (see issue #98). The default is usually 128M but the recommended setting is 256M.

  • You can get a performance boost for Skosmos by installing the APC extension, e.g. the Debian/Ubuntu package php-apc, but this is not required.

5. Configure Skosmos

See Configuration for details.