Difference between revisions of "MediaWiki"

From wiki
(list extensions)
(SyntaxHighlight & ParseFunctions install instructions)
Line 4: Line 4:
  
 
=== Get source ===
 
=== Get source ===
<syntaxhighlight lang="shell">
+
<syntaxhighlight lang="console">
cd /var/www
+
# cd /var/www
curl https://releases.wikimedia.org/mediawiki/1.26/mediawiki-1.26.2.tar.gz | tar xz
+
# curl https://releases.wikimedia.org/mediawiki/1.26/mediawiki-1.26.2.tar.gz | tar xz
chown -R www-data: mediawiki*
+
# chown -R www-data: mediawiki*
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 21: Line 21:
 
/mw-config
 
/mw-config
  
<syntaxhighlight lang="shell">
+
<syntaxhighlight lang="console">
 
chown root:www-data /etc/mediawiki/LocalSettings.php
 
chown root:www-data /etc/mediawiki/LocalSettings.php
 
chmod 640 /etc/mediawiki/LocalSettings.php
 
chmod 640 /etc/mediawiki/LocalSettings.php
Line 29: Line 29:
  
 
=== ParserFunctions ===
 
=== ParserFunctions ===
 +
This extension is bundled by default with mediawiki. You just need to activate it.
 +
 +
Add the line <code>wfLoadExtension( 'ParserFunctions' );</code> to the file <code>/var/www/mediawiki*/LocalSettings.php</code>
  
 
=== SyntaxHighlight ===
 
=== SyntaxHighlight ===
 +
This extension is bundled by default with mediawiki. You just need to activate it.
 +
 +
Add the line <code>wfLoadExtension( 'SyntaxHighlight_GeSHi' );</code> to the file <code>/var/www/mediawiki*/LocalSettings.php</code>
  
 
=== VisualEditor ===
 
=== VisualEditor ===

Revision as of 23:54, 1 January 2016


Warning Warning: This page is a work in progress and is not completed. Important informations might be missing or wrong.
Warning Warning: These instructions were only tested on Debian. It will probably work for other Linux distributions, but you might need to adapt the provided instructions.

Install Mediawiki

Warning Warning: Debian packages are currently unmaintained and outdated. This guide will install mediawiki from source. For your security, don't forget to follow upstream releases and update your installation.

Get source

# cd /var/www
# curl https://releases.wikimedia.org/mediawiki/1.26/mediawiki-1.26.2.tar.gz | tar xz
# chown -R www-data: mediawiki*

Configure Dns

This guide assume that you are using a dedicated subdomain for your wiki like https://wiki.example.com. Don't forget to point that domain to your webserver.

Configure Nginx

create certificate

update nginx config

/mw-config

chown root:www-data /etc/mediawiki/LocalSettings.php
chmod 640 /etc/mediawiki/LocalSettings.php

Install Extensions

ParserFunctions

This extension is bundled by default with mediawiki. You just need to activate it.

Add the line wfLoadExtension( 'ParserFunctions' ); to the file /var/www/mediawiki*/LocalSettings.php

SyntaxHighlight

This extension is bundled by default with mediawiki. You just need to activate it.

Add the line wfLoadExtension( 'SyntaxHighlight_GeSHi' ); to the file /var/www/mediawiki*/LocalSettings.php

VisualEditor