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

From miki
Jump to navigation Jump to search
Line 115: Line 115:
</source>}}
</source>}}
* It's done!
* It's done!

== Backup ==
Some references:
* See [[Configuration Noekeon.org]]
* See Mediawiki guide to backup [http://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki#Database here]
** See also [http://www.mediawiki.org/wiki/User:Flominator/Backup_MW here] for complete procedure

My procedure:
* Copy this file to the wiki server, and make it executable.
{{hiddenSourceFile||backup_wiki|<source lang="bash">
#! /bin/bash

# This script will create a backup of the MySQL databases used in Mediawiki wiki
# The backup is output to standard output (gzipped), so that the backup can easily be transferred
# over an ssh connection for instance
#

function usage()
{
echo "Usage:"
echo ""
echo " $0 local_settings_php"
echo ""
echo " where"
echo ""
echo " local_settings_php"
echo " is the path to the LocalSettings.php file containing the database name, password..."
echo ""
echo "Example:"
echo ""
echo " $0 ./LocalSettings.php > ~/backup/wiki-backup.sql.gz"
echo ""
exit 1
}

SETTINGS_FNAME=$1

[ -n "$SETTINGS_FNAME" -a -a "$SETTINGS_FNAME" ] || usage >&2

wgDBtype=$(cat "$SETTINGS_FNAME" | grep wgDBtype | egrep -o '".*"' | sed 's/"//g')
wgDBserver=$(cat "$SETTINGS_FNAME" | grep wgDBserver | egrep -o '".*"' | sed 's/"//g')
wgDBname=$(cat "$SETTINGS_FNAME" | grep wgDBname | egrep -o '".*"' | sed 's/"//g')
wgDBuser=$(cat "$SETTINGS_FNAME" | grep wgDBuser | egrep -o '".*"' | sed 's/"//g')
wgDBpassword=$(cat "$SETTINGS_FNAME" | grep wgDBpassword | egrep -o '".*"' | sed 's/"//g')

echo "Type : $wgDBtype" >&2
echo "Server : $wgDBserver" >&2
echo "Name : $wgDBname" >&2
echo "User : $wgDBuser" >&2
# echo "Password: $wgDBpassword" >&2

/usr/bin/nice -n 19 /usr/bin/mysqldump -u $wgDBuser -p$wgDBpassword -h $wgDBserver -c -e --hex-blob --add-drop-table $wgDBname | /usr/bin/nice -n 19 gzip -9
</source>
}}
* Run this script on the machine where the backup files are to be saved (adapt the script to your needs):
{{hiddenSourceFile|~/backup/|backup_noekeon.sh|<source lang="bash">
#! /bin/bash

# This script will create a backup of the miki wiki database on noekeon.org
# Backup will be saved in ~/backup

BACKUPDIR=~/backup
WIKINAME=www.noekeon.org_miki
FSQLNAME=$BACKUPDIR/wiki-$WIKINAME-$(date '+%Y%m%d').sql.gz
FFILENAME=$BACKUPDIR/wiki-$WIKINAME-$(date '+%Y%m%d').tar.gz

mkdir -p $BACKUPDIR

echo "Backing up the MySQL database to '$FSQLNAME'..."
ssh noekeon '~daemenj/private/backup_wiki ~daemenj/kiwi.noekeon.org/miki/LocalSettings.php' > "$FSQLNAME"

echo "Backing up the files & extensions to '$FFILENAME'..."
ssh noekeon 'cd ~daemenj/kiwi.noekeon.org; tar -cz miki/' > "$FFILENAME"
</source>
}}

Revision as of 15:43, 29 October 2009

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 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

Extensions

Here the list of extensions installed on the Wiki:

  • Extension SyntaxHighlight_GeSHi.
    • Version r24298 (July 21, 2007) / GeSHi version 1.0.8.
    • Patched to restore old GeSHi 1.0.7 formatting and to support enclose="valid".
  • (2009-09-05) Extension RawFile
    • Patched to add optional param to {{#filelink}}.

Installation

username: miki
pwd: ********
database: mikiwiki
email: miki@noekeon.org
  • 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!

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):