Manual:Installing MediaWiki/ru

Эта страница описывает все шаги по установке и настройке MediaWiki вручную.

Установка MediaWiki может вызывать сложности у рядового пользователя компьютера, который не имеет опыта работы с Apache, PHP и MySQL/MariaDB. Приложения ниже предлагает более простые альтернативы ручной установке

The Appendices section below also provides installation notes for specific system configurations.



Проверьте требования к установке
Check that your system meets the installation requirements.

Make sure to also check the of the MediaWiki version that you plan to install.



Скачивание ПО MediaWiki
Download the MediaWiki tar file from the official download page.

Generally, if you're using a production environment, you want to be running the latest stable release, which is MediaWiki.

Extract the MediaWiki software
Скачанный файл будет в формате  или. You need to uncompress this archive file before use. Вы можете распаковать файл локально (и затем загрузить через FTP на сервер) или прямо на свой сервер.

Обычно это делается с помощью специального ПО, таким как 7-Zip (бесплатно), WinZip, WinRAR или IZArc (бесплатно) в Windows.

В Linux и Mac OS X, вы можете распаковать файл с помощью следующей команды:



Загрузить файлы на Ваш сервер
Если вы еще не загрузили файлы на свой веб-сервер (или не скопировали, если программное обеспечение вашего веб-сервера работает локально на ), сделайте это сейчас.

Загрузите файлы в директорию на веб-сервере:


 * 1) непосредственно копируя распакованную папку или
 * 2) используя FTP-клиент, такой как FileZilla (Windows, OSX and Linux) или Cyberduck (Windows и OSX).
 * 3) by using software already provided by your hosting service, such as the cPanel File Manager

If your upload tool has a "change file names to lowercase" option, then you must disable this.

Если вы используете веб-сервер Apache HTTPD, правильный каталог указан в вашем файле  в директиве. By default, this is  or.

The exact location of the Apache server settings and directories file  depends on your operating system. В Debian и Ubuntu файл настроек и каталогов сервера Apache называется. In Red Hat and Fedora, the file is.

Rename the uploaded folder to whatever you would like to have in the URL. If your web server is running as  for example, renaming to   directory would mean you would access your wiki at.



Настройка базы данных
MediaWiki's installation script will ask you for a database name and database username, so MediaWiki can store the content of the wiki.

Если у вас уже есть сервер базы данных и вы знаете пароль для пользователя «root» (admin), перейдите к разделу #Запустить скрипт установки.

If you don't know the password for the root user, for example if you are on a hosted server, you will have to create a new database before you run the MediaWiki installation script in the next section.

SQLite, MariaDB/MySQL, and PostgreSQL are supported databases. If you're unsure which database to choose, use MariaDB.

After finishing the database setup, continue with below.

SQLite
No further setup is required for SQLite if the  module for PHP is installed on the system.

On the SQLite installation page, choose a database name (which can be anything) and the SQLite database directory. For the database directory, the installer will attempt to use a subdirectory outside of the document root and create it if needed. If this directory is not safe (for example, web-readable), change it manually to avoid making it accessible to everyone on the web.

MariaDB/MySQL
Create the MariaDB/MySQL database and database user. There are several ways:


 * Use a control panel software offered by your Hosting service (example: PhpMyAdmin)
 * Use ssh to log into your host and type the commands below into a MySQL prompt. See the corresponding documentation of your hosting provider. Alternatively, contact your hosting provider to have them create an account for you.

The following commands create a database named, a user named  , and set permissions for the user on that database.

Only if your database is not running on the same server as your web server, you need to give the appropriate web server hostname ( in the example below):

PostgreSQL
If you are using PostgreSQL, you will need to either have a database and user created for you, or supply the name of a PostgreSQL user with "superuser" privileges to the configuration form. Often, this is the database user named. The following commands on a Linux command-line, as the postgres user, create a database user named, and a database named   owned by the user named.

createuser -S -D -R -P -E wikiuser (затем введите пароль) createdb -O wikiuser my_wiki

or as superuser (default postgres) execute the following commands at the database prompt:

Beware of the list of known issues when running MediaWiki with PostgreSQL.

Run the installation script
Next, complete the installation of MediaWiki by going to the URL of your MediaWiki installation in your web browser: Follow the instructions in.

Further configuration

 * - Additional configuration
 * - Wiki administration

Поддерживайте в актуальном состоянии!
Once installed, make sure you stay up to date with releases, and keep your server secure!

Alternatives to manual installation
Instead of manually installing MediaWiki, alternative options might be easier:
 * pre-integrated software appliances
 * hosting services with 1-click installation, or wiki farms

See also the.

System-specific instructions
The pages listed on give more detailed installation instructions aimed at specific systems.

However, by and large these per-system docs are less maintained and might not always be up to date. First consult (this page) before looking at per-system installation documentation.

Running multiple wikis
Refer to Manual:FAQ#Installation and configuration.

Importing an existing wiki database
Refer to Manual:FAQ#Installation and configuration.

