Category:Help

From Jeff's Weather Service ~ Wiki Page
Jump to: navigation, search

Media Wiki Help

MediaWiki Home page

MediaWiki

MediaWiki Cheatsheet

Wikipedia Cheatsheet 

MediaWiki Reference Card

[http://meta.wikimedia.org/wiki/File:MediaWikiRefCard.png MediaWiki Reference

Card]

MediaWiki User Guide

MediaWiki User Guide

Wiki How To

Wiki How To


How do I install MediaWiki?

Link:

Installation

To install mediawiki:

# yum install mediawiki
# yum install mediawiki-math
# yum install LabPlot
# yum install mysql mysql-server mysql-libs  php-mysql perl-DBD-MySQL

Setup mysql database:

Turn on mysql first

# service mysqld start
# chkconfig mysqld on

Set root password

# mysqladmin -u root password pass

To reset root password

# service mysqld stop
# mysqld_safe --skip-grant-tables &
# mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("pass") where User='root';
mysql> flush privileges;
mysql> quit;
# service mysqld stop
# service mysqld start


Create database

# mysql -u root -p pass
mysql> create database wikidb;
mysql> grant index, create, select, insert, update, delete, alter, lock

tables on wikidb.* to 'wikiuser'@'localhost' identified by 'password';

If your database is not running on the same server as your web server, you need to give the appropriate web server hostname -- mediawiki.example.com in my example -- as follows:

grant index, create, select, insert, update, delete, alter, lock tables on

wikidb.* to

'wikiuser'@'mediawiki.example.com' identified by 'password';

Then, go to following website to following the instructions to install the wiki page:

wiki/index/php


How do I uninstall Mediawiki?

Link:

Uninstallation

Steps:

# rm -rf /var/www/mediawiki
# mysql -u root -p pass
mysql> DROP DATABASE wikidb;


How do I backup Wiki?

This the primary way to backup the wiki database:

/usr/bin/mysqldump --skip-opt --add-locks -u $USER --password=$PASSWORD \ 
$DATABASE -c | /bin/nice -n 19 /bin/gzip -9 > $BACKUPDIR/$DATABASE.sql.gz

Use this backup command line to preserve character set:

/usr/bin/mysqldump --skip-opt --add-locks -u $USER --password=$PASSWORD \
--default-character-set=$CHARSET $DATABASE -c | \ 
/bin/nice -n 19 /bin/gzip -9 > $BACKUPDIR/$DATABASE-$CHARSET.sql.gz

Backup Wiki to XML doc:

php $WIKIDIR/maintenance/dumpBackup.php --current

--output=gzip:$BACKUPDIR/$DATABASE.xml.gz

Variables used:

$USER = MYSQL username

$PASSWORD = MYSQL password

$DATABASE = MYSQL database name (In this case: wikidb)

$BACKUPDIR = Backup directory where you wish to store the wiki backup.

$CHARSET = latin1

How do I restore Wiki?

First, install mediawiki, mysql, mysql-server, etc.

yum install mediawiki mediawiki-math mysql mysql-server LabPlot

Then, assign the root password for mysql:

mysqladmin -u root password NEWPASSWORD
Click here for more information:

[http://www.cyberciti.biz/faq/mysql-change-root-password/ http://www.cyberciti.biz/faq/mysql-change-root-password/]

To restore wiki using mysql command lines:

gunzip $BACKUPDIR/$DATABASE.sql.gz
mysql -u wikiuser -p
mysql> use wikidb;
mysql> mysql > $BACKUPDIR/$DATABASE.sql


Fixing Wiki errors, after importing:

If receiving these errors "cannot be null" try the following:

mysql -u wikiuser -p
mysql> use wikidb;
mysql> ALTER TABLE jws_text MODIFY COLUMN old_id int(10) UNSIGNED NOT NULL

AUTO_INCREMENT;

mysql> ALTER TABLE jws_revision MODIFY COLUMN rev_id(10) UNSIGNED NOT NULL

AUTO_INCREMENT;

mysql> ALTER TABLE jws_recentchanges MODIFY COLUMN rc_id int(10) UNSIGNED NOT

NULL AUTO_INCREMENT;

mysql> quit

Bye

Pages in category "Help"

This category contains only the following page.