1+1=10

记记笔记,放松一下...

Install MediaWiki on Windows

MediaWiki + Apache + php + MySQL

MySQL

Download and install the msi installer of MySQL 5.6 from http://dev.mysql.com/downloads/installer/

Apache

Download and install Apache 2.4 from http://www.apachelounge.com/download/

PHP

Download and install php 5.8.6 from http://windows.php.net/download/

Rename php.ini-production to php.ini, then enable mysql extension

1
2
extension_dir = "c:/php-5.6.8/ext"
extension = php_mysql.dll

Enable intl extension

1
extension = php_intl.dll

To make intl really works, the following files which sit in the PHP directory

  • icudt54.dll
  • icuio54.dll
  • iculx54.dll
  • icutu54.dll
  • icuin54.dll
  • icule54.dll
  • icutest54.dll
  • icuuc54.dll

Should be copied to the bin path of Apache, or one of the path in system environment variant PATH.

Add following line to the conf file of apache to enable php.

1
2
3
4
LoadModule php5_module "c:/php-5.6.8/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php-5.6.8"

Add index.php to DirectoryIndex

1
DirectoryIndex index.html index.php

Create a simple .php file for test.

1
<?php phpinfo() ?>

MediaWiki

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

Add following line to the conf file of Apache.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# MediaWiki
Alias "/wiki" "d:/www/mediawiki-1.24.2"
<Directory "d:/www/mediawiki-1.24.2">
    ScriptInterpreterSource Registry-Strict
    Options +ExecCGI +FollowSymLinks
    DirectoryIndex index.php index.html
    AllowOverride Limit FileInfo Indexes Options
    Require all granted
</Directory>
<Directory "d:/www/mediawiki-1.24.2/images">
   # Ignore .htaccess files
   AllowOverride None

   # Serve HTML as plaintext, don't execute SHTML
   AddType text/plain .html .htm .shtml .php

   # Don't run arbitrary PHP code.
   php_admin_flag engine off

   # If you've other scripting languages, disable them too.
</Directory>

Run

1
http://localhost/wiki/mw-config/index.php

tools