매뉴얼:미디어위키 설치

From MediaWiki.org
Jump to: navigation, search
This page is a translated version of the page Manual:Installing MediaWiki and the translation is 14% complete.

Outdated translations are marked like this.
Other languages:
català • ‎dansk • ‎Deutsch • ‎English • ‎español • ‎français • ‎Bahasa Indonesia • ‎italiano • ‎日本語 • ‎한국어 • ‎नेपाली • ‎polski • ‎português do Brasil • ‎русский • ‎Türkçe • ‎粵語 • ‎中文
Mediawiki-logo.png 매뉴얼:설치 가이드Manual:Installation guide | 미디어위키에 대해Manual:What is MediaWiki?
Help-browser.svg 특징Manual:MediaWiki feature list | 설치 조건Manual:Installation requirements
Preferences-system.svg 다운로드Download | 설치Manual:Installing MediaWiki | 설정Manual:Configuring MediaWiki


미디어위키는 웹을 기반으로한 대화형 설치 스크립트로 설치됩니다. 스크립트를 실행하기전에, 몇가지 일을 해야합니다.prerequisitesshort installation guide(전문가용) 을 읽어보세요.

미디어위키 설치는 아파치, PHP, MySQL에 경험이 없는 평균적인 컴퓨터 사용자에게 어려울 수 있습니다. 대부분의 위키를 만들고 싶은 사용자에게는 을 통하는 것이 더 효과적일 수 있습니다.

문제해결을 위해서는 Manual:Errors and Symptoms#Installation Errors을 참고하세요

다운로드 미디어위키 소프트웨어

You can download a release version of MediaWiki from the official download page: generally, if you're using a production environment, you want to be running the stable release.

To download MediaWiki 1.30.0, which is the latest stable release version, to a *nix machine you can use the following command:

wget https://releases.wikimedia.org/mediawiki/1.30/mediawiki-1.30.0.tar.gz

Alternatively, using cURL:

curl -O https://releases.wikimedia.org/mediawiki/1.30/mediawiki-1.30.0.tar.gz

The downloaded files are in .tar.gz format, so they will need to be uncompressed before use. This can be done locally (and then uploaded via FTP) or directly on your server. This is usually done with software such as 7-Zip (free), WinZip, WinRAR or IZArc (free) on Windows. On Linux and Mac OS X, you can untar the file using this command:

tar xvzf mediawiki-*.tar.gz
If you untar the archive as root, you should probably change the ownership afterwards with chown, otherwise the files will end up owned as user # 1000, which may or may not be what you want.

개발자들에게

Developers on the other hand should probably download from Git to set up a local repository with the latest code in development. They will also need to manually install dependencies via Composer.

업로드된 파일

If you have not already uploaded the files to your web server, do so now.

Upload the files to your web server's web directory either by:

  1. directly copying the unzipped folder or
  2. by using an FTP client such as FileZilla (Open Source Software, Windows, OSX and Linux) or Cyberduck (OSX).

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

