Configuration Miki's Kiwi Wiki on Noekeon.org: Difference between revisions
Jump to navigation
Jump to search
(→Extensions: Cite) |
|||
Line 98: | Line 98: | ||
* (2011-06-28) Extension [http://www.mediawiki.org/wiki/Extension:Cite/Cite.php Cite] |
* (2011-06-28) Extension [http://www.mediawiki.org/wiki/Extension:Cite/Cite.php Cite] |
||
** Version [http://upload.wikimedia.org/ext-dist/Cite-MW1.15-r48711.tar.gz r48711 for MediaWiki 15.x] |
** Version [http://upload.wikimedia.org/ext-dist/Cite-MW1.15-r48711.tar.gz r48711 for MediaWiki 15.x] |
||
* Extension [http://www.mediawiki.org/wiki/Extension:JsMath JsMath]. |
|||
== Installation == |
== Installation == |
Revision as of 14:39, 7 July 2011
Reference
Consult the User's Guide for information on using the wiki software.
Wiki Configuration
- Updated MediaWiki:Common.css.
- Support class="wikitable" (MediaWiki).
- Support for Template:Hidden
- Custom style for GeSHi
- Updated MediaWiki:Common.js
- Support for Template:Hidden
- Support for Template:Hide, Template:Hide all,Template:Show all, Template:Hide show all, Template:Toggle.
- Added a few templates:
- Updated MediaWiki:Sidebar
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 |
- File LocalSettings.inc.php:
- Enable file upload.
- Set logo (from http://sneak.co.nz/kiwi/ - resized to 135x135 max)
$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;
- Add directory https://kiwi.noekeon.org/miki/upload, to store big upload files.
- Create a fake index.html simulating listing of an empty upload directory.
- Users:
- 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:
- Extension SyntaxHighlight_GeSHi.
- Version r60735 (Jan 6, 2010) / GeSHi version 1.0.8.6.
- Old: Version r24298 (July 21, 2007) / GeSHi version 1.0.8.
Patched to restore old GeSHi 1.0.7 formatting and to support enclose="valid".Using a custome style in MediaWiki:Common.css.
- Version r60735 (Jan 6, 2010) / GeSHi version 1.0.8.6.
- (2009-09-05) Extension RawFile
- (2011-06-28) Extension Cite
- Version r48711 for MediaWiki 15.x
- Extension JsMath.
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
- Browse to https://kiwi.noekeon.org/miki/config/. Enter settings as given further.
- Move configuration file:
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
Backup
Some references:
- See Configuration Noekeon.org
- See Mediawiki guide to backup here
- See also here for complete procedure
My procedure:
- Copy this file to the wiki server, and make it executable.
backup_wiki
([{{#filelink: backup_wiki}} download])
{{#fileanchor: backup_wiki}}
#! /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
- Run this script on the machine where the backup files are to be saved (adapt the script to your needs):
~/bin/backup_noekeon
([{{#filelink: backup_noekeon}} download])
{{#fileanchor: backup_noekeon}}
#! /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; /usr/bin/nice -n 19 tar -cz miki/' > "$FFILENAME"
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