Руководство:Установка MediaWiki на Windows

This page is a translated version of the page Manual:Running MediaWiki on Windows and the translation is 58% complete.
Outdated translations are marked like this.
Installation guides
FreeBSD
GNU/Linux
- ALT Linux
- Arch Linux
- Debian or Ubuntu
- Fedora
- Gentoo
- Mandriva
- Red Hat Enterprise Linux or CentOS
- Slackware
macOS
Solaris
- Solaris 11 / opensolaris
- Solaris 10
Windows
- Windows Server 2019
- Windows Server 2016
- Windows Subsystem for Linux
on a stick
- Uniform Server
- XAMPP
Sourceforge.net

На этой странице рассказывается об установке MediaWiki на Microsoft Windows стандартными методами. For Windows-only hosting environments, the WIMP stack (using IIS) was recommended over Apache, (WAMP stack) as of 1.18, for manual installs.

Nginx - an alternative to apache and IIS - may be useful if you support MediaWiki across other host operating systems and/or are already using Nginx for internal hosting.

Необходимое программное обеспечение

Смотрите Manual:Требования для установки .

Загрузка необходимого ПО

Хотя эти продукты не так уж и сложно настроить под Windows, может быть крайне сложно установить (по сложности, это занимает 30 минут для WIMP) и настроить Apache+MySQL+PHP по одному продукту за раз, если он совершенно новый для apache/mysql/php. В таких условиях настоятельно рекомендуется искать готовую комбинацию LAMP или WAMP, которую можно просто установить и использовать. Это избавит вас от необходимости настраивать каждый пакет вручную на 99%. Недостатком является то, что некоторые из них обрезаются или модифицируются, что затрудняет обновление отдельных компонентов, а другие серьезно устарели. Under such circumstances it is highly recommended to look for a LAMP or WAMP pre-made combination which can just be installed and used. These will save you 99% of the trouble of configuring each package manually. The down-side is that some of these are trimmed down or modified versions which makes it hard to upgrade individual components, and other ones are seriously out of date.

XAMPP

The most popular of which is XAMPP:

WebPI

Программа установки Microsoft Web Platform Installer может установить для вас необходимые предварительные условия. See blog.

Bitnami

  • Bitnami это бесплатный и удобный установщик для open source программ. Он поддерживает стек Nginx [1], Microsoft WAMP [2]), общий LAMP стек [3] и XAMPP (который он не будет устанавливать сам и на котором работают только XAMPP-специфичные инсталляторы bitnami [4]). Bitnami устанавливает MediaWiki на любой из них, и они работают вместе с Wordpress или другим программным обеспечением, поддерживающим битнами. See Bitnami itself for instructions [5] and updated support data. Это может быть хорошим вариантом, если вы намерены использовать только стабильные релизы MediaWiki, поддерживаемые в течение длительного времени. Поддержка более старых версий не гарантируется.

WAMP

См.: http://www.wampserver.com/ru/

WIMP

See https://learn.microsoft.com/en-us/iis/application-frameworks/install-and-configure-php-applications-on-iis/mediawiki-on-iis

Необязательное ПО

Diffutils

Diffutils (which contains diff3) can be downloaded from here, and File (file type checker) from here.

Чтобы активировать использование diffutils внутри MediaWiki, вы должны проигнорировать тот факт, что они не будут найдены во время установки (они могут быть найдены, если вы установите diff в ваш путь) и открыть LocalSettings.php для внесения следующих изменений:

$wgDiff3 = "/usr/bin/diff3";

becomes

$wgDiff3 = "C:/Program Files/GnuWin32/bin/diff3.exe";

и замените:

$wgMimeDetectorCommand = "file.exe -bi"; #use external mime detector (linux)

на

$wgMimeDetectorCommand = "C:/Program Files/GnuWin32/bin/file.exe -bi"; # use external mime detector

Заметьте, что вам нужно заменить "C:/Progra..." на тот путь, куда вы установили инструменты.

ImageMagick

Теперь PHP поставляется с включенным по умолчанию GD, который будет работать для эскизов. GD не требует никаких настроек или модификаций. Поэтому настоятельно рекомендуется не устанавливать ImageMagick, так как известно, что он нестабилен. На самом деле $wgImageMagickConvertCommand и Image.php, упомянутые ниже, не существуют в версии MW1.15.1. Однако в версии MW 1.23 необходимо отключить ImageMagick в LocalSettings.php, установив $wgUseImageMagick в false. GD will not require any configuration or modification to be used. Therefore it's highly recommended to not install ImageMagick, since it is known to be unstable. In MediaWiki, disable ImageMagick in LocalSettings.php by setting $wgUseImageMagick to false.

Download ImageMagick on Windows. To make image thumbnailing work, you will need to open includes/Image.php, locate the line that starts with $cmd = $wgImageMagickConvertCommand ., and remove the escapeshellarg() function, then do the same to the next line, so that the command variable builds like this:

 $cmd  =  $wgImageMagickConvertCommand .
       " -quality 85 -background white -geometry {$width} ".
       ($this->imagePath) . " " .
       ($thumbPath);

Кроме того, проверьте, что $wgImageMagickConvertCommand в localalsettings.php указывает на это:

(путь к папке ImageMagic)/convert.exe
  • используйте расширение файла .exe! Без него работать не будет!
  • используйте путь без пробелов или короткий путь для установки ImafeMagic.

Another way to make this work is to add the ImageMagick path to your Windows PATH variable, and simply setting the $wgImageMagickConvertCommand in LocalSettings.php as follows (note that you must still modify Image.php as shown above):

$wgImageMagickConvertCommand = "convert.exe";

Make sure that the Internet Guest Account (Usually IUSR_MACHINENAME) has Read & Execute rights to the ImageMagick bin directory. Without this you might see an PHP shell execution error similar to what happens when it can't find the convert.exe file.

Inkscape

Inkscape can be used as an alternative SVG thumbnailing tool. Download Inkscape on Windows. Here are some example settings to enable Inkscape as the SVG thumnailer in the LocalSettings.php file:

# Image Converter
$wgSVGConverter = 'Inkscape';

$wgSVGConverters = array(
	'Inkscape' => '"/Program Files/Inkscape/inkscape.exe" --export-filename $output -w $width $input',
);

# Image converter path
$wgSVGConverterPath = '/Program Files/Inkscape';

Поддержка математики

Смотрите Texvc#Windows.