Manual:Wiki family/ko

다음은 하나 이상의 위키를 호스트하기 위한 미디어위키 설정 방법에 관한 지침입니다. 같은 서버에 위치한 여러 개의 위키를 위키 패밀리, 위키 팜이라고 합니다. 알려진 위키 팜 목록은 WikiApiary에서 볼 수 있습니다.

기본 원칙
위키 패밀리의 공통적인 설정은 미디어위키의 단일 버전으로 실행합니다. 다음의 일반적인 단계는 이 시나리오를 필요로 합니다: The rest of this page elaborates on (or will do[update required]) the various parts of the above.
 * 1) Install a normal MediaWiki site, and create a database template from it. This can either be completely empty (i.e. no rows in any tables) or can have whatever initial pages, users, interwiki links, etc. that you want in any new member of the family.
 * 2) Set up your web server to route traffic from multiple places to the one MediaWiki installation. This can be for multiple domains, subdomains, or subdirectories, and can be done with symlinks, aliases, URL rewriting, or other mechanisms.
 * 3) Configure the family in LocalSettings.php, in four broad sections:
 * 4) Firstly, use $_SERVER['SERVER_NAME'] or $_SERVER['REQUEST_URI'] (or similar), and the   constant (and environment variable) to identify different wikis (e.g. as a variable called  ). The former are for web requests, the latter for maintenance scripts (which you'll pass the   parameter). Don't forget to fail nicely at this point if the wiki can't be identified.
 * 5) Then, set up configuration variables that are based on the wiki ident. These include:
 * 6) Next, set configuration variables that are different for every wiki. These include: These could also be included from a separate file, e.g..
 * 7) Lastly, the rest of LocalSettings.php configures all of the common aspects, such as extensions, skins, etc.
 * 8) Shared resources can be configured, such as users, sessions, media (i.e. uploads), interwiki links, etc.
 * 9) Installing a new wiki in the family is a matter of creating the database and importing the database template, and then running  . Upgrades and other maintenance tasks are similar.

거대한 switch 문
이것은 동일 소스 코드 체크아웃을 이용하면서, 단일 서버에 하나 이상의 위키를 설치하도록 해줍니다.


 * 1) 미디어위키 파일을 웹 서버의 웹 폴더에 업로드합니다.
 * 2) 평소와 같이 초기 위키를 설정합니다. 자세한 사항은, 를 참조합니다.
 * 3) 성공적인 설치 후,  를 위키의 루트 디렉터리로 옮기고 추적하기 쉽게 이름을 변경합니다 (예를 들어, LocalSettings_myFirstWiki.php)
 * 4) 만들고 싶은 각 위키만큼 2단계와 3단계를 반복하여, 각 위키를 위한 새로운 LocalSettings.php를 만듭니다 (예를 들어, LocalSettings_anotherWiki.php, 등등)
 * 5) 두 개 이상의 구분되어 설치된 위키일 경우 주 위키의 파일 밖으로 작동하도록 병합할 수 있으며, 이름을 바꾸고 나서 각 LocalSettings.php 파일을 주 위키 폴더로 옮긴 다음, 각 LocalSettings.php 파일을 주 위키의 폴더를 가리키도록  변수를 바꿉니다.
 * 6) 전역 설정을 위해 LocalSettings.php 파일을 만든 다음 아래의 두 가지 가능성에서 하나를 선택합니다:


 * 서버의 한 디렉터리로 연결하는 다른 (하위)도메인이 있다면, 이것을 사용하세요:


 * 같은 도메인에 있지만 경로가 다른 경우 (예를들면,,   등등) 다음과 같이 이용할 수 있습니다:

각각의 위키에 서로 다른 DB를 사용할 것을 권장합니다 (각각의 위키를 위해 서로 다른 설정). 하나의 데이터베이스로 제한되어있다면, 다른 설치를 구별하기 위해 다른 접두어 를 사용할 수 있습니다.

의외적인 접속 경로는 메인 위키의 Url 로 간단히 리다이렉팅 하는 것이 "이 위키는 이용할 수 없습니다" 메시지보다 유용할 수 있습니다.

