Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
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
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
Go to the parent directory:
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:
Development version (master branch):
git clone https://github.com/NatLibFi/Skosmos.git skosmos
Current stable version (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
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:
Install the dependencies like this (assuming you downloaded composer.phar as above):
php composer.phar install --no-dev
This will create
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
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
Now add a symbolic link:
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 Allis 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.timezonesetting 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_limitsetting (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.