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 MediaWiki on Uniform Server Zero XV.

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.

  • 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.
  • Save the downloaded file mediawiki-x.x.x.zip to a temporary folder, for example, C:\mediawiki_temp
  • Extract the downloaded file (mediawiki-x.x.x.zip) with 7-Zip. This will create folder mediawiki-x.x.x
  • Rename the folder mediawiki-x.x.x to wiki

Before MediaWiki can be installed, a MySQL user and database are required. For details, see step 2.

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; its 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 on the top left menu bar.
    2. Choose a name for your MediaWiki database ('mediawiki' or 'wiki' are good), enter it in the Database name field, and click Create.
      Note: Database name is added to list on the left.
  2. Click the Privileges button on the 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 and 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.

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 website (for example, http://example.com/).
  • In a subdirectory of your website (for example, http://example.com/wiki/).

Note: The location of your root web directory www will vary depending on 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 website.

  • Copy all the contents of folder C:\mediawiki_temp\wiki to folder C:\UniServerZ\www

In a Subdirectory

Optionally rename the wiki directory to your desired name, then copy the directory to your desired location within the root directory of your website.

  • Optionally rename folder C:\mediawiki_temp\wiki to C:\mediawiki_temp\desired_name.
  • In this example, we will not change folder wiki.
    Copy folder C:\mediawiki_temp\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.
       ◦ If Required components are missing, enable them. Stop Apache and, from the PHP menu, select Edit Basic and Modules, then PHP Modules Enable/Disable. Select the required components and close the window. Start Apache.
  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

Continue to the next page.

E) Name

Name of wiki: MediaWiki on Zero XV (whatever you like)
Project namespace: (radio button) Same as the wiki name
Your username: WikiSysOp
Password: admin429 (whatever you like)
Password again: admin429 (same as above)
Email address: admin@localhost.org
Ask me more questions: Selected

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

F) Options

User rights profile: (radio button) select Authorized 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
Skins: leave defaults
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 and the following is displayed:

  • Setting up database... done
  • Creating tables, step one... done
  • Creating database user... done
  • Creating tables, step two... done
  • Populating default interwiki table... done
  • Initialising statistics... done
  • Generating secret keys... done
  • Prevent running unneeded updates... done
  • Restoring mediawiki services... done
  • Creating administrator user account... done
  • Creating main page with default content... done
  • Database was successfully set up

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 another program is using port 80, you will want to change the listening port to avoid conflicts, or your Apache server will not start. Before changing the Apache port, be aware that this makes the server non-standard. A preferable solution is to change the port of the conflicting program.

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 website. 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--