WikiFarms are a mechanism for running multiple independent wikis on the same web server from a single PmWiki installation.
If a WikiFarm is a collection of independent wikis, then each independent wiki in the farm is commonly called a WikiField.
A person who manages the PmWiki software installation is commonly called a farm administrator, the location of the PmWiki software is called the "farm directory" and any administrators of individual fields are called field administrators.
Each field must have its own base URL, but can share pages and WikiGroups?, uploads, page templates, passwords,
and other local customizations? with other fields.
For a quick explanation of what goes where and what it controls, see PmWiki:QuickFarms.
WikiFarmsã¯å˜ä¸€ã®Pm Wikiã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«å ´æ‰€ã‹ã‚‰å¤šæ•°ã®ç‹¬ç«‹ã—ãŸWikiã‚’å‹•ã‹ã™ç‚ºã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã§ã™ã€‚
Wiki FarmãŒç‹¬ç«‹ã—ãŸWikiã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãªã‚‰, ファームã®å„Wikiã¯ä¸€èˆ¬ã« WikiField ã¨å‘¼ã°ã‚Œã¾ã™ã€‚
個々ã®fieldã®ç®¡ç†è€…ã¯ãƒ•ィールド管ç†è€…ã¨å‘¼ã°ã‚Œã‚‹ã¾ã™ãŒ,
PmWikiã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã‚’管ç†ã™ã‚‹äººã¯ã€ä¸€èˆ¬ã«ãƒ•ァーム管ç†è€…ã¨å‘¼ã°ã‚Œã¾ã™ã€‚
å„フィールドã¯è‡ªèº«ã®åŸºæº–URLã€ãƒšãƒ¼ã‚¸ã‚»ãƒƒãƒˆã€Wikiã‚°ãƒ«ãƒ¼ãƒ—ã€æ·»ä»˜, ページテンプレート, パスワード, åŠã³ä»–ã®ãƒãƒ¼ã‚«ãƒ«ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã‚’有ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚
ç°¡å˜ãªèª¬æ˜Žã¨è¨å®šã«ã¤ã„ã¦ã¯ã€PmWiki:QuickFarmsã‚’å‚ç…§ã—ã¦ãã ã•ã„。(?)
The remainder of this document describes how to setup WikiFarms and individual fields of the farm, and assumes you are already somewhat familiar with the details of PmWiki installation?.
ã“ã®æ–‡æ›¸ã®æ®‹ã‚Šã¯WikiFarmsã¨ãƒ•ァームã®å„フィールドã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—方法を説明ã™ã‚‹ãŒã€ ã™ã§ã«è¨ç½®ã•れãŸPmWikiã®è©³ç´°ã‚’良ã知ã£ã¦ã„ã‚‹ã“ã¨ã‚’剿ã¨ã™ã‚‹ï½¡
Any PmWiki installation can become the WikiFarm on a particular web server.
è¨ç½®ã•れãŸã€ã©ã®PmWikiも特定ã®Webサーãƒã®WikiFarmã«å‡ºæ¥ã‚‹ã€‚
Setting up a PmWiki installation to act as a WikiFarm is fairly straightforward.
The farm administrator simply creates a local/farmconfig.php file in the farm's "home directory" (the directory in which pmwiki.php is installed).
This file would contain any local customizations? that are to be performed for every field in the farm (farmconfig.php replaces the config.php file of a typical installation).
Usually, this will mean setting $FarmPubDirUrl to reasonable settings for the new field.
A minimal farmconfig.php file might look like this:
è¨ç½®ã•れãŸPmWikiã‚’WikiFarmã¨ã—ã¦æ©Ÿèƒ½ã•ã›ã‚‹ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã¯ã€ã¨ã¦ã‚‚ç°¡å˜ã§ã™ã€‚
ファーム管ç†è€…ã¯å˜ã«ã€ãƒ•ァームã®"ホームディレクトリ"(pmwiki.phpãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã‚‹)ã«local/famconfig.phpを作æˆã—ã¾ã™ï½¡
ã“ã®ãƒ•ァイルã¯ã€ãƒ•ァームã«å«ã¾ã‚Œã‚‹å…¨ã¦ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«æœ‰åйã¨ã™ã‚‹ãƒãƒ¼ã‚«ãƒ«ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºãŒå«ã¾ã‚Œã¦ã„ã‚‹ã¹ãã§ã™(famconfig.phpã¯é€šå¸¸ã®è¨å®šãƒ•ァイルã§ã‚ã‚‹config.phpã‚’ç½®ãæ›ãˆã¾ã™)
通常ã€ã“ã‚ŒãŒæ–°ãŸãªãƒ•ィールドをè¨å®šã™ã‚‹ç‚ºã«ä¾¿åˆ©ãª$FarmPubDirUrlã‚’è¨å®šã™ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ï½¡
最å°ã®farmconfig.phpã¯ã€ã“ã®ã‚ˆã†ã«è¦‹ãˆã‚‹ã§ã—ょã†ã€‚
<?php if (!defined('PmWiki')) exit();
$FarmPubDirUrl = 'http://www.example.com/pmwiki/pub';
$FarmPubDirUrl is used to provide fields with the URL location of the farm's pub/ directory.
$FarmPubDirUrlã¯ãƒ•ィールドã«ã€ãƒ•ァームã®pub/ディレクトリ(公開ディレクトリ)を与ãˆã‚‹ãŸã‚ã«ä½¿ç”¨ã•れる。
注)セットアップè¦ä»¶ã«ã‚ˆã£ã¦ã¯ã€ä¸»è¦ãªFarmスクリプト(ã¤ã¾ã‚Špmwiki.php)ã‚’Webサーãƒã®éžã‚¢ã‚¯ã‚»ã‚¹é ˜åŸŸã«è¨ç½®ã—ãŸã„ã§ã—ょã†ã€‚ã‚‚ã—.htaccessã§è¨å®šã§ããªã‘れã°ã€è©³ç´°ã¯Cookbook:FarmSecurityã‚’å‚ç…§ã—ã¦ãã ã•ã„。
Your PmWiki installation is now set up for farming.
Now you need to create fields to see it in action.
今ã€PmWikiã¯ãƒ•ァーミングã®ç‚ºã«ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã•れã¦ã„ã¾ã™ã€‚ã•ã£ãã動作を見るãŸã‚ã«ãƒ•ィールドを作ã£ã¦ã¿ã¾ã—ょã†ã€‚
Once PmWiki has been set up for WikiFarming, a new field is created by doing the following:
一度ã€PmWikiã¯WikiFarmingをセットアップã™ã‚‹ãŸã‚ã«ã€ä»¥ä¸‹ã®æ‰‹é †ã§æ–°ã—ã„フィールドを作æˆã—ã¾ã™ã€‚
1. Create a directory to hold the field. Normally the field directory goes in a web-accessible directory (e.g., under public_html), but it can be placed anywhere that a PmWiki installation would normally go. This could be a directory outside or inside the farm's home-directory.
1. ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’æ ¼ç´ã™ã‚‹ç‚ºã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’作æˆã—ã¾ã™ã€‚ 普通ã€ãƒ•ィールドディレクトリã¯Webアクセスå¯èƒ½ã¨ã•れã¾ã™(例ãˆã°public_html以下)ãŒã€PmWikiè¨ç½®å ´æ‰€ã®ã©ã“ã‹ã«ç½®ã„ã¦ã‚‚ã€æ£å¸¸ã«å‹•作ã—ã¾ã™ï½¡ ファームã®ãƒ›ãƒ¼ãƒ ディレクトリã®å†…å´ã§ã‚‚外å´ã§ã‚‚å¯èƒ½ã§ã™ï½¡
2. Create a PHP script (e.g., field.php) in the field directory with the following line
2. フィールドディレクトリã«ä¸‹è¨˜ã®PHPスクリプト(例ãˆã°field.php)を作æˆã—ãªã•ã„
<?php include('path/to/pmwiki.php'); ?>
where path/to/pmwiki.php is the file path to the farm's installation of PmWiki.
path/to/pmwiki.php ã¯PmWikiファームã®è¨ç½®å ´æ‰€ã®ãƒ‘スã§ã™ã€‚
Either an absolute file path (/home/username/pmwiki/pmwiki.php) or relative file path (../pmwiki/pmwiki.php) will usually work, although PHP doesn't understand ~username in file paths.
Do not use a url path, i.e., there shouldn't be an 'http://' in it anywhere.
PHP㯠~usenameパスを解釈ã—ãªã„ãŒã€çµ¶å¯¾ãƒ‘ス(/home/username/pmwiki/pmwiki.php)ã§ã‚‚
相対パス(../pmwiki/pmwiki.php)ã§ã‚‚通常ã¯å‹•作ã™ã‚‹ï½¡
URLパスã¯ä½¿ç”¨ã—ãªã„ã€ã¤ã¾ã‚Šã€'http://'ã«ã™ã‚‹ã¹ãã§ã¯ãªã„。
注)pmwiki.phpã®è¨ç½®å ´æ‰€ã¸æŽ¥ç¶šã™ã‚‹ç‚ºã«ã€ã‚·ãƒ³ãƒœãƒªãƒƒã‚¯ãƒªãƒ³ã‚¯ã‚„ファイルショートカットを使用ã™ã‚‹ã®ã¯å分ã§ãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。PmWikiãŒãƒ•ァームスクリプトã¨ä»–ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã®å ´æ‰€ã‚’æ£ã—ãæ±ºå®šã§ãã‚‹ã€includeæ§‹æ–‡ã§ãªã‘れã°ãªã‚‰ãªã„
3. Change the field's directory permissions to 777.
3. フィールドディレクトリã®ãƒ‘ーミッションを777ã«å¤‰ãˆã¦ãã ã•ã„。
4. Open a web browser and execute the field.php script you created in step #2. This will create the needed directories for the field and should bring up a default PmWiki installation (with any default settings the farm administrator may have set).
4. Webブラウザを開ã„ã¦ã€æ‰‹é †2.ã§ä½œæˆã—ãŸfield.phpスクリプトを実行ã—ã¦ãã ã•ã„。 ã“れã¯ãƒ•ィールドã«å¿…è¦ãªãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’作æˆã—ã€ãƒ‡ãƒ•ォルトã®PmWikiインストールをæŒã¡å‡ºã™ã§ã—ょã†(デフォルトè¨å®šã¯ãƒ•ァーム管ç†è€…ãŒè¨å®šã™ã‚‹ã‹ã‚‚)
Each field administrator can create a local/ directory within the field directory for local customization? to be applied to the field. This works just like a normal PmWiki installation--the file local/config.php holds settings for the entire field, and files of the form local/Group.php and local/Group.PageName.php are used for per-group and per-page customizations (see PerGroupCustomizations).
å„フィールド管ç†è€…ã¯ãƒãƒ¼ã‚«ãƒ«ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã‚’フィールドã«é©ç”¨ã™ã‚‹ç‚ºã€ãƒ•ィールドディレクトリã«local/ディレクトリを作æˆã§ãる。 通常ã®PmWikiインストールã®ã‚ˆã†ã«é©ç”¨ã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã‚‹--local/config.php ファイルã¯å…¨ãƒ•ィールドã®è¨å®šã‚’掌æ¡ã—〠local/Group.php 㨠local/Group.PageName.php ファイルã¯ã‚°ãƒ«ãƒ¼ãƒ—ã”ã¨ã€ãƒšãƒ¼ã‚¸ã”ã¨ã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã«ä½¿ã‚れã¾ã™ï½¡(グループカスタマイズをå‚ç…§)
The PmWiki variable $FarmD points to the "home directory" for the PmWiki farm installation; thus a field administrator can use $FarmD/scripts/ and $FarmD/pub/ to refer to the farm's scripts/ and pub/ directories.
PmWiki変数$FarmDã¯PmWikiインストールã®ãƒ›ãƒ¼ãƒ ディレクトリを示ã—ã¾ã™ã€‚
よã£ã¦ã€ãƒ•ィールド管ç†è€…ã¯ãƒ•ァームã®scripts/ã€pub/ ディレクトリをå‚ç…§ã™ã‚‹ç‚ºã«
$FarmD/scripts/ã¨$FarmD/pub/ を使用ã§ãã¾ã™ã€‚
A farm administrator can use the local/farmconfig.php file for customizations to be applied to all fields within the farm.
By default, farm customizations are performed before any field-customization files;
however, the farm administrator can override some field-customizations by explicitly calling the field's config.php files (this effects all fields), as in:
ファーム管ç†è€…ã¯local/farmconfig.phpã‚’ ファームã«å«ã¾ã‚Œã‚‹å…¨ã¦ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«æœ‰åйã¨ã™ã‚‹ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã«ä½¿ç”¨ã§ãã¾ã™ï½¡ デフォルトã§ã¯ã€ãƒ•ァームカスタマイズファイルã¯ã€ä»»æ„ã®ãƒ•ィールドカスタマイズファイルより先ã«åƒãã¾ã™ï½¡ ãŸã ã—ã€ãƒ•ァーム管ç†è€…ã¯ãƒ•ィールドã®config.phpã‚’ã€æ˜Žç¤ºçš„ãªå‘¼ã³å‡ºã—ã«ã‚ˆã‚Šã€ãƒ•ィールドカスタマイズを上書ãã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã™(ã“れã¯å…¨ã¦ã®ãƒ•ィールドã«å½±éŸ¿ã—ã¾ã™)
<?php if (!defined('PmWiki')) exit();
# Settings performed before field-customizations
$FarmPubDirUrl = 'http://www.example.com/pmwiki/pub';
$Skin = 'pmwiki-farm';
# load the field's global and per-group customizations
include_once('local/config.php');
include_once('local/pgcust.php');
# Override field customizations here
$EnableUpload = 0; # disable uploads
?>
If extension scripts are used farm-wide and they are located in the farm's cookbook directory they should be loaded through entries in local/farmconfig.php like:
include_once("$FarmD/cookbook/scriptname.php");
similar includes can be done in any field's local/config.php file. Note the double quotes "..."; single quotes do not work.
拡張スクリプトãŒå…¨ãƒ•ァームã§ä½¿ã‚れã€ãれらãŒãƒ•ァームã®cookbookディレクトリã«é…ç½®ã•れã¦ã„ã‚‹ãªã‚‰ã°ã€local/farmconfig.phpã®ã‚¨ãƒ³ãƒˆãƒªã‚’通ã˜ã¦ãƒãƒ¼ãƒ‰ã•れるã¹ãã§ã™ã€‚
include_once("$FarmD/cookbook/scriptname.php");
ã©ã®ãƒ•ィールドã®local/config.phpã§ã‚‚åŒã˜ã‚ˆã†ã«å«ã‚ã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã™ã€‚
ï¼’é‡å¼•用符 "..." ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„ã€å˜ä¸€å¼•用符ã§ã¯å‹•作ã—ã¾ã›ã‚“。
A per-field uploads/ directory will normally be created in the field directory if uploads are enabled (see UploadsAdmin?).
通常ã€ã‚¢ãƒƒãƒ—ãƒãƒ¼ãƒ‰ãŒæœ‰åйã«ã•れれã°(アップãƒãƒ¼ãƒ‰ã‚’å‚ç…§)ã€ãƒ•ィールド毎ã®uploads/ディレクトリãŒãƒ•ィールドディレクトリ内ã«ç”Ÿæˆã•れã¾ã™ã€‚
$WikiLibDirs variable, which defaults to looking in the farm's copy of wikilib.d/.
ã“れã¯$WikiLibDirs変数ã«ã‚ˆã£ã¦åˆ¶å¾¡ã•れã€ãƒ•ァームã®wikilib.d/ã®ã‚³ãƒ”ーをæœã™ã“ã¨ã‚’放棄ã—ã¾ã™ï½¡
ã“れã¯ä»–ã®ãƒ•ィールドã®ãƒšãƒ¼ã‚¸ã¸ã®ãƒªãƒ³ã‚¯ã‚’生æˆã™ã‚‹ã®ã«ä¾¿åˆ©ã§ã—ょã†ã€‚
一般的ã«ã€ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ ã®ãƒ‘ーミッションã¨PHPã®è¨å®šãŒè¨±å¯ã—ã¦ã„れã°ã€ フィールドã¯ãƒ¦ãƒ¼ã‚¶ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã«ã‚ˆã‚Šç”Ÿæˆã•れã€ç®¡ç†ã•れる。通常ã®PHPã®ãƒ‡ãƒ•ォルトè¨å®šã§ã¯ã“れを許å¯ã—ã¦ã„ã‚‹ãŒã€ã‚·ã‚¹ãƒ†ãƒ 管ç†è€…ã‚„Webホスティングサービスã«ã‚ˆã£ã¦ã¯ã€PHPè¨å®šã§ã“れをä¸å¯ã«ã—ã¦ã„る。
<< | DocumentationIndex? | >>