EXPORT 사용하기
이 기능은 maintenance/update.php를 실행하기위해 를 필요로 합니다. 커맨드라인으로 설정할 수 있습니다. 이것은 환경 변수를 설정함으로서 극복할 수 있습니다:

하위디렉터리 메서드를 사용한다면, 다음을 사용할 수 있습니다:

conf 파라미터 사용하기
거대한 switch 문에서 제안한대로 각각의 위키에 맞게 분리된 을 이용중이라면,  에  파라미터를 사용해서 설정 파일을 알리는 방법이 있습니다. 예를 들어:

드루팔 스타일의 사이트
As above, this setup allows you to install more than one wiki using different databases on a single server, using the same source code. This setup has the advantage of being completely transparent to users and reasonably secure in terms of the images directory.


 * 1) Create a base directory to contain all your MediaWiki files e.g..

 ServerAdmin me@myserver.com DocumentRoot /home/web/wiki.mysite.com ServerName wiki.mysite.com CustomLog /var/log/apache2/wiki.mysite.log common # Alias for the site to be accessible Alias /mediawiki/code /home/web/mediawiki/code # Alias for Wiki so images work Alias /images /home/web/mediawiki/sites/wiki.mysite.com/images # If you want to password protect your site #  #   AuthType Basic #   AuthName "My protected Wiki" #   AuthUserFile /etc/apache2/htpasswd/users-mywiki #  require valid-user #  
 * 1) Install MediaWiki and additional tools as usual to a version-declaring subdirectory (e.g.,  ).
 * 2) Link the version-declaring directory to a code directory. e.g.,
 * 3) Create a sites directory to contain our images and settings:
 * 4) Setup the wiki as normal from the /code directory.
 * 5) After successful installation, move LocalSettings.php into a sites directory that will be a match when the site is checked. For example, to capture http://mysite.com/mywiki, one would create the directory mysite.com.mywiki. e.g.,  . See the Drupal's settings.php file for more information on this.
 * 6) If you intend to use media files, create an images directory in your site directory. e.g.,  .  Make it writable as necessary.
 * 7) Place the Drupal-style LocalSettings.php file in your main directory:
 * 8) Modify the LocalSettings.php of each subsite to point to the right places:
 * 9) First comment out the code relating to , (lines 16-20 in 1.15.3) as this is set to the code directory by.
 * 10) Next insert the following two lines to ensure that image files are accessible, e.g.:   and  . These need to be put somewhere after the call to   (line 25 in 1.15.3), as the variables will otherwise be reset.
 * 11) Make further modifications as required.
 * 12) Prepare your Apache 2 installation. Example site: wiki.mysite.com
 * 13) Create a link to the code directory, if required e.g.
 * 14) Create an appropriate VHost configuration:
 * 11. If you are setting the sites up locally, update your  file with the site names. 사이트가 이제 작동해야 합니다.

In my case, I made another copy of the code from which to install and update my LocalSettings.php and databases. Note that  in the companion Drupal code is undefined when running maintenance scripts from the command line, so this solution does not permit the use of maintenance scripts without some modification.

Ubuntu를 위한 수정된 드루팔 스타일의 메서드
A simplified method for multiple wikis and multiple (or nested) subwikis on Ubuntu/Kubuntu that is loosely based on the above method can be found at:
 * Ubuntuguide.org 미디어위키 팁

공용 자료를 공유하는 여러 위키
당신은 다른 언어에, 하나의 위키에서 같은 미디어 파일을 공유하는 어떤 위키를 가지고 싶어합니다.

예를 들어:


 * en.yourwiki.org -
 * fr.yourwiki.org -
 * de.yourwiki.org -
 * pool.yourwiki.org - (공용과 같은) 이러한 모든 위키를 위한 미디어 파일.
 *  여기에는 이미 위키미디어 공용을 위한 인터위키링크인 commons가 이미 있으므로, 우리는 미디어 파일 위키를 "pool"로 짓습니다. 
 * 만들기 전에 생각해주세요; 미디어-파일-위키로 "media"와 같이 호출한다면 (예 media.example.com), 안쪽 이름공간과 포함된 미디어 파일을 위한 명칭 ( [[media:file.ext]] )과 충돌할 수 있습니다.

