메뉴얼:위키 패밀리

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:Wiki family and the translation is 42% complete.

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎polski • ‎português • ‎português do Brasil • ‎русский • ‎हिन्दी • ‎தமிழ் • ‎සිංහල • ‎中文 • ‎日本語 • ‎한국어

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

기본 원칙

위키 패밀리의 공통적인 설정은 미디어위키의 단일 버전으로 실행합니다. 다음의 일반적인 단계는 이 시나리오를 필요로 합니다:

  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:
    1. Firstly, use $_SERVER['SERVER_NAME'] or $_SERVER['REQUEST_URI'] (or similar), and the MW_DB constant (and environment variable) to identify different wikis (e.g. as a variable called $wikiId). The former are for web requests, the latter for maintenance scripts (which you'll pass the --wiki parameter). Don't forget to fail nicely at this point if the wiki can't be identified.
      if ( defined( 'MW_DB' ) ) {
          // Set $wikiId from the defined constant 'MW_DB' that is set by maintenance scripts.
          $wikiId = MW_DB;
      } elseif (isset($_SERVER['SERVER_NAME']) && $_SERVER['SERVER_NAME'] == 'wiki1.example.org') {
          // Add a value to the $wikiId variable for e.g. https://wiki1.example.org/
          $wikiId = 'wiki1';
      } elseif (isset($_SERVER['SERVER_NAME']) && $_SERVER['SERVER_NAME'] == 'example.org' && substr($_SERVER['REQUEST_URI'], 0, 6) == '/wiki2') {
          // Add a value to the $wikiId variable for e.g. https://example.org/wiki2
          $wikiId = 'wiki2';
      } else {
          // Fail gracefully if no value was set to the $wikiId variable, i.e. if no wiki was determined
          die( 'It was not possible to determine the wiki ID.' );
      }
      
    2. Then, set up configuration variables that are based on the wiki ident. These include:
      $wgDBname = 'mediawiki_'.$wikiId;
      $wgDBuser = 'mediawiki_'.$wikiId;
      $wgCacheDirectory = "/tmp/mediawiki_".$wikiId."_cache";
      $wgUploadDirectory = "$IP/images_$wikiId";
      $wgUploadPath = "/images_$wikiId";
      
    3. Next, set configuration variables that are different for every wiki. These include:
      if ($wikiId == 'wiki1') {
          $wgSitename = "Wiki name";
          $wgServer = "https://wiki1.example.org";
          $wgLogo = "ExampleWiki_logo.png";
          $wgDBpassword = "we39485f7ha34";
          $wgSecretKey = "9348vhas589ytas35aurhgao94aywrotuhapw94u";
          $wgLanguageCode = 'pt';
      }
      
      These could also be included from a separate file, e.g. LocalSettings_$wikiId.php.
    4. Lastly, the rest of LocalSettings.php configures all of the common aspects, such as extensions, skins, etc.
  4. Shared resources can be configured, such as users, sessions, media (i.e. uploads), interwiki links, etc.
  5. Installing a new wiki in the family is a matter of creating the database and importing the database template, and then running php maintenance/update.php --wiki=wikiId. Upgrades and other maintenance tasks are similar.

The rest of this page elaborates on (or will do[update required]) the various parts of the above.

거대한 switch 문

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

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

        switch ( $_SERVER['SERVER_NAME'] ) {
                case 'shoopz.com':
                        require_once 'LocalSettings_shoopz_com.php';
                        break;

                case 'help.shoopz.com':
                        require_once 'LocalSettings_help_shoopz_com.php';
                        break;

                case 'wiki.shoopz.net':
                        require_once 'LocalSettings_wiki_shoopz_net.php';
                        break;

                default:
                        header( 'HTTP/1.1 404 Not Found' );
                        echo 'This wiki is not available. Check configuration.';
                        exit( 0 );
        }
동일한 미디어위키 코드를 가리키는 멀티 도메인을 설정하기 위해서, 해당 웹 서버와 DNS 구성을 수정해야 할 수도 있습니다. 그 방법에 대한 정보는 해당 웹 서버 및 웹 호스트의 설명서를 참조하세요.
  • 같은 도메인에 있지만 경로가 다른 경우 (예를들면, yourdomain.com/wiki1, yourdomain.com/wiki2 등등) 다음과 같이 이용할 수 있습니다:
<?php
// Include common settings to all wikis before this line (eg. database configuration)

$callingurl = strtolower( $_SERVER['REQUEST_URI'] ); // 호출되는 url 을 얻기
if ( strpos( $callingurl, '/wiki1' )  === 0 ) {
        require_once 'LocalSettings_wiki1.php';
} elseif ( strpos( $callingurl, '/wiki2' ) === 0 ) {
        require_once 'LocalSettings_wiki2.php';
} elseif ( strpos( $callingurl, '/wikiN' ) === 0 ) {
        require_once 'LocalSettings_wikiN.php';
} else {
        header( 'HTTP/1.1 404 Not Found' );
        echo "This wiki (\"" . htmlspecialchars( $callingurl ) . "\") is not available. Check configuration.";
        exit( 0 );
}
두번째 경우로 (디렉터리 기반 위키) Short URL 을 사용할 경우, 두 디렉터리를 확인하고: strpos( $callingurl, 'wiki1', 0 ) || strpos( $callingurl, 'w1/', 0 ), 소스를 심볼릭 링크한 다음 (w1 -> w), $wgScriptPath에 적용할 필요가 있습니다.

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

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

명령줄로부터 위키팜 업데이트하기

EXPORT 사용하기

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

SERVER_NAME=foo.subdomain.org
export SERVER_NAME
php update.php

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

REQUEST_URI="/wiki1"
export REQUEST_URI
php update.php

conf 파라미터 사용하기

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

php update.php --conf ../LocalSettings_shoopz_com.php

드루팔 스타일의 사이트

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. mkdir /home/web/mediawiki.
  1. Install MediaWiki and additional tools as usual to a version-declaring subdirectory (e.g., /home/web/mediawiki/mediawiki-1.10.0).
  2. Link the version-declaring directory to a code directory. e.g., ln -s /home/web/mediawiki/mediawiki-1.10.0 /home/web/mediawiki/code
  3. Create a sites directory to contain our images and settings: mkdir /home/web/mediawiki/sites
  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., mkdir /home/web/mediawiki/sites/mysite.com.mywiki. 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., mkdir /home/web/mediawiki/sites/mysite.com.wiki/images. Make it writable as necessary.
  7. Place the Drupal-style LocalSettings.php file in your main directory: cp DrupalLocalSettings.php /home/web/mediawiki/code/LocalSettings.php
  8. Modify the LocalSettings.php of each subsite to point to the right places:
    1. First comment out the code relating to $IP, (lines 16-20 in 1.15.3) as this is set to the code directory by index.php.
    2. Next insert the following two lines to ensure that image files are accessible, e.g.: $wgUploadDirectory = "/home/web/mediawiki/sites/wiki.mysite.com/images"; and $wgUploadPath = "/images";. These need to be put somewhere after the call to DefaultSettings.php (line 25 in 1.15.3), as the variables will otherwise be reset.
    3. Make further modifications as required.
  9. Prepare your Apache 2 installation. Example site: wiki.mysite.com
    1. Create a link to the code directory, if required e.g. ln -s /home/web/mediawiki/code /home/web/wiki.mysite.com
    2. Create an appropriate VHost configuration:
<VirtualHost *:80>
    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
    #  <Directory /home/web/wiki.mysite.com>
    #    AuthType Basic
    #    AuthName "My protected Wiki"
    #    AuthUserFile /etc/apache2/htpasswd/users-mywiki
    #   require valid-user
    #  </Directory>
</VirtualHost>
11. If you are setting the sites up locally, update your hosts 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 $_SERVER['HTTP_HOST'] 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:

공용 자료를 공유하는 여러 위키

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

예를 들어:

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

설치

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

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

For example, enter

rm -R extensions/

and then enter

ln -s pathtopool/extensions/ extensions
Don't forget to allow your Apache to Follow Symbolic Link editing your httpd.conf adding FollowSymLinks options
However, you should not replace the cache, mw-config(config ≤ MW 1.16.x) and images directories.

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

mklink /D pathtolink pathtotarget

구성

위키 구성

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 /wiki/../maintenance/runJobs.php --maxjobs 1 piling up in your server's memory. 각 LocalSettings.php 안으로 아래 줄을 포함하세요.
$wgJobRunRate = 0;

인터위키

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 [[de: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:

$wgUploadNavigationUrl = "http://pool.yourwiki.org/index.php/Special:Upload";

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

$wgUploadMissingFileUrl= "http://pool.yourwiki.org/index.php/Special:Upload";

공유된 파일 사용

To use poolwiki's files in the languagewikis, open "LocalSettings.php" for each languagewiki and add:

$wgUseSharedUploads = true;
$wgSharedUploadPath = 'http://pool.yourwiki.org/images';
$wgSharedUploadDirectory = '/(LOCALPATH)/POOL-FOLDER/images/';
$wgHashedSharedUploadDirectory = true;

Now you can integrate pool's files with (e.g. [[Image:MyLogo.png]]) 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

[[:pool:Image:{{PAGENAME}}|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:

$wgFetchCommonsDescriptions = true;
$wgSharedUploadDBname = 'pool';  # DB-Name of PoolWiki
$wgSharedUploadDBprefix = 'wiki_'; # Table name prefix for PoolWiki
$wgRepositoryBaseUrl = "http://pool.yourwiki.org/index.php/Image:";

공유된 설정

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.
<?php
#####
##### Extension Directory Variables
#####
##
## These variables allow you to specify a single, shared directory for each grouping of extensions.
## If the directory ever needs to be changed, it can be changed here rather than on every
## item below. DO NOT include a trailing "/".
##
## Extensions from gerrit.wikimedia.org
# $wgWikimediaExtensions = "/var/www/wikimediaextensions";
##
## Any third-party extensions
# $wgOtherExtensions = "/var/www/extensions";
#####
#####

### Add globalized extension settings below
#require_once "$wgWikimediaExtensions/ReallyCoolExtension/ReallyCoolExtension.php"; #An example Wikimedia Subversion extension entry

#require_once "$wgOtherExtensions/ReallyCoolExtension/ReallyCoolExtension.php"; #An example third-party extension entry
  • 2단계
    Edit the LocalSettings.php file of each wiki that you want to use the shared settings, and add the following.
require_once "/absolute/path/to/ExtensionSettings.php";
  • 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 mediawiki/LocalSettings.php. In real life we must deal with the slight differences in the names and databases of the sites we manage.

if ( !defined( 'MEDIAWIKI' ) ) { 
exit; 
}    #Protect against web entry
$mysites = array(
    array( '台掃', 'radioscanningtw.jidanni.org', 'radioscanningtw' ),
    array( '蝶園', 'transgender-taiwan.org',      'transgender' ),
    array( 'ABJ',    'abj.jidanni.org',             'mwabj' )
);
$mystrings = array( $_SERVER['SCRIPT_FILENAME'] );
if ($wgCommandLineMode) { $mystrings[] = $_SERVER['PWD']; }
$mystrings[] = $IP;
foreach ( $mysites as $site ) {
    foreach ( $mystrings as $string ) {
        if ( strpos( $string, $site[1] ) !== false ) {
            $wgSitename = $site[0];
            putenv( "MW_INSTALL_PATH=/home/jidanni/" . $site[1] );
            $wgDBname = $site[2];
            break 2;
        }
    }
}
if ( $wgSitename == 'MediaWiki' ){
  trigger_error('Oh no, I still have not set $wgSitename. Somebody tell me. TEL +886-963-114343',E_USER_ERROR);}

## For maintenance scripts, https://bugzilla.wikimedia.org/show_bug.cgi?id=19593 :
if ( $wgServer == 'http://localhost' ) {
    $wgServer = $wgInternalServer = 'http://' . $site[1];
}
$wgUsePathInfo = false; 
$wgScriptPath = ''; 
$wgDBserver = 'mysql.transgender-taiwan.org';
$wgLogo = "/images/$wgDBname/$wgDBname.png";
switch ( $wgSitename ) {
  #any per-wiki customizations
}

Note we still individually do database related tasks, e.g., php update.php. (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: for i in aaa bbb ccc; do mkdir -p /home/user/images/$i; done, and in aaa.example.org's vhost: Alias /w/images /home/user/images/aaa. Same for bbb and ccc.

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

새 위키 추가하기

Wiki family/ko 제품으로 위키를 추가하려면

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

오래된 위키 제거하기

Wiki family/ko 제품에서 위키를 제거하려면

  1. 다음 구성을 제거하세요
    1. 웹 서버
    2. LocalSettings.php
  2. 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 :-)

  1. 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.
  2. After that, export your database with mysqldump, phpMyAdmin, etc. This database export can also be structure-only (e.g. mysqldump -uroot -p --no-data dbname > template.sql), in which case you'll have to create the first user with createAndPromote.php. Save this on your server in the maintenance/ directory as something like template.sql.
  3. 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).
  4. In your configuration file, add something like this, fixing the database prefix and your domain as necessary:
    if ( defined( 'MW_DB' ) ) {
        // Command-line mode and maintenance scripts (e.g. update.php) 
        $wgDBname = MW_DB;
    } else {
        // Web server
        $server = $_SERVER['SERVER_NAME'];
        if ( preg_match( '/^(.*)\.example-farm.org$/', $server, $matches ) ) {
            $wikiname = $matches[1];
        } else {
            die( "Invalid host name, can't determine wiki name" );
            // Optional: Redirect to a "No such wiki" page.
        }
        if ( $wikiname === "www" ) {
            // Optional: Override database name of your "main" wiki (otherwise "wwwwiki")
            $wikiname = "meta";
        }
        $wgDBname = $wikiname . "wiki";
    }
    
  5. Configure your DNS with a wildcard A record, and apache with a server alias (like ServerAlias *.example-farm.org) and you should be in business.

The script maintenance/update.php takes a --wiki parameter that is exported as MW_DB 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":

php maintenance/update.php --wiki catwiki

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 Manual:$wgConf#Example 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.

위키 팜 확장 기능

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


같이 보기

각주

  1. "serialised" 폴더와 관련된 이 스레드를 보세요
  2. In지원되는 경우, 일부 또는 모든 확장 기능을 설치하기 위해 Composer를 사용합니다