CategoryProposedDeletion - shouldn't this information be in README.Debian in the mediawiki package?


An open source wiki engine which is is available under the GNU General Public License and developed on ?SourceForge via CVS.

It's used in ?WikiMedia Foundation projects (?WikiPedia, Wiktionary, Wikisource, Wikibooks....)

See: http://www.mediawiki.org/

Installation

Etch

IN CONSTRUCTION - HELP IS VERY WELCOME

The mediawiki package is a dummy package made up of mediawiki1.7 and mediawiki1.7-math. To install, enter:

See the README at /usr/shared/doc/mediawiki1.7/README.Debian.gz

MediaWiki also suggests the following packages, which you may want to install these optional features:

Japanese, Korean and Thai, and it supports Vietnamese

CONFIGURATION:

The configuration uses an easy web-based system. It will ask you a lot of questions to set up the configuration. Just go to this URL:

Then copy the generated configuration to the real system location:

After being configured, you should begin your surf on your new wiki using this url:

Lenny

This instructions describe the installation of a monosite wiki on a LAMP server.

After the installation, the wiki will be avalaible on [http://www.writingservicescompany.com/ term papers]:

Install mediawiki package :

# apt-get install mediawiki php5-gd

Uncomment the alias line in /etc/mediawiki/apache.conf :

Alias /mediawiki /var/lib/mediawiki

Restart apache and go to http://www.myserver.org/mediawiki/config/index.php and fill in the form.

Copy settings in /etc/mediawiki/ and change file permissions :

# mv /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki/LocalSettings.php
# chgrp www-data /etc/mediawiki/LocalSettings.php
# chmod o= /etc/mediawiki/LocalSettings.php

You are ready to surf on your new wiki using this url:

sid

$ apt-get install mediawiki mediawiki-math

Install mysql, and setup this apache configuration:

<VirtualHost *>
    ServerName wiki.yourdomain.com
    ServerAdmin your@email

    RewriteEngine on
    RewriteRule (.*) /var/lib/mediawiki/$1

    <Directory /var/lib/mediawiki/>
        Options +FollowSymLinks
        AllowOverride All
        order allow,deny
        allow from all
    </Directory>

    # some directories must be protected
    <Directory /var/lib/mediawiki/config>
        Options -FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/lib/mediawiki/upload>
        Options -FollowSymLinks
        AllowOverride None
    </Directory>
</VirtualHost>

restart apache and go to http://wiki.yourdomain.com/config/index.php, fill in the form, copy ?LocalSettings to /etc/mediawiki/LocalSettings.php and that's it.

Configuration

changing the address to /wiki

The default address is:

http://wiki.domain.org/index.php/Main_Page

but this is nicer:

http://wiki.domain.org/wiki/Main_Page

To have that, change this in your apache configuration:

-    RewriteEngine on
-    RewriteRule (.*) /var/lib/mediawiki/$1
+    Alias /wiki /var/lib/mediawiki/index.php
+    Alias /index.php /var/lib/mediawiki/index.php
+    Alias /skins /var/lib/mediawiki/skins
+    Alias /images /var/lib/mediawiki/images
+    Alias / /var/lib/mediawiki/index.php

and add this to your /etc/mediawiki/LocalSettings.php:

$wgArticlePath       = "/wiki/$1";

Don't forget to clean the cache and cookies in your browser, otherwise it may look like it doesn't work for you, while it does.

Extensions

There is many extensions for Mediawiki. Somes are provided by packages (mediawiki-*) but you can install other extensions in /var/lib/mediawiki/extensions/

To activate an extension, create a php script in /etc/mediawiki-extensions/extensions-available/ and run the command mwenext.

To disable a script, use the mwdisext command.

FCKeditor

For replacing the default editor by FCKeditor, you must :

  1. Download FCKeditor for mediawiki Mediawiki FCKeditor extensions

  2. Unzip the archive and copy files in /var/lib/mediawiki/extensions/
  3. Create the following script FCKeditor.php in /etc/mediawiki-extensions/extensions-available/

<?php
   require_once("extensions/FCKeditor/FCKeditor.php");
?>
  1. Enable the extension

# mwenext FCKeditor.php

source code highlighting

$ apt-get install mediawiki-extensions
$ mwenext SyntaxHighlight_GeSHi.php

See man mwenext for info how it works.

When you do changes like this one, don't forget that mediawiki uses cache, so if some page still shows the old code, you need to purge the cache, for example by loading the page with "?action=purge" added to the end of its URL.

Moving mediawiki to another server (=archiving+restoring)

Setup the wiki as described above, except creating the database. Copy /etc/mediawiki/LocalSettings.php from the old server to the new server.

Setup a tunnel

$ ssh -L 3306:localhost:3306 server

Test the connection:

$ mysql -h 127.0.0.1 -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 25383
Server version: 5.0.51-2 (Debian)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> Bye

Create a database dump (read the "database_name" from /etc/mediawiki/LocalSettings.php)

$ mysqldump database_name -h 127.0.0.1 -u root -p > db.sql

Create the tunnel to the other computer:

$ ssh -L 3306:localhost:3306 server2

Create the database:

$ mysql -h 127.0.0.1 -u root -p
mysql> create database wikidb;
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
    -> ON wikidb.*
    -> TO 'wikiuser'@'localhost'
    -> IDENTIFIED BY 'some_password';
Query OK, 0 rows affected (0.01 sec)

mysql> Bye

Restore the database:

$ mysql wikidb -h 127.0.0.1 -u root -p < db.sql

Copy the images from /var/lib/mediawiki/images from the old server to the new server by hand.

When the database already exists and you just want to update it, still use the command above, it will do the right thing. Another variation of the above command is

$ gunzip < wikidb.sql.gz | mysql -h 127.0.0.1 -u root -ppassword wikidb

References

MySQL:

phpMyAdmin:


CategoryProposedDeletion