SemanticMediawikiInstall
This document details the installation of Semantic to the existing OSE Mediawiki.
Command line installation
1. Create the customized install script "composer.phar" by fetching the file "installer" and running it using php:
$ curl -sS https://getcomposer.org/installer | php
The above command failed with an error, so add "-d allow_url_fopen=On" to the php command, which succeeded:
$ curl -sS https://getcomposer.org/installer | php -d allow_url_fopen=On All settings correct for using Composer Downloading... Composer successfully installed to: /usr/home/osemain/composer.phar Use it: php composer.phar $
2. Move "composer.phar" into a directory in the PATH:
$ mv composer.phar ~/bin/.
3. Check the running version of Mediawiki using the "Special:Version" feature of Mediawiki:
http://opensourceecology.org/wiki/Special:Version Installed software Product Version MediaWiki 1.24.2 PHP 5.4.45 (cgi-fcgi) MySQL 5.5.46-0+deb7u1
4. Install Semantic using the procedure for Mediawiki 1.24 found in the table on "https://www.semantic-mediawiki.org/wiki/Help:Installation" (Note that we must continue adding "-d allow_url_fopen=On" to the "php" command:
$ php -d allow_url_fopen=On bin/composer.phar require mediawiki/semantic-media-wiki "~2.1" ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) - Installing composer/installers (v1.0.22) Downloading: 100% - Installing onoi/callback-container (1.0.0) Downloading: 100% - Installing onoi/cache (1.2.0) Downloading: 100% - Installing onoi/http-request (1.3.0) Downloading: 100% - Installing onoi/blob-store (1.1.0) Downloading: 100% - Installing onoi/event-dispatcher (1.0.0) Downloading: 100% - Installing onoi/message-reporter (1.0.0) Downloading: 100% - Installing serialization/serialization (3.2.1) Downloading: 100% - Installing data-values/interfaces (0.1.5) Downloading: 100% - Installing data-values/data-values (1.0.0) Downloading: 100% - Installing data-values/validators (0.1.2) Downloading: 100% - Installing data-values/common (0.2.3) Downloading: 100% - Installing param-processor/param-processor (1.2.2) Downloading: 100% - Installing mediawiki/validator (2.0.4) Downloading: 100% - Installing mediawiki/parser-hooks (1.4) Downloading: 100% - Installing mediawiki/semantic-media-wiki (2.3.1) Downloading: 100% mediawiki/semantic-media-wiki suggests installing mediawiki/semantic-result-formats (Additional result formats for SMW queries) mediawiki/semantic-media-wiki suggests installing mediawiki/semantic-forms (Easy creation of forms to add semantic data) Writing lock file Generating autoload files $
5. Change into the wiki directory (in our case: "public_html/w"):
$ cd public_html/w
6. Run the MediaWiki update script:
$ php maintenance/update.php
7. Edit "LocalSettings.php" and add a line to enable Semantics for the wiki (in our case: "opensourceecology.org"):
enableSemantics( 'opensourceecology.org' );
Note: This line goes at the end of the file.