OntoWiki Installation Mac OS - DigitalCommons/open-data-and-maps GitHub Wiki
WARNING: These notes refer to work that was dropped before it was completed. So, the notes do not take one to a working Ontowiki installation on Mac OS/X. Instead, the preferred (and working) solution was to install OntoWiki on Ubuntu.
These notes refer to Mac OS/X 10.10.
One needs to look at both the OntoWiki installation guide and the Installation Guide for Mac OS/X. The latter is based around the use of HomeBrew, whereas I use MacPorts. This section contains notes relating to the installation using MacPorts.
In order to get control over my web server, I installed Apache from MacPorts, following the MacPorts Howto MAMP guide. Likewise, needing PHP, the Macports Howto PHP guide was also followed. I turned off the Mac system Apache that was provided with Mac OS/Server.
The following extra steps are necessary before running 'make install' in the OntoWiki directory. See composer bug report for background to some of this.
$ sudo port install php70-odbc
$ sudo port install php70-iconv
$ sudo port install php70-openssl
This will also cause the php70
package to be installed.
$ cd /opt/local/etc/php70/
$ sudo cp php.ini-development php.ini
$ sudo port install apache2
$ sudo port install phpmyadmin
$ sudo port install php70-apache2handler
$ cd /opt/local/apache2/modules
$ sudo /opt/local/apache2/bin/apxs -a -e -n php7 mod_php70.so
In order to enable mod_rewrite, required by OntoWiki, the following lines were added (with the other Directory
declarations) to /opt/local/apache2/conf/httpd.conf
:
<Directory "/opt/local/apache2/htdocs/OntoWiki">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Open issue: Is AllowOverride All
an overkill?
Following the [MacPorts/howto/MAMP]{https://trac.macports.org/wiki/howto/MAMP) guide, update /opt/local/apache2/conf/httpd.conf
to contain:
DirectoryIndex index.php index.html
and
# Include PHP configurations
Include conf/extra/mod_php70.conf
I installed OntoWiki under the webroot of the MacPorts Apcache at `/opt/local/apache2/htdocs'
$ cd /opt/local/apache2/htdocs
$ sudo git clone https://github.com/AKSW/OntoWiki.git
$ cd OntoWiki
$ sudo make install
Note that there seems to be a conflict between the packages php70-odbc
and virtuoso-7
. This was resolved by deactivating and forceably reactivating the packages:
$ sudo port deactivate php-odbc
$ sudo port install virtuoso-7
$ sudo port activate -f virtuoso-7
That's not very nice, but (so far) seems not to have caused a problem.
To use the virtuoso lib from macports (assuming has installed to the standard place /opt/local
), we set the contents of /opt/local/etc/odbcinst.ini
to:
[virtuoso-odbc]
Driver = /opt/local/lib/virtodbc.so
and /opt/local/etc/odbc.ini
to:
[ODBC Data Sources]
VOS = Virtuoso
[VOS]
Driver = virtuoso-odbc
Description = Virtuoso Open-Source Edition
Address = localhost:1111
This assumes Virtuoso has been configured according to the OntoWiki installation guide.
$ /opt/local/var/lib/virtuoso/ontowiki
$ sudo virtuoso-t -f
With the above set-up, visiting http://localhost/OntoWiki/index.php
produces an error (Perhaps I see this only because if have debug = true
in OntoWiki/config.ini
):
Virtuoso adapter requires the ODBC extension to be loaded.
Is this because the standard Mac OS/X Web Server is using the system PHP, and not php70
from MacPorts? Maybe. So, now I'm going to use apache2
from MacPorts, and follow the Macports/howto/PHP guide which refers also to the [MacPorts/howto/MAMP]{https://trac.macports.org/wiki/howto/MAMP) guide.
$ cd /opt/local/etc/php70/
$ sudo cp php.ini-development php.ini
$ sudo port install apache2
$ sudo port install phpmyadmin
$ sudo port install php70-apache2handler
$ cd /opt/local/apache2/modules
$ sudo /opt/local/apache2/bin/apxs -a -e -n php7 mod_php70.so
TODO: include httpd.conf diff here? TODO: complete documentation when we get OntoWiki working!