User:Al Maghi/Industrialization guide/Archive

Guidebook to industrialize production of wikis running on MediaWiki engine. It describes the whole process, in 3 major steps: Installation, Configuration & Importation of basic-content.


 * ''This is a draft version. Be bold and improve it!


 * This is not a technical reference manual, it is a guidebook to industrialize wiki production.

Overview
Network administration:
 * The first role is to be responsible for the MediaWiki server; you need someone at ease with web server administration.
 * As a network administrator, he is responsible for back-up, upgrade, accessibility and security of the web server.
 * All he has to be furthermore responsible for is to install and set up MediaWiki to serve the chosen URL, to accept file upload and to render LaTeX formula; and then to open up an ftp access for the second role.

MediaWiki configuration:
 * The second role is to be responsible for the MediaWiki configuration; you need someone to be responsible for the wiki functionalities. Let’s call him super-user.
 * He needs an ftp access to LocalSettings.php file, /extensions and /skins folders.
 * He has to be available for wiki users to set up the desired functionalities.

Management:
 * Other roles are about wiki administration and edition:
 * Bureaucrats: they manage user rights
 * Administrators: they edit MediaWiki interface and skin, through MediaWiki namespace. They delete unused content. They categorize, write templates, do maintenance.
 * Users: they read and edit the wiki.

Processing a MediaWiki production

 * 1) Installation of Mediawiki server (Linux, Apache, MySQL, PHP): creation of databases, configuration of user authentification, installation of server tools. → Server administrator.
 * 2) Configuration of MediaWiki wiki-web-site: extensions, user rights definition, browser interface and skin. → MediaWiki expert.
 * 3) Management of usage: architecture of content & user management. → Knowledge Manager.

Installing MediaWiki web server, with a network administrator
All the network admin needs to know is:
 * Name of the wiki
 * Language of the wiki
 * E-mail contact of the super-user
 * Username of the super-user
 * Chosen URL of the wiki
 * For user registration,
 * is the LDAP authentication wanted?
 * By default managers create accounts for users. Is it preferred that a potential user ask for an account then managers confirm account creation? Then a ConfirmAccount extension would be installed.

Once he has finished he shall give an ftp access to LocalSettings.php, to /extensions, and to /skins. Back-up, upgrade, accessibility and security of the web server is under his responsibility.

Manuals: http://www.mediawiki.org/wiki/Installation http://www.mediawiki.org/wiki/Category:Installation

Install a MySQL-PHP web server on the desired network
Install an AMP server with latest versions of Apache, MySQL and PHP. You can choose to create a virtual server. You can if you prefer use an IIS server and/or a PostgreSQL database.
 * In php.ini change post_max_size and upload_max_filesize parameters so that wiki users will be able to upload large files, such as 1Go. (Manual:Configuring file uploads)
 * Install ImageMagick on the server. Note the command path.

Create a database and its associated user
Create a MySQL database called wikidb and a MySQL user called wikiuser, with a password of your choice that you will afterward indicate in.

Create a MediaWiki directory in web directory
In web directory, create folder /mediawiki_version and sub-folder /w

/mediawiki_version /w


 * In directory /w put MediaWiki files downloaded from: http://www.mediawiki.org/wiki/Download
 * In directory /w/extensions put extensions files downloaded from: http://toolserver.org/~vvv/mw-nightly/

Create four directories in /images as shown below: /mediawiki_version /w …           /images /archive /thumb /temp /math …

Configure MediaWiki through browser
Go to http://yourServerPath/w and fill-in the wiki name, the e-mail contact, the wiki language, the super-user username with a temporary password, and the DB password you’ve chosen at step 2. You may disable “E-mail address authentification” as the e-mail addresses of users are not subject of authentification issue.

Figure 1 - installation successful - LocalSettings.php has been created


 * ''Read: Manual:Config script

Short URL
Open-up and httpd.conf</tt> to set-up configuration of URL

Manual: http://www.mediawiki.org/wiki/Manual:Short_URL

A basic solution is described below, in two steps:

In LocalSettings.php: Replace these two lines

With:

In httpd.conf add the following alias:

Alias /wiki ${path}/w/index.php //adapt it with your server path.

Tip: You may use a rewrite rule in a .htaccess instead of a mod_alias.

Move LocalSettings.php to its parent directory. The wiki web site is set up and redirects to URL looking like http://localhost/wiki/Main_Page on reading and http://localhost/w/index.php?title=Main_Page&action=edit on editing.

Figure 2 - the wiki is serving to the short URL /wiki/Main_Page

Other settings: Images, TeX, etc.
Before handing over to super-user we will add some lines to LocalSettings.php, to configure PHP’s memory, image upload and LaTeX render:


 * A. First, raise PHP's memory limit in LocalSettings.php:


 * B. Then set up image upload: Manual:Image Administration

You can test the image upload through the page by logging in with super-user account.


 * LaTeX setting: Manual:Enable TeX

Install OCaml on the server then configure LocalSettings with $wgUseTex = true; You can test LaTeX by writing a basic formula on main page: $$x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$$

Tip: A simple alternative is to use Mimetex extension.


 * D. Add also the following lines:

Hand over to super-user
Create an ftp access for wiki super-user and send him its username and its temporary password.

He has the necessary tools to get the functionalities he would like on the wiki web site. Some further optional tools may need a network admin intervention, they are described below.

Optional tools:

 * See: Manual:Installing third-party tools

Lucene powerful search
http://www.mediawiki.org/wiki/Extension:MWSearch

