Zero logo

MediaWiki

MediaWiki is a free and open source wiki software, used to power wiki websites. It is based on PHP and MySQL the following page provides detailed information for installing on Uniform Server Zero XI.

Note 1: At step 4 you are required to enter your e-mail address this can be the e-mail address you set as default when configuring MSMTP, for details see Edit MSMTP Configuration

Note 2: We will follow MediaWiki's recommendation and use 7-Zip to extract the files, since Windows cannot do this.

  • 7-Zip's download site: Sourceforge.net
  • Download the latest version and install it.

Step 1: Download and Extract

Download and extract the MediaWiki package.

  • Download the latest version of MediaWiki from here. currently 1.21.2
  • Save the downloaded file mediawiki-1.21.2.tar.gz to a temporary folder for example C:\mediawiki_temp
  • Extract the downloaded file (mediawiki-1.21.2.tar.gz) with 7-Zip. This will create folder mediawiki-1.21.2.tar
  • Inside this folder extract the file (mediawiki-1.21.2.tar) with 7-Zip. This will create folder mediawiki-1.21.2
  • Rename the folder mediawiki-1.21.2 to wiki

Before MediaWiki can be installed a MySQL user and database are required for details see step2.

Step 2: Create the Database and a User using phpMyAdmin

Follow these instructions to create your MediaWiki username and database using phpMyAdmin.

Note: These instructions are written for phpMyAdmin 4.0.8; the phpMyAdmin user interface can vary slightly between versions.

  • Start UniController.
  • Start Apache and MySQL servers.
  • Click phpMyAdmin button - Opens phpMyAdmin in default browser.
  1. If a MediaWiki database does not already exist in the Database list on the left, create one:
    1. Click Databases button top left menu bar.
    2. Choose a name for your MediaWiki database ('mediawiki' or 'wiki' are good), enter it in the Create database field, and click Create.
      Note: Database name added to list on the left.
  2. Click the Users button top menu bar. If a user relating to MediaWiki does not already exist in the list of users, create one:
    1. Click Add user this opens the add user menu, navigate to the Login Information section:
    2. Choose a username for MediaWiki ('mediawiki' is good) and enter it in the User name field. (Be sure Use text field: is selected from the dropdown.)
    3. From the Host dropdown select Use text field: in the Host field enter 127.0.0.1
    4. Choose a difficult-to-guess password (ideally containing a combination of upper- and lower-case letters, numbers, and symbols), and enter it in the Password field. (Be sure Use text field: is selected from the dropdown.) Re-enter the password in the Re-type field.
    5. Write down the username and password you chose.
    6. Leave all options under Database for user and Global privileges at their defaults.
    7. Click Go.
  3. You are returned to the Users screen.
    1. Click Edit privileges for the user you've just created for MediaWiki.
    2. In the Database-specific privileges section, select the database you've just created for MediaWiki.
    3. The page will refresh with privileges for that database. Click Check All to select all privileges
    4. Click Go.

Note: Other parts of this documentation assume you have set the following: MediaWiki database name = mediawiki Username for MediaWiki = mediawiki Password = fred123 remember to replace these with the values you have set in the above.

Step 3: Upload the files

Now you will need to decide where on your domain you'd like your MediaWiki-powered site to appear:

  • In the root directory of your web site. (For example, http://example.com/)
  • In a subdirectory of your web site. (For example, http://example.com/wiki/)

Note:
The location of your root web directory www will vary depending where Uniform Server was installed.
A default installation assumes the following path C:\UniServerZ\www

In the Root Directory

Copy all the contents of the wiki directory (but not the directory itself) into the root directory of your web site.

  • Copy all the contents of folder C:\mediawiki_temp\mediawiki-1.21.2.tar\mediawiki-1.21.2\wiki to folder C:\UniServerZ\www

In a Subdirectory

Optional rename the wiki directory to your desired name, then copy the directory to your desired location within the root directory of your web site

  • Optional rename folder C:\mediawiki_temp\mediawiki-1.21.2.tar\mediawiki-1.21.2\wiki to C:\mediawiki_temp\mediawiki-1.21.2.tar\mediawiki-1.21.2\desired name
  • In this example we will not change folder wiki.
    Copy folder C:\mediawiki_temp\mediawiki-1.21.2.tar\mediawiki-1.21.2\wiki to folder C:\UniServerZ\www

Step 4: Wiki Installation

  1. Type the following into your browser address bar: http://localhost/wiki/ This will redirect to the installation page.
  2. Click the link: Please set up the wiki first. This starts the following configuration sequence.

A) MediaWiki <version> installation

Your Language: en-gb - English
Wiki Language: en-gb - English

Continue to the next page.

B) Environmental checks

