User:Al Maghi/Industrialization guide

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


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

Overview
Network administration:
 * The first technical 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 technical 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 write templates, do maintenance.
 * Users: they read and edit the wiki.

Processing a MediaWiki production

 * 1) Installation of Mediawiki server (Linux, Apache, MySQL, PHP) → Server administrator.
 * 2) creation of database
 * 3) installation of server tools
 * 4) configuration of user authentication
 * 5) Configuration of MediaWiki wiki-web-site → MediaWiki expert.
 * 6) interface and skin
 * 7) extensions
 * 8) user rights definition
 * 9) Management: 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.
 * Desired extensions requiring server tools.

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|Process basic 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, third-party server tools
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 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 system 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

GraphViz to render graphs
→ Extension:GraphViz

Plotters to plot 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 the wiki configuration, with a wiki-administrator
The wiki-administrator configure the wiki interface, its functionalities and the user rights.

Requirement are:
 * having a SSH-ftp access and a sysop account
 * browsing and using the Special Pages of the wiki
 * reading and editing LocalSettings.php file

Required softwares are:
 * a powerful web browser (such as Firefox)
 * a powerful text editor (such as Emacs or Notepad++)
 * a powerful SSH-ftp client (such as Filezilla)
 * (recommended) an SSH console (such as Putty.exe)


 * Process:
 * 1) Change your password: log in with the given wiki-administrator username and then change your password through your page.
 * 2) Use your SSH-ftp access  to open the file . It is located in mediawiki root directory named /w</tt>.

Logo and favicon images

 * Create a 135x135 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 the changes.

Extra namespaces

 * See Manual:Namespace

Choose user default options
In is defined what are the default user option preferences, applying to new user accounts. You probably want to change some default user options: See Manual:$wgDefaultUserOptions

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

User rights
In is defined what right is needed to do what operation.

You define permission of groups then you manage what users belong to what group.


 * anonymous users [should they have the right to edit? To read?]
 * registered users [they should have the right to read and edit non restricted content.]
 * Optional group. [plus access to restricted content.]
 * admin. [can delete content]
 * bureaucrat. (can change user rights)

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

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:

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.

Some extensions you may want could be missing in the repertory fulfilled from MediaWiki SVN, such as:


 * UsageStatistics Add-on
 * 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.

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:

Some maintenance scripts can be executed through SSH access. For example to change registered-users' options by running the maintenance script.
 * Maintenance tasks for the wiki-administrator:


 * Automated tasks with bots
 * Help:Bots

Importing first-level content

 * See Importing some content from mediawiki.org

At the moment there is not a wiki dedicated to first-import on wikimedia servers.

Recommended solution is to install somewhere a wiki dedicated to your organization first-import. It will be the repository of your organization's gadgets, messages, help and templates.

If divers configurations are needed on your wikis, install somewhere else another wiki with a clean history, on which each revision correspond to a configuration; and import its content with meaningful revision summaries. Earliest revision is the default configuration and users can switch to older revisions.

Once the process is over, welcoming users could be performed at a workshop: users co-operate the first edits of pages and categories; and as they're using the wiki they imagine its future.