Help:Installation 1.3

From Edge of Darkness Wiki

Installation 1.3
Jump to: navigation, search

SMW admin manual

Download

Installation

Configuration

Concept caching

Troubleshooting

Repairing SMW's data

Extensions

Basic extensions

Semantic extensions

SPARQL endpoint

SMW user manual

This page describes how to install Semantic MediaWiki 1.3 after having downloaded it (see the bottom of this page for other versions). Installation notes change from version to version: the file INSTALL shipped with SMW contains instructions for the particular version you may have downloaded.

For installing SMW, please check the exact requirements and follow the instructions carefully. The installation does no irreversible changes to your MediaWiki database (it just adds some tables that can be deleted again). However, there is currently no automated process to remove annotations from articles texts in the case that Semantic MediaWiki is to be uninstalled again, but one could achieve this with some script that eliminates annotations on editing.

Contents

Disclaimer

Make sure you understand the legal disclaimer in the file COPYING.

Requirements

Notes:

 $smwgQSubcategoryDepth=0;
 $smwgQPropertyDepth=0;
 $smwgQFeatures        = SMW_ANY_QUERY & ~SMW_DISJUNCTION_QUERY;
 $smwgQConceptFeatures = SMW_ANY_QUERY & ~SMW_DISJUNCTION_QUERY & ~SMW_CONCEPT_QUERY;

Installation

If you upgrade an existing installation of Semantic MediaWiki, also read the remarks in the section Upgrading existing installations below! Installing SMW basically requires three (or four) easy steps:

(1) Copy files.  Extract the downloaded archive, or check out the current files from SVN to obtain the directory "SemanticMediaWiki" that contains all relevant files. Copy this directory to "[wikipath]/extensions/" (or extract/download it to this place). We abbreviate "[wikipath]/extensions/SemanticMediaWiki" as "[SMW_path]" below.

(2) Enable the extension.  Insert the following two lines into the file "[wikipath]/LocalSettings.php":

include_once('extensions/SemanticMediaWiki/includes/SMW_Settings.php');
enableSemantics('example.org');

where example.org should be replaced by your server's name (or IP address). This string is only used as a globally unique name for identifying the wiki's exported data on the Semantic Web, and a valid server name works very well for that purpose. There is no need to worry if a wiki has more than one server name – just pick one.

(3) Perhaps Adjust namespaces.  Semantic MediaWiki uses ten additional namespace indexes, in the range from 100 to 109. 100 and 101 are only needed if $smwgSMWBetaCompatible is set. 106 and 107 are reserved for the SemanticForms extension and not used by SMW. If you have your own custom namespaces, you have to set the parameter $smwgNamespaceIndex before including SMW_Settings.php. See the documentation $within SMW_Settings.php for details. If you add more namespaces later on, then you have to assign them to higher numbers than those used by Semantic MediaWiki.

Semantic MediaWiki only evaluates semantic annotations in some namespaces. For example, by default it ignores semantic annotations in talk pages. If you want to change the namespaces with annotations (likely if you have added your own custom namespaces), then you have to change the array variable $smwgNamespacesWithSemanticLinks in SMW_Settings.php.

(4) Setup database.  In your wiki, log in as a user with admin status and go to the page "Special:SMWAdmin" to do the final setup steps. This can also be done with the command-line PHP script SMW_setup.php. See [SMW_path]/maintenance/README for details on runnning this.

There is currently no working Postgres support. If you need that, please contact the developers and support them in adjusting SMW appropriately.

Testing your Installation

If you are uncertain that everything went well, you can do some testing steps to check if SMW is set up properly.

Go to the Special:Version page and you should see Semantic MediaWiki (version nn) listed as a Parser Hook and several wfSMWXxxx functions listed as Extension Functions.

Create a regular wiki page named "TestSMW", and in it enter the wiki text

Property test:  [[testproperty::Dummypage]]

When previewing the page before saving, you should see a Factbox at the bottom of the article that shows your input. After saving the page, click on the link "Browse properties" in the page's toolbox. This view should show Testproperty with value Dummypage.

Running SMW on older versions of MediaWiki

In general, it is not recommended to run older versions of MediaWiki, since every new release brings also security fixes. If your site is still running on PHP4, SMW is not supported. It would hardly be possible to backport the code to the old PHP version. If you have PHP5 but an older MediaWiki version, additional patches/modifications might be needed. Download an older release of SMW and have a look at the included INSTALL instructions to find out whether other changes are recommended therein.

Upgrading existing installations

SMW 1.3 does not require major steps for upgrading from SMW 1.2. You can follow the same steps as for new installations above (you just do not need to edit LocalSettings.php). Especially, you must trigger the SMW database setup via Special:SMWAdmin or using the script SMW_setup.php. Further actions may be required only if one of the following applies to you.

If you still use a version before SMW 1.2, follow the upgrading instructions given at Help:Installation_1.2#Notes_on_Upgrading, or SMW will not be working any more. If you have a version that is even older than SMW 1.0, then read the installation steps given for your version in the installation instructions for SMW 1.1.

If you use imported vocabulary, you will have to re-store the data for all pages that use the property imported from. This can often be done manually by just editing those (typically few) pages. If there are many affected pages, use the script to repair all data at once.

If you use concepts, then it might be useful to re-store the data for the concept pages, but only if you are interested in using the new concept caching features of SMW. Otherwise concepts will also continue to work normally without taking any actions.

Changed configuration options

Some configuration options (used in LocalSettings.php) have changed since SMW 1.0. All settings are documented in detail in the file SMW_Settings.php. The following list gives the version in which a setting was first introduced, so it can be ignored if you already run this version or a more recent one.

 $smwgQFeatures        = SMW_ANY_QUERY & ~SMW_DISJUNCTION_QUERY;
 $smwgQConceptFeatures = SMW_ANY_QUERY & ~SMW_DISJUNCTION_QUERY & ~SMW_CONCEPT_QUERY;

If you currently set any of these parameters in your LocalSettings.php, you need to update this file. Please see SMW_Settings.php for more documentation on the available parameters.

This documentation page applies to all SMW versions from 1.3 to 1.3.
Other versions: 1.4.3 – 1.4.3, 1.4.2 – 1.4.2, 1.4.0 – 1.4.1, 1.2 – 1.2.2, 1.1 – 1.1.2      

Help:Installation en 1.3 1.3

Personal tools
Namespaces
Variants
Actions
Navigation
games
Toolbox