Manual:Installation requirements/zh

一个标准安装的 MediaWiki 除软件自身以外，还需要安装下列环境：


 * Web 服务器. 用于服务客户端浏览器的请求.
 * PHP 运行环境.
 * 数据库服务器. 用于储存网站页面与数据.

除上述必需的环境以外，还有若干 可选依赖，如果你需要使用一些高级功能则需要安装这些依赖（见下方）.

如果你的网站是托管的（你不直接控制它）那么联系你的系统管理员或者服务提供商，确保这些软件被安装并处于可用状态.

= == Simple one-download installation == =

使用来自http://www.apachefriends.org的XAMPP来安装并配置好所有重要的安装包– 带有仅一个下载的Apache Web 服务器，PHP 运行环境和 MariaDB –数据库. 这可用于 Linux、Windows、macOS 和 Solaris. 截至2016年8月，最新的 XAMPP 包含了PHP 7.0. 要运行 MediaWiki 至少需要 PHP 版本在 以上.

如果你使用 macOS，你可以使用 MAMP，它与 XAMPP 是类似的软件. 当前的 MAMP 版本包含了 Apache Web Server 和 MySQL 数据库. 它可以同时在Windows和Mac上使用，但它通常用在Mac而不是Windows上. 它现在正运行着最新的PHP和MySQL.

= == 網頁伺服器 == =

In order to serve wiki pages to browsers, MediaWiki requires some web server software. Often you will not have a choice of which software to use – it will be the one provided by your hosting provider.

Most installations use the Apache web server, available at the official download page. 然而，MediaWiki也被在使用IIS 7.0，Cherokee，Hiawatha，LiteSpeed，nginx（配置实例）和lighttpd的情况下测试过.

= == PHP == =

MediaWiki 使用 PHP 编程语言编写，PHP 运行环境是必需的.

记住，虽然MediaWiki通过一个安装脚本来提供基于网络的最重要的东西的配置文件，但一些PHP基础将需要用来做更多的详细的个性化.

In most Debian/Ubuntu-based distros, this is in the php5-intl package.
 * 为了获得最新的稳定版本的MediaWiki，PHP版本 或更新的版本是必需的.
 * 如果你不能升级到PHP，你可以使用MediaWiki 1.23.13，它需要PHP5.3.2或更新的版本
 * 下列的 PHP 扩展是必需的：
 * Perl Compatible Regular Expressions (PCRE) (MediaWiki 1.23 要求 PCRE 7.2+)
 * Session
 * Standard PHP Library
 * JSON (1.22+)
 * mbstring (required since 1.27, recommended for earlier versions)
 * 注意所有的这些在PHP中都是默认启用的.
 * MediaWiki's installer will warn if you don't have the optional PHP intl extension "to handle Unicode normalization".
 * PHP OpenSSL extension is also recommended. See.
 * On most Debian/Ubuntu-based distros, either the php5-mysql or php5-mysqlnd package is required if you want MediaWiki to use MySQL.
 * If you are installing MediaWiki on CentOS 5.6, use the php53 package instead of php. The php package contains PHP 5.1.x, which is not compatible with the latest version of MediaWiki.
 * If you are installing MediaWiki on Red Hat Enterprise Linux 6.4 (CentOS 6.4), you will need to install the php-xml package in addition to the normal php package.
 * Some features of MediaWiki may require PHP functions that execute external processes, like image thumbnailing, that some cheap hosts usually disable. This has surfaced specially in MediaWiki 1.23 on file uploads . Please take this into consideration if you plan to install MediaWiki on a shared host.
 * MediaWiki extensions may require additional PHP features, e.g. VisualEditor requires libcurl support (php5-curl on Debian/Ubuntu-based distros).

If you need to compile PHP from source, then see PHP configuration for compilation options that affect MediaWiki.


 * Some servers may also require the equivalent database module and session management module be installed. See individual operating system instructions for more information.
 * When installing on Windows using the Microsoft installer, add the extension for your database of choice (MySQL/MariaDB or Postgres) to the features to be installed.

= == 資料庫伺服器 == =

MediaWiki stores all the text and data (content pages, user details, system messages, etc.) in a database, which it is capable of sharing with other web-based applications (phpBB, etc.). You will need one of the following database servers to run the latest version of MediaWiki:


 * MySQL or later* or MariaDB 5.1+
 * PostgreSQL 或者更高版本 (MediaWiki 1.8 以后才支持这个数据库). 更多信息查看 Manual:Installing MediaWiki
 * 3
 * LTS 发行版亦支持 Microsoft SQL Server 2008 R2 或更高版本. 但在非 LTS 发行版中，使用 SQL Server 不保证能正常工作

过去支持，现在不支持：


 * (unsupported on the latest MediaWiki versions due to open blocking bugs)

Some users find it helpful to install an additional software package such as phpMyAdmin (MySQL/MariaDB) or phpPgAdmin (Postgres) to help administer the database server.

MySQL 5 has been required since MediaWiki 1.19. MySQL 4 was required starting with MediaWiki 1.6. (If you are using an ancient version of MySQL and cannot upgrade then you need to use MediaWiki 1.5.8, but this version is not supported.)

= == 硬體需求 == =

运行一个单机网站的最低要求配置是 256MB 运行内存和 85MB 的储存空间. 但是在大流量或者启用了上传功能的的网站上，这些配置可能完全不够. 一些用户也报告了在电脑上运行的 MediaWiki 最低可能只占用 48MB 运行内存.

The install size can be reduced to around 50Mb for a developer install and to around 26Mb for a non-developer, end-user install. See Manual:Reduce size of the installation

= == 可选依赖 == =

其他软件

 * ImageMagick 或 GD 被要求，如果需要使用 图片缩略图 功能
 * TeX 被要求用来显示行内数学方程式. 在大部分基于 Debian/Ubuntu 的 Linux 发行版中, 这个软件存在于 texlive 软件包中.
 * Sendmail 被要求用来发送电子邮件.
 * Shell access 被要求用于运行 维护脚本; 这能使 MediaWiki 的升级工作更加轻松.

For further information about the above items, see Manual:Installing third-party tools.

可视化编辑器
可视化编辑器扩展（以及Flow扩展）需要Parsoid web 服务，这由Node.js实现. Node.js is not provided by most shared-hosting companies (HostGator, Bluehost, Dreamhost, etc.). For performance and security reasons, it is better to use a dedicated hosting solution such as a Virtual private server ("VPS").

Scribunto
如果您希望从wiki页面和模板调用Lua模块（参见此wiki的例子），您的wiki也需要Scribunto.

参见



 * 软件包


 * XAMPP
 * XAMPP
 * XAMPP