Skip to content
Sebastian Nuck edited this page Jul 1, 2015 · 5 revisions

Installation on Ubuntu Linux > 14.04

The following section covers the installation on an Ubuntu 14.04 machine. If you want to use a different Linux distribution you have to find

PHP5/ODBC on Apache2

Prerequisites

  • Apache2 webserver
  • PHP

Installation

To enable ODBC the following packages have to be installed:

$ sudo apt-get install php5-odbc libapache2-mod-php5

Configuration

Now some adjustments have to be made. Open the php.ini (locate with locate php.ini) and change the following parameters:

max_execution_time = 120
memory_limit = 512M
upload_max_filesize = 128M 
post_max_size = 256M
short_open_tag = On

Virtuoso Triple Store

There are multiple ways of installing Virtuoso. For a productive environment we recommend installing it by using the repository or building it from source. If you want to try amsl or install it on a developer machine we recommend using Docker.

We recommend using the latest version 7.x, however 6.1.8 also works.

Installation

Using the repository

Virtuoso can be installed by using the repository.

$ sudo apt-get install virtuoso-opensource

Installing it from the repository also linkes the application as a service. You can now check if Virtuoso is running:

$ sudo service virtuoso-opensource-6.1 status

Also Virtuosos Conductor GUI should be accessible at http://localhost:8890/

Building from source

The official OntoWiki wiki provides instructions how to compile Virtuoso from source here.

Using the Docker container

To install docker see the official documentation. We provide a ready-to-go docker container that can be found here. All instructions how to run the container can be found there as well.

Configuration

To change the configuration locate virtuoso.ini (usually located at /etc/virtuoso-opensource-6.1/virtuoso.ini).

To give Virtuoso the permission to access the OntoWiki, we have to add the future OntoWiki directory to the DirsAllowed parameter. In the example OntoWiki is located in /var/www/html/OntoWiki. Make sure to also add /tmp for uploading issues.

DirsAllowed = ., /usr/share/virtuoso-opensource-6.1/vad/, /var/www/html/OntoWiki, /tmp

Another important option to adjust is how many memory Virtuoso is allowed to use. The two options to be adjusted are NumberOfBuffers and MaxDirtyBuffers. By default they are set very low, we recommend, as stated in the comment within the config file as well, to use between 2/3 to 3/5 of the free system memory. At our 16GB live environment we set this values to

NumberOfBuffers          = 900000
MaxDirtyBuffers          = 700000

Now restart Virtuoso to let the changes take effect.

$ sudo service virtuoso-opensource-6.1 restart

ODBC

In order to get ODBC running you have to adjust some parameters in the configuration. First locate odbc.ini (usually at /etc/odbc.ini).

[ODBC Data Sources]
VOS = Virtuoso

[VOS]
Driver = virtuoso-odbc
Description = Virtuoso Open-Source Edition
Address = localhost:1111

Then add the driver to the odbcinst.ini (usually /etc/odbcinst.ini) file. Make sure it is available at the given path.

[virtuoso-odbc]
Driver = /usr/lib/virtodbc.so 

Apache2

Once Virtuoso, ODBC and PHP are running we can finally configure the Apache Webserver and OntoWiki. To enable the overriding that is required for OntoWiki open /etc/apache2/sites-enabled/000-default.conf.

<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride All 
</Directory>

And don’t forget to activate Apache’s mod rewriting.

$ sudo a2enmod rewrite

Now Restart apache.

$ sudo service apache2 restart

OntoWiki

Now it's time to clone the amsl OntoWiki repository.

$ cd /var/www/html
$ sudo mkdir amsl	
$ sudo chown -R user:user amsl
$ git clone https://github.com/amsl-project/OntoWiki.git amsl 
$ cd amsl
$ make deploy

OntoWiki uses a global config file config.ini.dist which is located in the root directory. To use it make a copy of it and name it config.ini. If needed, you can change virtuoso parameters for username and password. Also you can now enable debugging in config.ini by uncommenting debug = true to get exeptions in case OntoWiki runs into an error.

After that you can check if your odbc connection is working.

$ make odbctest

Finally check http://localhost/OntoWiki if OntoWiki is running correctly.

Optionally you can import sample data to start with.

$ make data-init