手册:初始配置

This page is a translated version of the page Manual:Config script and the translation is 4% complete.
Outdated translations are marked like this.

在网络服务器下载MediaWiki后,您需要做的第一件事是通过运行提供的配置脚本来完成基本设置。这个脚本可以告述你MediaWiki所需要的信息,以便将软件运作起来。 The following steps describe how to complete basic setup:

Running the MediaWiki configuration script in the web browser

MediaWiki 1.38 web installer

在接下来的示例中,我们将假设你的网站地址位于http://www.example.com/,而物理位置为/home/example/web。你可以使用适当的位置来调整示例,以满足你的需要。 The physical location on your server depends on your web server software configuration. Adjust the examples as needed.

  1. Open a web browser and browse to the website address or path that you configured for MediaWiki in the web server software.
  1. You will see the version of MediaWiki which you extracted and a link to "Please set up the wiki first."

Click on the link to begin the configuration script.
For reference (in case you want to go there directly), this is located in MediaWiki's mw-config directory (so using the example above you would go to http://www.example.com/mw-config/, or on a local machine http://localhost/mw-config/).

  1. After selecting the language, the configuration script performs some environmental checks.
  2. Follow the instructions on the pages to connect to the database, create the MediaWiki administrator account, and to set further settings such as the logo or skin.
    Since LocalSettings.php stores the database user's password in plain text, it is strongly suggested that you create a wiki specific database account (i.e. not root).
  3. 按照表单上的说明填写所需项目 (如果您不确定要输入的内容, 请参阅下表), 然后单击 "安装 MediaWiki" 按钮。该脚本将会填充数据库并生成配置文件。
  4. 当成功运行配置脚本后,一个名为LocalSettings.php 的文件将由mw-config(老版本为config)目录所创建。

该文件包含了MediaWiki运行所必须的所有信息。

Set stringent file permissions which system users can read and write the LocalSettings.php file.
For example, set chmod 600 and chown <webserver owner> (Owner read and write, no other permissions).

Your wiki should now be ready to use. Browse to the address that you installed MediaWiki to.

Continue with more advanced configuration on 手册:系统管理 .

Command-line alternative

Alternatively, you can run the command-line installer instead of the configuration script in the web browser: php maintenance/install.php