If you installed Apache, the correct directory is specified in your httpd.conf file (it's the DocumentRoot directive, typically /var/www/ or <apache-folder>/htdocs). Note: This changed in Ubuntu 14.04 with Apache 2.4.7 where the primary configuration file for Apache server settings and directories is /etc/apache2/apache2.conf.

If you are using a Linux or Unix server you can instead copy the files to any directory on your server and then make a symbolic link to that folder from your web server's web directory.

Rename the uploaded folder to whatever you would like to have in the URL. If your web server is running as http://localhost for example, renaming to /w/ directory would mean you would access your wiki at http://localhost/w/index.php. Do not use /wiki/ if you want to use it as a Short URL. (And don't set up short URLs until you have run the installation script.)

Note that in certain cases, like when a local repository is set-up using Git, on browsing to index.php the Linux server might show the "500 Internal server Error". This is possibly a permissions error which can be resolved on changing the file and directory permissions by running the following command in SSH after changing directory to "w":
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

This (renamed) folder will now be referred as <MediaWiki-folder>.

데이터베이스 만들기

If you already have a database server and know the root password for it, the MediaWiki installation script can create a new database for you. If this is the case, you can skip to the Run the installation script section below. If you don't know the root password, for example if you are on a hosted server, you will have to create a new database now. Currently, you must use SQLite, MariaDB/MySQL or PostgreSQL to store the actual contents of your wiki.

SQLite

MediaWiki supports SQLite since version 1.13, however at least 1.16 is highly recommended. SQLite is a stand-alone database library that stores the database contents in a single file. If PHP has the pdo-sqlite module, no further setup is required.

On the installation page, you will need to 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

MediaWiki will ask you for database and user name and will attempt to create them if they don't already exist. If doing so from MediaWiki is impossible, you can do this using various control panels such as PhpMyAdmin, which are often available from shared hosts, or you may be able to use ssh to login to your host and type the commands into a MySQL prompt. See the corresponding documentation. Alternatively, contact your host provider to have them create an account for you.

Unix/Linux에 설치하기

  1. Download and install MariaDB/MySQL. Depending on how MariaDB/MySQL was installed on your system the commands mysql, mysqladmin and mysqld_safe may need to be amended to include the installation directory of MariaDB/MySQL (for example, by adding /usr/local/mysql/bin/ in front of them).
  2. Check and see if the database server is running; for example, run mysqladmin status. If it is not, run mysqld_safe to start it: sudo mysqld_safe.
    • Another way to initially start the MariaDB/MySQL server is to run the configure script available at the root of the installation. It creates the initial tables and automatically starts the MariaDB/MySQL daemon.
    • Alternatively you can start the MariaDB/MySQL daemon with systemd using: sudo systemctl start mysqld. You may also wish to enable the mysqld service with sudo systemctl enable mysqld, so that the MySQL service is started automatically on startup.
  3. Set a password for the "root" account on your database server. mysqladmin -u root password yourpassword
  4. Run the MariaDB/MySQL command-line client: mysql -u root -p
  5. This will prompt for the "root" database password you just set, then connect to the MariaDB/MySQL server. Now, continue with the SQL commands below.

윈도우에서 설치하기

  1. Download MySQL msi (mysql-5.5.22-winx64.msi for example)
  2. Run msi file and accept all defaults. When creating the root account, use a password that you will remember.
  3. Run Start->All Programs->MySQL->MySQL Server->MySQL Command Line Client
  4. Enter the root password you just created
  5. Now continue with the instructions below

설치후에는

CREATE DATABASE wikidb;
GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'localhost' IDENTIFIED BY 'password';

If your database is not running on the same server as your web server, you need to give the appropriate web server hostname -- mediawiki.example.com in my example -- as follows:

GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'mediawiki.example.com' IDENTIFIED BY 'password';
경고 경고: MySQL/MariaDB on UNIX/Linux logs all queries sent to it to a file, which will include the password you used for the user account. If this concerns you, delete your .mysql_history file after running these queries. This file may be found in your home directory (~/.mysql_history).

PostgreSQL

If you are using PostgreSQL, you will need to either have a database and user created for you, or simply supply the name of a PostgreSQL user with "superuser" privileges to the configuration form. Often, this is the database user named postgres.

Here's one way to do most of the setup. This is for a Unix-like system. In this example, we'll create a database named wikidb, owned by a user named wikiuser. From the command-line, as the postgres user, perform the following steps.

 createuser -S -D -R -P -E wikiuser (저기에 비밀번호를 입력하세요)
 createdb -O wikiuser wikidb

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

CREATE USER wikiuser WITH NOCREATEDB NOCREATEROLE NOSUPERUSER ENCRYPTED PASSWORD 'password';
CREATE DATABASE wikidb WITH OWNER wikiuser;

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

Run the installation script

Once all of the above steps are complete, you can complete the installation through a web browser by going to the index.php URL in your browser — check the instructions mentioned in 메뉴얼: 환경 설정 스크립트Manual:Config script.

The installation tool will prompt you to download the LocalSettings.php file, and to save this as <MediaWiki-folder>/LocalSettings.php.

Alternatively, you can run the command-line installer or CLI: php maintenance/install.php.


MediaWiki version: 1.16

MediaWiki 1.16 and earlier needed to be able to write to the <MediaWiki-folder>/config directory when it ran its installation script. This is not required in 1.17 and above.


Keep up to date!

Subscribe to our release announcements mailing list.

Once installed, make sure you stay up to date with releases, and keep your server secure!

Installation assistance


같이 보기