파일 시스템에서, 각 위키에 대한 폴더를 만드세요. 각 위키에 대한 설치 스크립트를 실행하세요.

이 솔루션은 소스 코드가 중복됩니다. 이러한 중복을 줄이고 캐시 성능을 개선하려면, pool의 디렉터리로의 심볼릭 링크로 비 pool 설치에 대해  (≤ MW 1.20.x), ,  ,  ,  ,  ,   (≤ MW 1.17.x),  ,  ,  ,   및   (≥ MW 1.22.x ) 디렉터리를 바꿀 수 있습니다:

For example, enter  and then enter''

Windows에서 같은 작업을 수행하려면 다음 코드를 사용하세요,

위키 구성
$wgJobRunRate = 0;

인터위키
Now you have to set Interwikilinks between all wikis, by editing their MySQL-Databases (if you prefer, install and use )
 * 테이블 Interwiki
 *  iw_prefix - enter the language-code of the wikis, "de" for German, "en" for English, "fr" for French and "pool" for the mediapoolwiki
 *  iw_url - this is the place for the complete URL to the wikis, e.g. " http://de.yourwiki.org/index.php/$1 " for the German wiki (don't forget the "$1" !).

Enter as many records into table Interwiki than you have different wiki (so one record for German, one for English, one for media for example).

Now you can link an article to the same in another languages. Adding Hauptseite on your English Main_Page will create the link "Deutsch" (under the Navigation bar) which leads to the Main_Page of the German wiki (Hauptseite). For further information visit

Note to page Special:Interwiki: (you will see a long table) Add in the German wiki the prefix 'en' and the url http://en.yourwiki.org/index.php/$1 and set the checkbox 'Als lokales Wiki definiert'. Do it in the English wiki vice versa with checkbox 'Forward'. And in both wikis enter a second prefix 'pool' and http://pool.yourwiki.org/index.php/$1 and check the checkbox 'Forward'.

올리기
Make sure that folder "images" of the pool-wiki is writable.

It is useful to change the "Upload file"-Link of the language-wikis to point to poolwiki's upload-site. Open the "LocalSettings.php" of each language-wiki and add:

In 1.17, you'll also have to set $wgUploadMissingFileUrl to be redirected to the pool-wiki on red links.

공유된 파일 사용
To use poolwiki's files in the languagewikis, open "LocalSettings.php" for each languagewiki and add:

Now you can integrate pool's files with (e.g. ) in the languagewikis.

그림 설명
In each languagewiki, open (as an admin) the message MediaWiki:Sharedupload-desc-here.

Change the text to something like: This file is stored in our data-pool. For information and description, please visit the

description there. (And note the ':' at the beginning of the line, which stops 'pool' from being included in the interwiki list at the left of the page.)

If you want to output the media-description, stored in the PoolWiki, too, add to the "LocalSettings.php" of the languagewikis:

공유된 설정
If you have multiple wikis, you'll probably want to share similar settings across them all. Here is how to do that. We recommend that you separate your Extension settings into a different file than your other settings, as detailed below. They can be all put into one large file, but it's not as flexible depending upon your specific needs.

Here is an example directory structure if you do all of the following:

en/ es/ pl/ ja/ pool/ ExtensionSettings.php WikiFamilySettings.php SharedMediaSettings.php

확장기능 설정

 * 1단계
 * Create a file called ExtensionSettings.php with the following contents, and place it in a location similar to the example above.


 * 2단계
 * Edit the LocalSettings.php file of each wiki that you want to use the shared settings, and add the following.
 * 3단계
 * Now just add all the references to your various extensions

위키 패밀리 설정
These are settings that you want to apply to the entire wiki family. For example, maybe you want to be able to easily put all the wikis into read-only mode at the same time. You can also store the username/password for the database(s), if they are all the same. Additionally, you could control user permissions across your entire wiki from this one file.

Note: If you use a Images/Media commons or pool, we recommend that you do not put these settings in the WikiFamilySettings.php file. That information only applies to every wiki in your wiki family other than your repository. We recommend putting it in a separate file.

공유된 데이터베이스 테이블
See Manual:Shared database for instructions on setting up shared database tables.

궁극적인 최적화 솔루션
The "ultimate minimalist solution" consists of symlinks;

$ ls -og lrwxrwxrwx 1 16 2008-11-03 06:29 aaa.example.org -> mediawiki lrwxrwxrwx 1 16 2008-11-03 06:29 bbb.example.org -> mediawiki lrwxrwxrwx 1 16 2008-11-03 06:29 ccc.example.org -> mediawiki

Let's see a real example of. In real life we must deal with the slight differences in the names and databases of the sites we manage.

Note we still individually do database related tasks, e.g.,  (The above code should detect which wiki's update.php you are referring to.) Upgrading is simple if you download from Git. (Hopefully there is no more code that assumes there is only one wiki on the disk...)

그림
Unless you do not allow uploads or allow them only for your pool wiki, you will need to create separate image directories and alias them in your vhost configuration: , and in aaa.example.org's vhost: . Same for bbb and ccc.

However you may instead just prefer , where *.example.org/images/ just point to the same single directory. Or one could use e.g., *.example.org/$wgDBname/images/.

새 위키 추가하기
제품으로 위키를 추가하려면
 * 1) 웹 서버에 그 구성을 추가하세요
 * 2) config/index.php에서 를 일시적으로 주석 처리하고 나서 그것을 실행하세요
 * 3) LocalSettings.php 안으로 제작된 config/LocalSettings.php를 병합하세요
 * 4) 문서를 추가하세요