LDAP Authentication
http://www.mediawiki.org/wiki/Extension:LDAP_Authentication

Confim account creation by bureaucrat
http://www.mediawiki.org/wiki/Extension:ConfirmAccount

Video player
http://www.mediawiki.org/wiki/Extension:VPIPPlugin

PDF render for collection of articles
http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/Collection/README.txt

GNUplot and GraphViz to render graphs
http://www.mediawiki.org/wiki/Extension:Gnuplot http://www.mediawiki.org/wiki/Extension:GraphViz

Setting up wiki configuration, with a ftp access and a sysop account
The MediaWiki web site is empty, available to the given URL. A super-user is necessary to configure how the wiki looks, what functionalities are installed and how the user rights are managed.

Required competences are:
 * browsing MediaWiki directory,
 * reading and editing LocalSettings.php file,
 * browsing and using the Special Pages of the wiki,
 * browsing and editing the MediaWiki namespace of the wiki.

Change your password


First of all go to the wiki web site URL, log in with the given super-username and then change your password through your page.

Logo and favicon images
Use your ftp access to open the file LocalSettings.php. It is located in mediawiki root directory named /w</tt>.


 * Create a 155x135 logo and a 32x32 favicon and upload them using Special:Upload page or directly through ftp.


 * Add at bottom of LocalSettings.php the following lines, adapted with the correct images’ paths:

Save, upload those changes to server, and reload a wiki page in a browser to see if changes are correct.

Footer links
a. Remove the “Powered by MediaWiki” icon. You can hide the “Powered by MediaWiki” image by adding the following to your wiki's :

(Note: MediaWiki:Common.css is a page in MediaWiki namespace that applies cascading style sheet to every user.)

b. Change footer links Look at the wiki footer links (privacy policy, disclaimers, etc.) and if you want to change those, go into /Skins/MonoBook.php</tt> where you will find the following code:

In the above you can simply add and remove items from the array that you wish to appear in your footer. For example we’ve changed it this way:

Choose user default options
In LocalSettings.php is defined what are the default user option preferences, applying to new user accounts. You probably want something like those options:

You’ll be able to change registered user options by running the maintenance script in  extension page.

User rights
In LocalSettings.php is defined what right is needed to do what operation. You probably want to add those permissions:

Basically there are 4 groups: anonymous users (cannot read), registered users (cannot delete content nor protect pages), sysops (cannot change user rights) and bureaucrats (those who manage users’ rights).

You could add some extra groups and define new group permissions and new content restrictions. The page Special:ListGroupRights list every group with its associated rights.

For example if you want to restrict some categorized pages and a whole namespace, you will write something like below:

Create user accounts
Once you’ve defined the default user options you can create accounts to register wiki-users. You should start to register users that will have some administration rights, so that they could manage other users by themselves. Go to Special:UserLogin, click on “create an account”, fill in username and email and use the “by e-mail” button. User will receive a temporary password and will be asked to change it at their first connection. Figure 4 - registration form accessible through Special:UserLogin

Notice that if the network administrator has installed an LDAP authentification or a confirm account creation by bureaucrat, user registration will be managed differently. In the second case it is up to users to ask for their account creation; and to bureaucrats to confirm or not. Check Special:Version to see if those extensions are installed or not.

Figure 5 - Bureaucrat report to confirm account requests; using a database extension

Assign user rights

Go to Special:UserRights, to give extra rights to users, such as bureaucrat rights for managers and sysop rights for pro-active users.

Figure 6 - assignment of Bureaucrat rights to managers through Special:UserRights

Extensions

 * See Category:Corporate Must-have extensions

Look at the /extensions</tt> directory. Those are extensions you can add to LocalSettings.php to make them available on the wiki. Check the special page Special:Version which lists every installed extensions.

At the moment I write this document (June 2009) some useful extensions are missing in the repertory fulfilled from MediaWiki SVN, such as:
 * MaintenanceShell
 * Freemind
 * SpecialUploadLocal
 * Calendar
 * Events
 * TopTenPages...

You can download those missing extensions from MediaWiki and add them manually to /extensions directory through ftp.

The main extensions for enterprise use are listed above, comment the unwanted extensions.

Extra namespaces
Manual: http://www.mediawiki.org/wiki/Manual:Namespace

Optional tasks:
Those tasks do not need any ftp access and may be performed by pro-active users with sysop rights.

Add some extra-edit buttons
Manual: http://www.mediawiki.org/wiki/Manual:Custom_edit_buttons

MediaWiki:Edittools to add some edit tools below the edit box.

MediaWiki:Commons.js to add some extra-buttons to the editbar above the editbox.

Example:

Customize MediaWiki messages
Special:AllMessages Lists every MediaWiki messages.

Teach users how to use the wiki
Do not believe that users will find how to contribute on the wiki; even if you’ve written a help page, you should teach them how to navigate, edit and follow-up the wiki.

Do some maintenance tasks


Maintenance tasks for every user: Some special pages list what maintenance is needed. They are listed in in the “Maintenance reports” section, as shown below. A regular task is to categorize uncategorized content: Maintenance tasks for Administrators: Administrators have the right to delete files and pages, so they should sometimes check for unused content to delete it. Notice that deleted content can be restored therefore you can give sysop rights to every pro-active user without any danger.

Maintenance tasks for Bureaucrats: Bureaucrats can execute some maintenance scripts through Special:MaintenanceShell extension page. For example they can change registered user options by running the UserOptions.php maintenance script.

Importing first-level content

 * ''a Corporate-ready dump is needed there, with basic templates, javascripts and css.