While you may receive warnings here, there should be no errors. Continue to the next page.

C) Connect to database

Database type:(radio button) MySQL is selected
Database host: 127.0.0.1
Database name: mediawiki (The name of the database you created.)
Database table prefix: leave blank
DB username: mediawiki (the new restricted MySQL user account)
DB password confirm: fred123 (the password for the account)

Continue to the next page.

D) Database settings

Database account for web access: Use the same account as for installation
Storage engine: (radio button) InnoDB
Database character set: (radio button) select Binary

Continue to the next page.

E) Name

Name of Wiki: MediaWiki on ZeroXI (whatever you like)
Project namespace: (radio button) Same as the wiki name
Your name: WikiSysop
Password: admin429 (whatever you like)
Password confirm: admin429 (same as above)
Contact e-mail: admin@localhost.org
Ask more questions: Selected

Note that the email address must be valid.
Continue to the next page.

F) Options

User rights profile: (radio button) select Authorised editors only
Copyright and license: (radio button) select No license footer
Enable outbound e-mail: Checked
Return e-mail address: (e-mail of WikiSysop)
Enable user-to-user e-mail: Unchecked
Enable user talk page notification:Unchecked
Enable watchlist notification:Unchecked
Enable e-mail authentication: Checked
Extensions: All unchecked
Enable file uploads: Checked
Settings for object caching: (radio button) select No caching

Continue to the next page.

G) Install

Finally, all questions are answered. Click Continue following is displayed:

  • Setting up database... done
  • Creating tables... done
  • Creating database user... done
  • Populating default interwiki table... done
  • Initialising statistics... done
  • Generating secret keys... done
  • Creating administrator user account... done
  • Creating main page with default content... done

Click Continue

Note: When requested save the download file.

H) Complete

After a while the following is displayed:

Congratulations! You have successfully installed MediaWiki.
The installer has generated a LocalSettings.php file. It contains all your configuration.

You will need to download it and put it in the base of your wiki installation (the same directory as index.php). The download should have started automatically.

If the download was not offered, or if you cancelled it, you can restart the download by clicking the link below:....

Note: If you do not do this now, this generated configuration file will not be available to you later if you exit the installation without downloading it.
When that has been done, you can enter your wiki.

Navigate to your download folder and copy file LocalSettings.php to folder C:\UniServerZ\www\wiki
Now click the above link (enter your wiki)

Portability

If you want a portable version of MediaWiki, copy the folder UniServerZ and all its content to your USB memory stick. Don’t expect fantastic speeds, but it is usable.

The Uniform Server uses the standard ports (Apache port 80 and MySQL port 3306). If a host PC is currently running another program on these ports, this will prevent The Uniform Server from running. To resolve this situation, either stop the other program or better yet move The Uniform Server ZeroXL to different ports by using the appropriate menu option for Apache and MySQL.

MySQL Security

This installation guide is intended to get the application up and running purely for testing. The configuration options should be reviewed if you are intending to put the application online. Be sure to read any security advice from MediaWiki and check their web site. Specifically, you may be interested in reading MediaWiki's Manual:Security articles.

Importantly, the above installation reduces the security risk by creating a restricted MySQL user in step 2. However if you have not already done so it is imperative that you set a new MySQL root password for details see section Change MySQL root password . Only use the default password root on a test server.


--oOo--