User:Al Maghi/Industrialization guide

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 SSH-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 wiki-administrator.
 * He needs an SSH-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's 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 authentication, 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 wiki-administrator
 * Username of the wiki-administrator
 * 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 SSH-ftp access to LocalSettings.php, to /extensions, and to /skins. Back-up, upgrade, accessibility and security of the web server is under his responsibility.

Installation: server, database, directories, config script

 * Reference manuals: Installation · Category:Installation

{{hidden|Non up-to-date process description|

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</tt> put extensions files downloaded from: http://toolserver.org/~vvv/mw-nightly/

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

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

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


 * ''Read: Manual:Config script

}}

Short URL

 * See: Manual:Short URL

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

Set up image upload

 * Manual:Image Administration

You can test the image upload through the page by logging in with wiki-administrator account.

LaTeX setting

 * Manual:Enable TeX

Install OCaml on the server then configure with  = true;</tt> 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.

Hand over to wiki-administrator
Create an SSH-ftp access for wiki-administrator 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
→ Extension:MWSearch

LDAP Authentication
→ Extension:LDAP_Authentication

Confim account creation by bureaucrat
→ Extension:ConfirmAccount

Video player
→ 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

 * Extension:Gnuplot
 * Extension:GraphViz

Plotters as alternative to GNUplot to render graphs
The gnuplot and ploticus extensions have fairly major security risks. An alternative is using the Plotters extension with Plotkit (or another javascript graphing library of your choice). This is a javascript-only solution, but most corporate environments require javascript.

Setting up wiki configuration, with a SSH-ftp access and a sysop account
The MediaWiki web site is empty, available to the given URL. A wiki-administrator 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 wiki-administrator username and then change your password through your page.

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


 * Create a 155x135 logo and a 32x32 favicon and upload them using page or directly through SSH-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 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 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  lists 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, 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

Notice that if the network administrator has installed an LDAP authentication 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, 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

Extensions

 * See Category:Corporate Must-have extensions

Look at the /extensions</tt> directory. Those are extensions you can add to 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</tt> directory through SSH-ftp.

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

Extra namespaces

 * See 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
See: Manual:Custom edit buttons

to add some edit tools below the edit box.

to add some extra-buttons to the editbar above the editbox.

Example:

Customize MediaWiki messages
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


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: 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 every user:
 * Maintenance tasks for Administrators:

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


 * Automated tasks with bots
 * Help:Bots.

Importing first-level content

 * See Importing some content from mediawiki.org