Configuration Miki's Kiwi Wiki on Noekeon.org: Difference between revisions

From miki
Jump to navigation Jump to search
No edit summary
Line 62: Line 62:
** Enable '''file upload'''.
** Enable '''file upload'''.
** Set logo (from http://sneak.co.nz/kiwi/ - resized to 135x135 max)
** Set logo (from http://sneak.co.nz/kiwi/ - resized to 135x135 max)
{{pl2|<source lang="php">
{{pl2|1=<source lang="php">
$wgEnableUploads = true;
$wgEnableUploads = true;
...
...
Line 70: Line 70:
** Change supported upload file types (added 'pdf' and 'zip').
** Change supported upload file types (added 'pdf' and 'zip').
** Restrict anonymous editing (edit requires user to login)
** Restrict anonymous editing (edit requires user to login)
{{pl2|<source lang="php">
{{pl2|1=<source lang="php">
$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'pdf', 'zip' );
$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'pdf', 'zip' );
...
...
Line 83: Line 83:
:: real name: '''Mike'''
:: real name: '''Mike'''
* Setup '''favicon.ico''' (this [[Media:Favicon kiwi-32x32.png|file]]), but saved as <tt>/favicon.icon</tt> (because otherwise Opera does not display it, go figure why).<br/>Edit file <tt>./includes/DefaultSettings.php</tt>:
* Setup '''favicon.ico''' (this [[Media:Favicon kiwi-32x32.png|file]]), but saved as <tt>/favicon.icon</tt> (because otherwise Opera does not display it, go figure why).<br/>Edit file <tt>./includes/DefaultSettings.php</tt>:
{{pl2|<source lang="php">
{{pl2|1=<source lang="php">
$wgFavicon = '/favicon.icon';
$wgFavicon = '/favicon.icon';
</source>}}
</source>}}
Line 147: Line 147:
* and go to [http://mail.priorweb.be/ Priorweb mailmanager] to create email address (see <tt>$wgEmergencyContact</tt>)
* and go to [http://mail.priorweb.be/ Priorweb mailmanager] to create email address (see <tt>$wgEmergencyContact</tt>)
* then ssh to <tt>daemenj@ftp.noekeon.org</tt>:
* then ssh to <tt>daemenj@ftp.noekeon.org</tt>:
{{pl2|<source lang="bash">
<source lang="bash">
cd kiwi.noekeon.org/
cd kiwi.noekeon.org/
wget http://download.wikimedia.org/mediawiki/1.13/mediawiki-1.13.0.tar.gz
wget http://download.wikimedia.org/mediawiki/1.13/mediawiki-1.13.0.tar.gz
Line 154: Line 154:
cd miki
cd miki
chmod +w config
chmod +w config
</source>}}
</source>
* Browse to '''https://kiwi.noekeon.org/miki/config/'''. Enter settings as given further.
* Browse to '''https://kiwi.noekeon.org/miki/config/'''. Enter settings as given further.
* Move configuration file:
* Move configuration file:
{{pl2|<source lang="bash">
<source lang="bash">
mv config/LocalSettings.php .
mv config/LocalSettings.php .
chmod 600 LocalSettings.php
chmod 600 LocalSettings.php
rm -r config
rm -r config
</source>}}
</source>
* It's done!
* It's done!


Line 167: Line 167:
* Version '''mediawiki 1.15.1'''
* Version '''mediawiki 1.15.1'''
* Update procedure explained in <tt>UPGRADE</tt>:
* Update procedure explained in <tt>UPGRADE</tt>:
{{pl2|<source lang="bash">
<source lang="bash">
mv miki miki-old
mv miki miki-old
tar -xvzf mediawiki-1.15.1.tar.gz
tar -xvzf mediawiki-1.15.1.tar.gz
Line 182: Line 182:
rm -r ../miki-old
rm -r ../miki-old
# Don't forget to remove miki-old when everything's fine
# Don't forget to remove miki-old when everything's fine
</source> }}
</source>




Line 208: Line 208:
My procedure:
My procedure:
* Copy this file to the wiki server, and make it executable.
* Copy this file to the wiki server, and make it executable.
{{pl2|
{{pl2|1=
{{hidden|<tt>backup_wiki</tt>
{{hidden|1=<tt>backup_wiki</tt>
([{{#filelink: backup_wiki}} download])|{{#fileanchor: backup_wiki}}
([{{#filelink: backup_wiki}} download])|2={{#fileanchor: backup_wiki}}<source lang="bash">
<source lang="bash">
#! /bin/bash
#! /bin/bash


Line 257: Line 256:


* Run this script on the machine where the backup files are to be saved (adapt the script to your needs):
* Run this script on the machine where the backup files are to be saved (adapt the script to your needs):
{{pl2|
{{pl2|1=
{{hidden|<tt>~/bin/backup_noekeon</tt>
{{hidden|1=<tt>~/bin/backup_noekeon</tt>
([{{#filelink: backup_noekeon}} download])|{{#fileanchor: backup_noekeon}}
([{{#filelink: backup_noekeon}} download])|2={{#fileanchor: backup_noekeon}}
<source lang="bash">
<source lang="bash">
#! /bin/bash
#! /bin/bash

Revision as of 10:14, 16 January 2014

Reference

Consult the User's Guide for information on using the wiki software.

Wiki Configuration

Host-Side Configuration

  • Wiki configuration settings during install:
Field Value Field Value
Wiki name miki email address auth enabled
contact e-mail ($wgEmergencyContact) miki@noekeon.org ($wgDBtype) database type MySQL
Language en - English ($wgDBserver) database host mysqlhost (as said on Priorweb's controlpanel)
Copyright no license ($wgDBname) database name mikiwiki
Admin username mikiadmin ($wgDBuser) DB username miki
Admin pwd ******** ($wgDBpassword) DB password ********
Object caching no caching su account <unchecked>
Email features enabled DB table prefix <none>
user-to-user email enabled Storage engine InnoDB
email notification enabled (discussion & watchlist) database character set MySQL 4.1/5.0 binary
$wgEnableUploads = true;
...
$wgLogo = "$wgScriptPath/kiwi.png";
  • File includes/DefaultSettings.php:
    • Change supported upload file types (added 'pdf' and 'zip').
    • Restrict anonymous editing (edit requires user to login)
$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'pdf', 'zip' );
...
$wgGroupPermissions['*'    ]['edit']             = false;
user: mip
pwd: ********
email: miki.mip@noekeon.org
real name: Mike
  • Setup favicon.ico (this file), but saved as /favicon.icon (because otherwise Opera does not display it, go figure why).
    Edit file ./includes/DefaultSettings.php:
$wgFavicon                       = '/favicon.icon';

Extensions

Here the list of extensions installed on the Wiki:

SyntaxHighlight_GeSHi.
  • (2007-07-21) Version r24298 / GeSHi version 1.0.8.
  • (2010-01-06) Version r60735 / GeSHi version 1.0.8.6.
  • Patched to restore old GeSHi 1.0.7 formatting and to support enclose="valid". Using a custome style in MediaWiki:Common.css.
  • (2013-01-15) Use version bundled in MV 1.22.1
Cite
RawFile
  • (2009-09-05) Version 0.2
    • Patched to add optional param to {{#filelink}}.
    • Patched to allows using html attribute class instead of {{#fileanchor}}
  • (2013-01-15) Version 0.4.1
  • (2013-01-15) DISABLED — conflict with MW 1.22.1.
MathJax
  • Keep default configuration
# Extension:MathJax
require_once "$IP/extensions/MathJax/MathJax.php";
# $wgParserCacheType = CACHE_NONE;  // See http://www.mediawiki.org/wiki/Extension:MathJax


Here the list of extensions that are no longer installed on the Wiki:

JsMath.
  • DEPRECATED — no longer used, replaced by Extension:Math / MathJax (better rendering, more powerful, easier to install, and jsMath is no longer updated).
Math
  • DEPRECATED — We don't use this extension anymore, but use MathJax extension instead (which allows for $...$ formulas).
  • Configure Math to use MathJax javascript engine for much better results.
require_once "$IP/extensions/Math/Math.php";
// Set this if you don't use MediaWiki Math's texvc:
# $wgTexvc =  '/your/path/to/texvc';

$wgUseMathJax = true; // enabeling MathJax as rendering option
$wgDefaultUserOptions['math'] = MW_MATH_MATHJAX; // setting MathJax as default rendering option (optional)
/**
 * The default parser for MathJax is 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML'
 * If you don't want to or can't use the default and your run your own locally
 * replace the below url with something like:
 * $wgMathJaxUrl = '/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML';
 */
$wgMathJaxUrl = 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML';
MathJax_Parser::$do_dollar = false;

Installation

  • Version mediawiki 1.13.0.
  • First go to Priorweb control panel, MySQL section, and creates new user (see $wgDBname, $wgDBuser and $wgDBpassword above)
  • and go to Priorweb mailmanager to create email address (see $wgEmergencyContact)
  • then ssh to daemenj@ftp.noekeon.org:
cd kiwi.noekeon.org/
wget http://download.wikimedia.org/mediawiki/1.13/mediawiki-1.13.0.tar.gz
tar -xvzf mediawiki-1.13.0.tar.gz
mv mediawiki-1.13.0 miki
cd miki
chmod +w config
mv config/LocalSettings.php .
chmod 600 LocalSettings.php
rm -r config
  • It's done!

Upgrade

  • Version mediawiki 1.15.1
  • Update procedure explained in UPGRADE:
mv miki miki-old
tar -xvzf mediawiki-1.15.1.tar.gz
mv mediawiki-1.15.1 miki
cp miki-old/LocalSettings.php miki
cp -r miki-old/images miki
cp -r miki-old/extensions miki
rm -r miki/config
cd miki
cp AdminSettings.sample AdminSettings.php
vi AdminSettings.php                          # Edit the file as necessary
cd maintenance
php update.php
rm -r ../miki-old
# Don't forget to remove miki-old when everything's fine


  • Version mediawiki 1.22.1
  • Not really an upgrade, but reinstall. Upgrade caused issue with the new short-URL, and our LocalSettings.php was too old.
mv miki oldmiki 
wget http://download.wikimedia.org/mediawiki/1.22/mediawiki-1.22.1.tar.gz 
tar -xvzf mediawiki-1.22.1.tar.gz
mv mediawiki-1.22.1 miki
cp -iar oldmiki/images miki
cp -iar oldmiki/upload miki
cp oldmiki/kiwi.png miki

Backup

Some references:

My procedure:

  • Copy this file to the wiki server, and make it executable.
  • Run this script on the machine where the backup files are to be saved (adapt the script to your needs):

To restore a MediaWiki backup on a local LAMP server (see also [3] for DB creation, and [4] for MySQL restore command):

MYSQL_HISTFILE=/dev/null  mysql --user=root -p mysql
mysql> CREATE DATABASE mikiwiki;
mysql> GRANT ALL PRIVILEGES ON mikiwiki.* TO miki@localhost IDENTIFIED BY '********';
mysql> quit
#Restore the wiki files
sudo mkdir /var/www/miki
cd /var/www/miki
sudo tar --strip 1 -xvzf ~/backup/wiki-20091111-www.noekeon.org_miki.daily.tar.gz
sudo chown -R www-data /var/www/miki
sudo chgrp -R www-data /var/www/miki
#Edit /var/www/miki/LocalSettings.php to match current config
sudo vi /var/www/miki/LocalSettings.php
# ... $wgDBserver="localhost"

# Restore the SQL backup (! note that mikiwiki is not the password, but the db name !!!):
gunzip < wiki-20091111-www.noekeon.org_miki.daily.sql.gz | mysql -u miki -p mikiwiki
# ... enter password for user miki

To Do

  • DONE — Upgrade jsMath to MathJax (see also [5]) (this requires MediaWiki 1.19 or higher)