Installation without shell access using tarballs (MediaWiki 1.19.0 to 1.30.x)

From semantic-mediawiki.org
< Installation(Redirected from Installation without shell access using tarballs (MediaWiki 1.19.0 to 1.30.x))
Administrator manualInstallationInstallation without shell access using tarballs (MediaWiki 1.19.0 to 1.30.x)Tarball download
Installation
This pages describes the installation where no shell access is available by using a tarball source.
Further Information
Installation type: new
Installation method: Help:Tarball download
MediaWiki version: 1.19.0 to 1.30.x
Table of Contents
Starting with Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x. tarballs will no longer be provided.1 Alternatively you will have to create an individual file release on a machine that allows command line access.

There is also a help page on how to install on a Linux based server and install on a Windows based server (requires shell access). Please always check the exact requirements and follow the instructions carefully. Make sure you understand the legal disclaimer in the file COPYING before proceeding.

To upgrade a wiki running an older version of SMW, be sure to read the relevant section before starting the upgrade.

General notes[edit]

  • Extension "Semantic MediaWiki"Semantic MediaWiki (SMW) is a free, open-source extension to MediaWiki that lets you store and query data within the wiki's pages. Semantic MediaWiki is also a full-fledged framework, in conjunction with many spinoff extensions, that can turn a wiki into a powerful and flexible knowledge management system. All data created within SMW can easily be published via the Semantic Web, allowing other systems to use this data seamlessly. has dependencies that will be made available during the installation.
  • Individual extensions to Semantic MediaWiki, e.g. extension "Semantic Result Formats"Provides additional formats for semantic queries may have different requirements.
  • Individual extensions to Semantic MediaWiki may not be compatible with the "~3.0" release (yet). Please see those extensions' documentation pages, or contact the respective developers, for further information.
  • To upgrade a wiki running an older version of Semantic MediaWiki, be sure to read the relevant section before starting the upgrade.
  • If you are using MediaWiki 1.30.x and higher it is recommended to switch the setting for configuration parameter $wgShellLocale (MediaWiki.org) to C.UTF-8 as recommended by MediaWiki core developers2
  • If you are using MediaWiki 1.23.x and higher and/or PHP 5.4.x and higher you are strongly encouraged to install or to update to Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x. or higher. Semantic MediaWiki 2.4.6Released on 15 February 2017 and compatible with MW 1.19.0 - 1.28.x. and lower is discouraged for production use with these versions.
  • The ConfirmEdit3 extension is known to cause limitations in the functioning of Semantic MediaWiki when used on MediaWiki 1.26.x. You are advised to upgrade MediaWiki to version 1.27.0 or later.

Environment[edit]

  • Please always check the exact requirements and follow the instructions carefully. Make sure you understand the legal disclaimer in the file COPYING before proceeding.
  • It is required that the PHP mbstring extension is enabled (provides PHP mb_*() multibyte functions such as mb_strpos in the php_mbstring.dll). This is standard but not enabled by default on some distributions of PHP.
  • When using a SPARQL backend, Semantic MediaWiki and onoi/http-request requires access to the cURL functions of PHP. These functions may have to be enabled/installed to be available.
  • While not required (yet), it is suggested to have the PHP intl (ICU) extension enabled especially when Semantic MediaWiki is used in a UTF-8 (non-Latin) environment.
  • For users that require symbolic links, some information can be found here.

Settings[edit]

  • For installation and upgrade, Semantic MediaWiki needs the rights to create new tables (CREATE) and to alter tables (ALTER). You can remove both rights after Semantic MediaWiki is set up. The maintenance script "setupStore.php"Allows to set up the data backend/store can use the DB credentials from "LocalSettings.php" for this purpose, avoiding the need of extra rights for the wiki DB user.
  • When using the configuration parameter $smwgDefaultStoreSets the storage backend to be used for the semantic data set to a SQL data backend (default), Semantic MediaWiki creates and alters temporary tables for certain semantic queries. To do this, the wiki's database user account must have privileges for CREATE TEMPORARY TABLES and DROP. If you do not wish to allow such privileges, please read how to disable the use of temporary tables in "LocalSettings.php".
  • Some notes and related settings for a multi-database environment
  • Webserver notes lists settings or limitations that are imposed by a specific webserver environment

Recommendations[edit]

  • Extended list of recommendations and settings
  • It is highly recommended to have the parser cache and Semantic MediaWiki specific cache enabled and set to appropriate values.
  • Information about regular maintenance tasks and the job queue can be found here.

Requirements[edit]

Compatibility information and minimum requirements for Semantic MediaWiki are listed in the document on compatibility. Please make sure that you meet them prior to installing Semantic MediaWiki.

Download[edit]

Download a Semantic MediaWiki tarball and extract it into your extension directory.4

