Installation without shell access using tarballs (MediaWiki 1.19.0 to 1.30.x)
Installation | |
---|---|
This pages describes the installation where no shell access is available by using a tarball source. | |
Further Information | |
Installation type: | new |
Installation method: | Tarball |
MediaWiki version: | 1.19.0 to 1.30.x |
Table of Contents | |
Contents |
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"Allows to store and query data annotated to pages 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
"~4.2"
release (yet). Please see those extensions' documentation pages, or contact the respective developers, for further information. - To upgrade an older version of Semantic MediaWiki, be sure to read the relevant section before starting the upgrade.
- If you are forced to use MediaWiki < 1.38.x it is recommended to set configuration parameter
$wgShellLocale
(MediaWiki.org) toC.UTF-8
. However, this setting is removed (now obsolete) for recent, supported versions, of MediaWiki >= 1.38.x 2
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. - It is required that PCRE - Perl Compatible Regular Expressions is at version 8.38 or later.3
- 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. See also the help page on database privileges, when usingSMWSQLStore3
. - When using the configuration parameter
$smwgDefaultStore
Sets 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 forCREATE TEMPORARY TABLES
andDROP
. If you do not wish to allow such privileges, please read how to disable the use of temporary tables in "LocalSettings.php". See also the help page on database privileges, when usingSMWSQLStore3
. - 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
Note: Please choose one of the release files we prepared and uploaded for you that contain contain the dependencies for your deployment.
Note: 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]
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
Log in as a user with administrator permission to your wiki and go to the page "Special:SMWAdmin":
- 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.
- 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]
- Backup your database and installation.
- Remove the formerly required invocation of "Validator" from the "LocalSettings.php" file, i.e. the following line:
require_once "$IP/extensions/Validator/Validator.php";
- Re-install Semantic MediaWiki as described in the section on installing SMW though skipping step four and optionally step five.
- Log in as a user with administrator permission to your wiki and go to the page "Special:SMWAdmin".
- 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.
- 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).
- 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.
- Download the file release of Semantic MediaWiki.
- Extract the downloaded file.
- Copy the extracted folder and files to the
…/extensions/
directory of your MediaWiki installation7 - Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.
- Log in as a user with administrator permission to your wiki and go to the page "Special:SemanticMediaWiki":
- 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.
- Once you receive the success message, click the back button to go back to the "Special:SemanticMediaWiki".
- 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).
- Done!
References
- ^ Semantic MediaWiki: GitHub issue gh:smw:3346
- ^ mw:phab:T291234
- ^ | | Semantic MediaWiki: GitHub issue comment gh:smw:3848:589920096
- ^ 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.
- ^ 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.
- ^ This is the directory which contains the "LocalSettings.php" file.
- ^ You can move the new files over the already existing files of the previous release.