Skip to content
joelit edited this page Jan 23, 2024 · 26 revisions

This information has been superseded!

The information below has been superseded by the new InstallTutorial. However, there may be bits of information that are still relevant, especially if you are using a Linux distribution other than Ubuntu.


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, 14.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 get the most recent code from Github, or download the code as a tar.gz archive. The cloning for GitHub method is strongly recommended.

1.1 Clone from Github

Clone the code from Github:

Skosmos 3 development version (main branch):

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

Current stable version (Skosmos 2 maintenance branch):

  • git clone -b v1.6-maintenance https://github.com/NatLibFi/Skosmos.git skosmos

1.2 Download tarball/zip

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

Note: This may make future updates more difficult, especially if you make changes to the code. It is better to clone from Github as you can then easily upgrade to newer versions using git pull.

2. Install dependencies

Skosmos requires a number of PHP libraries, which are installed using Composer.

First you need to download Composer, unless you have it on your system already:

  • wget https://getcomposer.org/composer.phar

Install the dependencies like this (assuming you downloaded composer.phar as above):

  • 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 (or the directory where you installed Skosmos)

If you are using SELinux (e.g. RHEL/CentOS) you will also need to give Apache permission to perform network connections so that Skosmos can access SPARQL endpoints. The simplest way to do this is:

  • setsebool -P httpd_can_network_connect on

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 Skosmos pages displaying date values may not work at all.

  • 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.

Clone this wiki locally