MediaWiki Server

From Worcester State University Computer Science Department Wiki
(Redirected from MediaWiki)
Jump to: navigation, search

Here's how we set up our MediaWiki install.

  • The first step is installing a CentOS server
    • It's entirely possible to set up using another distro or even in Windows, this just isn't what we did.
  • We followed this guide: Manual:Running_MediaWiki_on_Red_Hat_Linux#Red_Hat_Enterprise_Linux_6_or_CentOS_6.4
    • MediaWiki is a pretty straightforward php/MySQL application so for the most part this is just downloading, extracting, and setting up the MySQL database
  • Once you get to the install script, we used the following extensions that came with MediaWiki:
    • Cite
    • Interwiki
    • ParserFunctions
    • PdfHandler
    • Renameuser
    • SpamBlacklist
    • SyntaxHighlight GeSHi
    • Vector
    • WikiEditor
  • The next step is to set up the Wikipedia style URLs; ex. /wiki/article ths can be achieved by following this guide Manual:Short_URL/Apache.
    • We did not have to use an .htaccess file; instead we modified the apache config file at /etc/httpd/conf/httpd.conf and added the following lines:
RewriteEngine On

RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]
    • Next we edited LocalSettings.php and found the following lines:
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
## http://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "/mediawiki";
$wgScriptExtension = ".php";
      • and added these lines below them
$wgArticlePath = "/wiki/$1";
$wgUsePathInfo = true;
  • We installed the Google Apps Authentication Plugin.
    • In addition to steps in the plugin's page, you'll want to add the following line to LocalSettings.php
$wgUserrightsInterwikiDelimiter = '#';
      • This line informs MediaWiki that users with an '@' in their username are not users on another wiki. Otherwise you cannot edit users with an @ in their name, which is added automatically by the plugin (All users are user@worcester.edu after installing the plugin)