Manual:Wiki family/ko

아래는 한 위키보다 많이 호스트하기 위해 어떻게 미디어위키를 설정하는지에 대한 지침입니다. 같은 서버에 위치한 여러 위키는 위키 패밀리라 부릅니다.

거대한 switch 문
이것은 같은 소스 코드 체크아웃을 사용해, 단일 서버에 한 위키보다 많이 설치할 수 있도록 해줍니다.


 * 1) 웹서버에 웹 폴더로 미디어위키 파일을 올립니다.
 * 2) 평소와 같이 초기 위키를 설정합니다. 자세한 사항은, 를 보세요.
 * 3) After successful installation, move  into the root directory of your wiki and rename it in such a way to make it easy to track (e.g. LocalSettings_myFirstWiki.php)
 * 4) 만들고 싶은 각 위키만큼 2단계와 3단계를 반복하여, 각 위키를 위해 새 LocalSettings.php를 만듭니다 (예를 들어, LocalSettings_anotherWiki.php, 등등)
 * 5) If two or more separately installed wikis are to be merged to operate out of files of the main wiki, then after renaming and moving each of your LocalSettings.php files to the main wiki folder, change the variable  in each of the LocalSettings.php files to point to the main wiki's folder.
 * 6) 전역 설정을 위해 LocalSettings.php 파일을 만든 다음 아래의 두 가지 가능성에서 하나를 선택합니다:


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


 * 같은 미디어위키 코드를 가리키는 여러 도메인을 설정하려면, 웹 서버와 가능한 DNS 환경 설정을 수정해야 할 수도 있습니다.

그걸 하는 방법에 대한 정보는 웹 서버 및/또는 웹 호스트의 설명서를 보세요.


 * 위키가 같은 도메인에 있지만 다른 경로에 있으면 (예,   등등), 이같은 것을 사용할 수 있습니다:


 * 두번째 경우로 (디렉터리 기반 위키) Short URL을 사용할 경우, 두 디렉터리를 확인하고:, 소스를 심볼릭 링크한 다음 ,  에 적용할 필요가 있습니다.

It is reccomended to use a different DB for each wiki (By setting a different for each wiki). However if you are limited to a single database, you can use a different prefix to separate the different installs.

"This wiki is not available. Check configuration." 대신에, 간단히 아무 인식할 수 없는 위키 URL을 "주" url로 넘겨주기하는 것이 유용할 수도 있습니다.

명령줄로부터 위키팜 업데이트하기
This method requires the to be present to run maintenance/update.php - which of course it isn't, from the commandline. 이것은 환경 변수를 설정함으로서 극복할 수 있습니다:

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

드루팔 스타일의 사이트
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.


 * Create a base directory to contain all your MediaWiki files e.g..
 * Install MediaWiki and additional tools as usual to a version-declaring subdirectory(e.g., ).
 * Link the version-declaring directory to a code directory. e.g.,
 * Create a sites directory to contain our images and settings:
 * Setup the wiki as normal from the /code directory.
 * 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.
 * If you intend to use media files, create an images directory in your site directory. e.g., . Make it writable as necessary.
 * Place the Drupal-style LocalSettings.php file in your main directory:
 * Modify the LocalSettings.php of each subsite to point to the right places:
 * First comment out the code relating to, (lines 16-20 in 1.15.3) as this is set to the code directory by.
 * 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.
 * Make further modifications as required.


 * Prepare your Apache 2 installation. Example site: wiki.mysite.com
 * Create a link to the code directory, if required e.g.
 * Create an appropriate VHost configuration:

 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 #  


 * 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 ) 디렉터리를 바꿀 수 있습니다: 예를 들어,   를 입력하고    를 입력하세요

Don't forget to allow your Apache to Follow Symbolic Link editing your  adding   options

However, you should not replace the,  (  ≤ MW 1.16.x) and   directories.

To do the same in Windows, use

위키 구성
It is imperative, that you modify LocalSettings.php of your different wiki installations right from the start (even before creating the symbolic links), or you will have  piling up in your server's memory. 각 LocalSettings.php 안으로 아래 줄을 포함하세요.

$wgJobRunRate = 0;

Interwiki
Now you have to set Interwikilinks between all wikis, by editing their MySQL-Databases (if you prefer, install and use Extension:Interwiki)
 * 테이블 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 Help:Interwiki linking

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. 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 a gist, you'll need to add it to a list of wikis, which can be flat-file based or MySQL/SQLite based, and then import the template database dump back into the database under the name of a new wiki. Use a standard suffix after the new database name (i.e. if the wiki is meta.yourdomain.net, then you might choose metawiki 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 can be included from a another php script, update_farm.php for example, and this outer script will set the various SERVER values that are needed by your LocalSettings.php to set the correct $wgDBname:

and the command line for updating meta.yourdomain.net is, from your unique mediawiki directory:

Your unique LocalSettings.php (which usually consists in a few lines including a CommonSettings.php not directly accessible from the server) decodes the variable meta and will set the $wgDBname accordingly.

The DOCUMENT ROOT directory (similar to the value set in your httpd.conf) can also be used in your CommonSettings.php in order to have more flexibility, like using a test server.

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.

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



같이 보기

 * 데이터베이스 구성
 * Extension:CentralAuth
 * Manual:InitialiseSettings.php 및 Manual:CommonSettings.php
 * 미디어위키 파머 사용자 그룹 및 Wikifarm