Wikibase/Suite

Introduction
A Wikibase install often consists of the following elements:


 * An RDBMS (MariaDB/MySQL or SQLite) [ required ]
 * MediaWiki [ required ]
 * The Wikibase extension [ required ]
 * Other related extensions [ optional ]
 * The Wikidata query service (WDQS) [ optional ]
 * The WDQS proxy
 * The WDQS frontend
 * QuickStatements [ optional ]
 * Elasticsearch [ optional ]

The [https://wikiba.se/install Docker install] contains all these components and can be started with a single   command. This install meets the needs of many Wikibase users, especially those just starting out.

However, for those not wanting to run Docker (because of additional administrative overhead, scaling issues in production, or a desire to understand the components better), here's how to install each component manually.

Network configuration
Consult the network description and diagram: https://wikiba.se/maint

Before you dive in
There's a large amount of technical documentation to be read and enjoyed at the [https://doc.wikimedia.org/Wikibase/master/php/index.html Wikibase technical doc site].

To successfully navigate this process, you should probably have:


 * Familiarity with Linux and web server software
 * One or more servers on which you have permissions to install software

Instructions
The MediaWiki install linked in the next step relies on a running RDBMS with a database and user already created.

We recommend using MariaDB, and though a full installation guide is outside of the scope of this document, start with [https://mariadb.com/kb/en/documentation/ this excellent collection of documentation] and [https://www.mariadbtutorial.com/mariadb-basics/ this tutorial].


 * Create a database
 * User account management

Instructions
Working MediaWiki nginx config

Optional sidebar
If you'd like to add some Wikibase-related links to your main page sidebar, you can add [https://phab.wmfusercontent.org/file/data/6753kdd4tue235lhxwoe/PHID-FILE-5n4sat6x3amjjhdnuz4f/raw-paste-data.txt these configuration stanzas] to your LocalSettings.php.

OAuth
Wikibase needs the OAuth extension for the 1>#Wikidata Query Service|Wikidata query service, as you'll see below.

Installation
The 1>Special:MyLanguage/Extension:OAuth|OAuth install instructions are comprehensive. Note that you'll benefit from a working understanding of <tvar|1></> to finish this install.

Wikidata Query Service
The Wikidata Query Service (WDQS), which consists of the Blazegraph SPARQL query backend and its updater, can be and often is used in conjunction with Wikibase.

Instructions
While intrepid users may wish to 1>Special:MyLanguage/Wikidata Query Service/Implementation#Labs Deployment</>|compile their own instance of WDQS, we recommend using the precompiled version.


 * Download the desired version from [<tvar|url> https://archiva.wikimedia.org/repository/releases/org/wikidata/query/rdf/service</> Archiva].
 * <tvar|1>0.3.42 </> is the recommended version as of this writing, September 2020. However, expect this information to be updated with the 1>Special:MyLanguage/MediaWiki 1.35</>|impending MediaWiki release.
 * To configure the query service, consult both the [<tvar|url>https://wikitech.wikimedia.org/wiki/Wikidata_query_service#Notes_about_running_the_service_on_non-WMF_infrastructure Wikitech</> WDQS guide] and the 1>Special:MyLanguage/Wikidata Query Service/User Manual|</>WDQS user manual.
 * In particular, configure <tvar|1>RWstore.properties</> as noted here:.
 * See also these [<tvar|url>https://github.com/wmde/wikibase-docker/blob/master/wdqs/README.md</> WDQS Docker image configuration tips].

Instructions

 * Install Elasticsearch 6.5.4 (refer to [<tvar|url>https://www.elastic.co/guide/en/elasticsearch/reference/6.5/install-elasticsearch.html</> its install instructions] ).
 * ES's install process will prompt you to install [<tvar|url>http://jdk.java.net/archive/</> OpenJDK].
 * Install the aforementioned extensions on your MediaWiki instance:
 * Install the aforementioned [<tvar|url>https://www.elastic.co/guide/en/elasticsearch/plugins/6.5/plugin-management.html</> Elasticsearch plugins] using these commands:
 * Install the aforementioned [<tvar|url>https://www.elastic.co/guide/en/elasticsearch/plugins/6.5/plugin-management.html</> Elasticsearch plugins] using these commands:
 * Install the aforementioned [<tvar|url>https://www.elastic.co/guide/en/elasticsearch/plugins/6.5/plugin-management.html</> Elasticsearch plugins] using these commands:
 * Install the aforementioned [<tvar|url>https://www.elastic.co/guide/en/elasticsearch/plugins/6.5/plugin-management.html</> Elasticsearch plugins] using these commands:
 * Modify <tvar|1> </> as needed:
 * Name your cluster with the <tvar|1></> directive.
 * Make a single-node cluster:
 * Set <tvar|1></> as needed
 * Modify <tvar|1></> as needed (above all, set <tvar|2> </> and <tvar|3> </> based on the amount of memory available to your host)

Instructions

 * Download and install [<tvar|url>https://github.com/magnusmanske/quickstatements</> QuickStatements from GitHub].
 * Make changes to config.json as needed. Lines to change include but are not limited to:
 * <tvar|1>publicMwOAuthUrl</> and <tvar|2>MwOAuthUrl</>: set to your Wikibase instance's OAuth URL (<tvar|3> </>)
 * api:
 * pageBase:
 * toolBase:

For more information, consult the [<tvar|url>https://github.com/wmde/wikibase-docker/blob/master/quickstatements/README.md</> Docker image README].

Reference

 * Wikibase Docker repo on GitHub
 * Docker install instructions