QNAPedia Community Wiki

Skip to content

Mediawiki

From QNAPedia

Revision as of 20:14, 10 November 2009 by Sarsene (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Introduction

Below are the instructions for installing Mediawiki 1.15.1 on a QNAP Pro 509 NAS server.

The instructions have been tested on the following systems:

  • QNAP 509 Pro (f/w 3.1.0 build 0627T)
  • QNAP 509 Pro (f/w 3.1.1 build 0815T)
  • QNAP 439 Pro (f/w 3.1.1 build 0815T)

I'm confident however that these instructions will apply for other QNAP types and f/w's as well (f/w = firmware ;-)).

The instructions are written for people with a little knowledge of Linux and using the Qnap management interface. I cannot be held responsible for any damage done with this manual. Installing this Mediawiki on your NAS should be quite harmless though. Follow these instruction at your own risk!

Please note that I assume that:

  1. You have admin access to you Qnap
  2. Your Qnap allows SSH connections
  3. Your Qnap Web server listens (will be listening) on port 80 (the default http port)



Enable the Qnap Webservice

This step can be skipped if you're sure that it's already running

  • Open your browser and connect to the web management interface of your Qnap. (https://nas of http://nas:8080)
  • Click on "Network Services" and then on "Web server"
  • Check: "Enable Web server" (of not already checked) and leave the rest of the available settings as they were.
  • Click on "Apply"

done...

Enable the MySQL Database engine

This step can be skipped if you're sure that it's already running

  • Open your browser and connect to the web management interface of your Qnap. (https://nas of http://nas:8080)
  • Click on "Applications" and then on "MySQL Server"
  • Check: "Enable MySQL Server" (of not already checked) and leave the rest of the available setting as they were.
  • click on "Apply"

done...

Download and install Mediawiki

  • Login to your nas with SSH as user: Admin
  • Go to the document root (/share/Qweb)
cd /share/Qweb
  • Download mediawiki 1.15.1 (note that the link below can be subject to change!)
wget download.wikimedia.org/mediawiki/1.15/mediawiki-1.15.1.tar.gz
  • Unpack the download Mediawiki package (a new directory will be created call ./mediawiki-1.15.1)
tar xvzf mediawiki-1.15.1.tar.gz
  • Link a more user friendly name to this new directory
ln -s mediawiki-1.15.1 mediawiki
  • Clean up the tar.gz file (we don't need that anymore)
rm -f mediawiki-1.15.1.tar.gz


Now you're all set for running Mediawiki's Setup wizard.

Setting up your Mediawiki

Open a web browser and go tho the your nas with the /mediawiki extension. For example: http://nas/mediawiki
Here's were the link we made earlier, comes in handy ;-)

Follow the instruction on your screen and choose the options that you would like to enable.

The only thing I'dd like to add is entering the root password. By default the Qnap's MySQL administrator (called: root) has it's password set to "admin". If you still have this password (or haven't changed this your self) then you can use this password for creating the mediawiki database.


After your done please keep in mind that by default no backup's are made of the Mediawiki database. You have to do this yourself.

Enabling file uploads

Default file uploads are disabled in Mediawiki. Here's how to enable that feature. Please note however that these settings can be different depending on your Mediawiki version.

You have to make a change to the file called "LocalSettings.php". This file can be found under the Qweb share in de directory mediawiki. The UNC path is \\nas\Qweb\mediawiki\LocalSettings.php while the path from a SSH session is /share/Qweb/mediawiki/LocalSettings.php.

The change to the file can be made from an SSH session (with vi) or by connecting to the Qweb share as an Admin user. Here I will describe the VI - way.

Tip: Use VIM instead of VI. Install IPKG with the QPKG package manager. After that (from the commandprompt with ssh) type: ipkg install vim


  • Login to your nas with SSH as user: Admin
  • Go to the mediawiki (/share/Qweb/mediawiki)
cd /share/Qweb/mediawiki
  • Edit the file "LocalSettings.php add two lines
vi LocalSettings.php

lines to add (can be added to the bottom of the file)

$wgEnableUploads = true; # Enable uploads                                                                             
$wgFileExtensions = array_merge($wgFileExtensions, array('doc', 'xls', 'pdf'));


Please note that the last line contains file-extensions that will be added to the extensions that were all ready allowed by default. You can add your own file-extensions.

That's it. You should be all done. Now it's time to read the mediawiki manual on how to actualy use it ;-)

Have fun!

Personal tools
Language