NoteNote:  Please choose one of the release files we prepared and uploaded for you that contain contain the dependencies for your deployment.

NoteNote:  Tarball releases can only run by themselves, i.e. if you would like to also use other extensions like e.g. Semantic Result Formats or Semantic Maps you cannot use the tarball release. See the information on individual file releases for a possible way out.

Installation[edit]

Important noteImportant Note: Please also consult our page on troubleshooting in case you encounter issues during the process.

Extract and copy[edit]

Extract the downloaded file.

Copy the extracted folder and files to the …/extensions/ directory of your MediaWiki installation.

Add the required settings to the end of the "LocalSettings.php" file:

Enable Semantic MediaWiki[edit]

require_once "$IP/extensions/SemanticMediaWiki/SemanticMediaWiki.php";
enableSemantics( 'example.org' );

Add optional settings5 to the "LocalSettings.php" file as desired below the required settings.

Run maintenance script[edit]

Run the setup script from the base directory6 of your MediaWiki installation (i.e. not the extension's maintenance directory):

php maintenance/update.php

or

Screenshot of "Special:SMWAdmin"
Screenshot of "Special:SMWAdmin"

Log in as a user with administrator permission to your wiki and go to the page "Special:SMWAdmin":

  1. Click on the "Initialise or upgrade tables" button in the "Database installation and upgrade" section to setup the database. Note that this requires permissions to alter/create database tables, as explained at the top of this help page.
  2. Click on the "Start updating data" button in the "Data repair and upgrade" section to activate the automatic data update. Note that this takes some time; go to Special:SMWAdmin to follow its progress. SMW can be used before this completes, but will not have access to all data yet (e.g. page categories).

Check and verify[edit]

Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.

Test your installation as described on the help page about testing SMW.

Done!

Upgrading[edit]

Use these instructions to update an existing ≤ SMW 1.8.x installation from e.g. 1.8.0.5 to 1.9.0 etc.

Upgrading from SMW 1.8.x[edit]

  1. Backup your database and installation.
  2. Remove the formerly required invocation of "Validator" from the "LocalSettings.php" file, i.e. the following line:
    require_once "$IP/extensions/Validator/Validator.php";
    
  3. Re-install Semantic MediaWiki as described in the section on installing SMW though skipping step four and optionally step five.
  4. Log in as a user with administrator permission to your wiki and go to the page "Special:SMWAdmin".
    1. Click on the "Initialise or upgrade tables" button in the "Database installation and upgrade" section to setup the database. Note that this requires permissions to alter/create database tables, as explained at the top of this help page.
    2. Click on the "Start updating data" button in the "Data repair and upgrade" section to activate the automatic data update. Note that this takes some time; go to Special:SMWAdmin to follow its progress. SMW can be used before this completes, but will not have access to all data yet (e.g. page categories).
  5. Done!

Upgrading from ≤ SMW 1.7.x[edit]

Please upgrade to SMW 1.8.0.5 first as described on the help page on upgrading to SWM 1.8.x.

Updating SMW 1.9.x[edit]

Use these instructions to update an existing SMW 1.9 installation from e.g. 1.9.0 to 1.9.1 etc.

  1. Download the file release of Semantic MediaWiki.
  2. Extract the downloaded file.
  3. Copy the extracted folder and files to the …/extensions/ directory of your MediaWiki installation7
  4. Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.
  5. Log in as a user with administrator permission to your wiki and go to the page "Special:SemanticMediaWiki":
    1. Click on the "Initialize or upgrade tables" button in the "Database installation and upgrade" section to setup the database. Note that this requires permissions to alter/create database tables, as explained at the top of this help page.
    2. Once you receive the success message, click the back button to go back to the "Special:SemanticMediaWiki".
    3. Click on the "Start updating data" button in the "Data rebuild" section to activate the automatic data update. Note that this takes some time; go to "Special:SemanticMediaWiki" to follow its progress. SMW can be used before this completes, but will not have access to all data yet (e.g. page categories).
  6. Done!


References

  1. ^  Semantic MediaWiki: GitHub issue gh:smw:3346
  2. ^  Semantic MediaWiki: Phabricator task mw:phab:T107128
  3. ^  Semantic MediaWiki: GitHub issue gh:smw:1406
  4. ^  The file release includes all dependencies of Semantic MediaWiki. A drawback of this approach is that it makes your setup incompatible with extensions that share dependencies with Semantic MediaWiki. If you have shell access you are strongly discouraged to install the file releases.
  5. ^  See the help page on configuring SMW. Usually only a few configuration parameters have to be changed if there is a need to do so at all.
  6. ^  This is the directory which contains the "LocalSettings.php" file.
  7. ^  You can move the new files over the already existing files of the previous release.