Installing MediaWiki on 8-Coral: Difference between revisions

From The Uniform Server Wiki
Jump to navigation Jump to search
(Updated to 8-Coral and MediaWiki 1.17+)
(No difference)

Revision as of 19:28, 23 November 2011

Installing MediaWiki 1.17 or 1.18 on 8-Coral Series

Introduction

This guide shows how to install MediaWiki on The Uniform Server 8-Coral Series. We will follow MediaWiki's recommendation and use 7-Zip to extract the files, since Windows cannot do this.

  • 7-Zip's download site: [1]
  • Download the latest version and install it.

Preparation

Download and Extract Mediawiki

  1. Download MediaWiki 1.17.0.tar.gz (or later version) from here and save it to a known location.
  2. Open the downloaded file (mediawiki-1.17.0.tar.gz) with 7-Zip. This will show mediawiki-1.17.0.tar
  3. Extract this to the server root folder UniServer\www, creating mediawiki-1.17.0
  4. Rename the folder mediawiki-1.17.0 to wiki

Start servers

Run The Uniform Server control menu and start both servers if not already running. Execute "Start_as_program.exe" to start the Unicontoller panel, and then choose "Start Both" from the panel.

Change PHP accelerator to APC

The installation script for MediWiki does not detect eAccelerator, which is The Uniform Server's default PHP acelerator. We will change to APC instead.

  1. Choose Server Configuration from the Unicontroller panel, and then select PHP.
  2. From the drop-down panel, select PHP Accelerators APC and eAccelerator.
  3. Uncheck Enable eAccelerator
  4. Dismiss the popup notice about the PHP Configuration update.
  5. Check Enable APC
  6. Dismiss the popup notice about the PHP Configuration update.
  7. Close the Server Configuration panel.
  8. From the Unicontroller panel, choose Stop Apache and wait for the button to change indication.
  9. Start Apache.

Enable InnoDB for MySQL

MediWiki exhorts installers to enable InnoDB due to some known problems with MyISAM. On the other hand, MyISAM is more portable in the situation that there are multiple applications using the same MySQL server. This is because all of the InnoDB transactions are stored in the same ibdata1 file, whereas each MyISAM db has its own folder.

  1. Choose Server Configuration from the Unicontroller panel, and then select MySQL.
  2. From the drop-down panel, select InnoDB Enable/Disable.
  3. Check Enable InnoDB
  4. Close the Server Configuration panel.
  5. From the Unicontroller panel, choose Stop MySQL and wait for the button to change indication.
  6. Start MySQL.

Create the MySQL database

Before installing MediaWiki you must create a new MySQL database and user.

  1. From the control menu select: Server configuration > MySQL > Create delete Database
  2. Enter the database name to create; for example "wikidb" (without the quotes)
  3. Click the "Create Database" button. You can now close this menu.

Wiki – Installation

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


MediaWiki <version> installation

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

Continue to the next page.

Environmental checks

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

Connect to database

Database type:(radio button) MySQL is selected
Database host: localhost or 127.0.0.1 for Win7.
Database name: wikidb (The name of the database you created.)
Database table prefix: leave blank
DB username: root
DB password confirm: root, or the password you set for MySQL root account

Continue to the next page.

Database settings

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

Continue to the next page.

Name

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

Continue to the next page.

Options

User rights profile: (radio button) select Traditional wiki
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 user-to-user e-mail: Unchecked
Enable file uploads: Checked
Settings for object caching: (radio button) select APC

Continue to the next page.

Install

Finally, all questions are answered. Please note the warning concerning the $wgSecretKey and $wgUpgradeKey.

Click Continue

Complete!

This last installation page triggers off a download of LocalSettings.php, which is the static, non-database portion of the configuration. This must be saved to folder *\UniServer\www\wiki.

You can now access your wiki by clicking the "enter your wiki" link on the "Complete!" page, or by typing the following into your browser address bar: http://localhost/wiki/

Portability

If you want a portable version of MediaWiki, copy the folder UniServer 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, it will prevent The Uniform Server from running. To resolve this situation, either stop the other program or preferably move The Uniform Server to different ports by moving the servers using the MultiServers button.

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.

More importantly, the above installation is an extreme security risk if put online as is. It is imperative that you secure the MySQL server before putting your servers online.

Please read MySQL Security and restrict the privileges for any user who has connection access to your server.