오래된 위키 제거하기
제품에서 위키를 제거하려면
 * 1) 다음 구성을 제거하세요
 * 2) 웹 서버
 * 3) LocalSettings.php
 * 4) DROP DATABASE

위키미디어 메서드
Another option is using the method that the Wikimedia Foundation uses. The rough steps are listed below. This method isn't for the faint of heart, but it has fairly good results, as can be seen by the success the Wikimedia Foundation has had by using this :-)  Configure a template copy of MediaWiki through the online configuration wizard. Edit the Main Page if you want a default main page for every wiki you create on your farm. After that, export your database with mysqldump, phpMyAdmin, etc. This database export can also be structure-only (e.g. ), in which case you'll have to create the first user with . Save this on your server in the maintenance/ directory as something like  . Now, write up a few quick scripts to create a new wiki. In summary, you'll need to duplicate the database for a list of wikis (the list can be flat-file based or MySQL/SQLite based). First export the template wiki, then import the template database dump back into the database under the name of each new wiki. Use a standard suffix after the new database name (i.e. if the wiki is cat.example-farm.org, then you might choose catwiki as the database name). In your configuration file, add something like this, fixing the database prefix and your domain as necessary:  Configure your DNS with a wildcard A record, and apache with a server alias (like ) and you should be in business.</li> </ol>

The script maintenance/update.php takes a  parameter that is exported as   constant. Your LocalSettings.php file needs to set it as the correct $wgDBname. (On the command-line there is no HTTP request, and no "SERVER_NAME":

Your unique LocalSettings.php (which usually consists in a few lines including a CommonSettings.php not directly accessible from the server) uses the $wgDBname variable to initialise the wiki-specific settings. See for how.

You'll also need to fix the upload directories unless you want every wiki to use the same files. As said above, this is probably one of the hardest methods to do, and it requires more technical experience, but it can give really good, clean results.

위키 팜 확장 기능
단일 코드 기반을 사용하여 여러 위키를 간단히 호스팅하기 위한 여러 미디어위키 확장 기능이 있습니다:


 * - beta, updated 2017
 * - beta, updated 2014
 * - unmaintained
 * - unmaintained

같이 보기

 * 데이터베이스 구성
 * 미디어위키 파머 사용자 그룹 및 Wikifarm
 * — the mechanism by which user accounts can have an extra 'central' identifier.
 * 미디어위키 파머 사용자 그룹 및 Wikifarm
 * — the mechanism by which user accounts can have an extra 'central' identifier.
 * — the mechanism by which user accounts can have an extra 'central' identifier.
 * — the mechanism by which user accounts can have an extra 'central' identifier.