MediaWiki Installation


Table of Contents

Install MediaWiki on local server 
Installation 

Install MediaWiki on local server 

Installation 

Excerpted from Help:Installation http://meta.wikimedia.org/wiki/Help:Installation

Download and uncompress 

Download from http://www.mediawiki.org/wiki/Download

# uncompress from the web account // do_show tfe /backups/tools/mediawiki-1.9.3.tar.gz $ tar -xvzf /…path/mediawiki-1.9.3.tar.gz

Create a database 

The default Database name & user name used by the installation script are:

Database name: wikidb DB username: wikiuser

[Note]

If you have the root database user and password, you can skip this step since MediaWiki will be able to do this for itself. Just fill in the Superuser account / Superuser password fields int the installation script.

mysql -u root -p mysql create database wikidb; grant create, select, insert, update, delete, lock tables on wikidb.* to 'wikiuser'@'localhost' identified by 'wikipass'; flush privileges; \q

the installation script 

Use your browser to visit the wiki directory on your webserver to preview/run the installation script.

If you do the uncompress from the web account, the installation should be successful, even on Fedora Core.

Follow the installation instructions on the installation script page. Refer to the table on http://meta.wikimedia.org/wiki/Help:Installation if you're uncertain what to enter.

Admin username: WikiSysop

An admin can lock/delete pages, block users from editing, and do other maintenance tasks. A new account will be added only when creating a new wiki database.

Installation successful! Move the config/LocalSettings.php file into the parent directory.

 mv config/LocalSettings.php .
// es LocalSettings.php

clean up the installation 

The created file LocalSettings.php contains all the information needed by MediaWiki to run. If it does not find the file in the main folder, it will launch the installation script to create a new one in the "config" directory.

  1. Set stringent permissions on the LocalSettings.php file.

    chmod 600 LocalSettings.php
  2. Delete the entire "config" directory.

    mv config config-

ref SELinux 

Otherwise, if you are running a distribution with SELinux, e.g. Fedora Core, be sure to set the context on the installation directory correctly e.g.:

ls -aZ
chcon -R system_u:object_r:httpd_sys_content_t wiki

If you installed into public_html/wiki, this will probably be something similar to http://www.yourdomain.com/wiki. Depending on how you uploaded the files, you may need to visit http://www.yourdomain.com/wiki/config instead.

SELinux: Linux distributions which support SELinux ('Security Extensions') are becoming more widespread. On such systems, PHP scripts will still be unable to write to the config directory, after you have set the normal file permissions. You will also need to use the 'chcon' command to change the SELinux file type.