目次

インストール

DokuWikiのインストールはとても簡単――通常はファイルを解凍してパーミッションを設定するだけで使えますが、ここではいろんな環境に対応する方法の詳細をご説明します。

ステップ1: ダウンロードページ から最新版1)をダウンロードします。ここまでの手順は誰でも同じです。

ステップ2: 使っているプラットフォームに応じたそれぞれの説明にしたがって作業してください。

基本のインストール作業の直後の箱から出したままの状態のDokuWikiは次のような動作をします。

Linux/UnixとApache一般

これは企業内サーバーなどroot権限を持っているサーバーにDokuWikiをインストールする場合など、もっとも通常の方法です。

#> cd /var/www/
#> tar -xzvf /path/to/downloaded/dokuwiki-YYYY-MM-DD.tgz
#> mv dokuwiki-YYYY-MM-DD dokuwiki
#> touch dokuwiki/data/changes.log
#> cp dokuwiki/conf/users.auth.php.dist dokuwiki/conf/users.auth.php
#> cp dokuwiki/conf/acl.auth.php.dist dokuwiki/conf/acl.auth.php
#> chgrp nogroup dokuwiki/conf/users.auth.php
#> chgrp nogroup dokuwiki/conf/acl.auth.php
#> chown -R nobody dokuwiki/data

注意

Debian GNU/Linux, Ubuntu Linux

Matti Pölläによる公式Debian用パッケージがaptのtestingとunstableセクションからフェッチできます。この.debのホームページはhttp://packages.debian.org/unstable/web/dokuwikiです。

Ubuntuでは、”universe”からDokuWikiをインストールできます。インストールの方法は https://wiki.ubuntu.com/UniversePackagesをご覧ください。インストールができたら、このガイドの説明にしたがって設定できます。apt-getコマンドは”sudo”を使ってrootの権限で使用しないといけないことにご注意ください。

DokuWikiのインストールはDebianの通常の手順で行います。

#> apt-get update
#> apt-get install dokuwiki

これでパッケージが展開され、debconfからの質問にいくつか答えると完了です。ブラウザからDokuWikiを開けます。例えば、Webでのアクセスの場所を /dokuwiki にして、localhostからのみアクセスできると指定した場合、http://localhost/dokuwikiでスタートページが表示されます。

パッケージのバグを見つけたときはDebianのバグトラッキングシステムhttp://www.debian.org/Bugs/にレポートしてください。

FreeBSD

FreeBSDのportsからDokuWikiをインストールするには次のようにします:

#> cd /usr/ports/www/dokuwiki
#> make install clean

DokuWikiをインストールするディレクトリはデフォルトでは/usr/local/www/data/dokuwikiとなっています。 もちろん、インストール先を別のディレクトリにしたり、別の場所へシンボリックリンクを張ることもできます。 :-)

Portsでのアップグレードは:

#> portupgrade dokuwiki

Ports treeが新しい物に更新されている必要があります。そうでないと、何も起こりません。

Mac OS X と Apache

くわしくはHOWTO for DokuWiki on Tigerを参照してください。

このHOWTOは大変役に立ちますが、少し内容が古いようです。

私がTiger(古いDokuWikiはインストールされていない環境)にインストールしたときは次のような手順でした:

  1. Mac OS XでPHPを有効にする (Personal Web Sharingの起動も)
  2. dokuwiki-2005-07-13.tgzをダウンロード (ダウンロード先は~/Desktop)
  3. コマンドラインから:
    $ cd ~/Desktop && tar -zxvf dokuwiki-2005-07-13.tgz
    $ mv dokuwiki-2005-07-13 ~/Sites/dokuwiki
    $ cd ~/Sites/dokuwiki
    $ touch data/changes.log
    $ sudo chown -R www data
  4. アクセスコントロールを使いたい場合は(conf/local.phpでuseaclの設定を変えて)、コマンドラインから:
    $ cp conf/users.auth.php.dist conf/users.auth.php
    $ sudo chown www conf/users.auth.php
    $ cp conf/acl.auth.php.dist conf/acl.auth.php
    $ sudo chown www conf/acl.auth.php
  5. 重要:conf/local.phpで
    $conf['basedir']     = '/~user/dokuwiki/';

    と設定すること。ディレクトリの自動検出はうまく動きません。

## 10.4.3 クライアントで、標準装備のApacheを走らせて、サイトを/Library/Webserver/Documentsに設定(サーバーのふりをさせるため)した場合、'basedir'を指定すると壊れてしまった(訳注:ここ意味不明)

Windows

Windows版Apache

デスクトップ機でDokuWikiを動作させたい方向け

dataディレクトリの中にatticというディレクトリを作らないといけない場合もあるようです。同様に、場合によってはdata/cachedata/metadata/locksというディレクトリも手動で作る必要があります。

IIS

IISが使えるWindows機(Windows 2000、Windows XP、Windows Server 2003)でDokuWikiを使いたい方向けz


File Extraction

Windows-Users may need to rename the file from dokuwiki-YYYY-MM-DD.tgz to dokuwiki-YYYY-MM-DD.tar.gz to make their archive tool recognize the file format correctly (See 209).

The windows file extension is now .tar - however renaming it and using winzip works just fine.

Extraction Programs:

NanoWeb Web Server

NanoWeb is a PHP-based web server, and much lighter in its memory footprint than something like Apache. Nagios and Double Choco Latte both work fine, as does DokuWiki.

However, after following the instructions as described above for use with the Apache web server, it will be necessary to modify dokuwiki.php, as it does not automatically detect its web server location (URL).

Autodetection of an URL is not possible in all thinkable environments. Especially not when extensive URL rewriting and other forwarding mechnisms are in use. Furthermore the word “relative dir” is a bit missleading. Because dokuwiki requires an absolute pathname here. So start with a slash and end with a slash as in the example below. – Doogie - 27. May 2005

Change the line:

$conf['basedir'] = '';           //relative dir to serveroot - blank for autodetection

to something like:

$conf['basedir'] = '/dokuwiki/'; //relative dir to serveroot - blank for autodetection

Note that, for whatever reason, a trailing slash is required!!

FTPでファイルを転送するホスティングサービスのサーバー

レンタルサーバーをお使いの方はほとんどこれに該当します

このタイプのサーバーへのインストールの英語版のScreencast(動画デモ)もご覧ください。

Development Versions

You can also check out the newest development version using darcs.

Upgrading

Before upgrading, you should always read the changelog to see if something changed you should be aware of when upgrading. To determine the version you are running, have a look in the HTML source of a Page generated by DokuWiki there should be something like <meta name=“generator” content=“DokuWiki 2005-02-06” /> 4).

Some reminders! I tried to upgrade from 2005-05-17 to 2005-07-13, and had problems with plain ACL. This has been discussed at http://wiki.splitbrain.org/wiki:discussion:acl?s=users%5C.auth#user_registration_-_can_t_register . I was in the process of reverted to 2005-05-13, and decided to give another try, which appears to have been successful. Two hints: (a) when transferring files over to the updated program directory, make sure that the chmod is set to 777 for all of them, or they won't be editable!; and (b) when updating configuration files, remember to use a UTF-8 editor if you're on Windows! (I use Crimson Editor). {David Ing, 2005/07/17}

The easiest way to upgrade is perform the following steps

If you have made any changes on interwiki or smiley configurations or the source code itself, you will probably want to reapply them after upgrading.

When you upgrade from a version prior to 2005-02-06, you will need to convert your data to UTF8 after upgrading.

If you encounter some inconsistencies in DokuWikis behaviour after upgrading, you should delete the cache files in data/.cache/ and media/.cache/. You should make sure your browser hasn't cached an old stylesheet, too.

Example Upgrade Process

Easier/Faster upgrade method

This method is not official - i (redeeman, visitor) just thought it would be nice to present this method of upgrade, which i just have used myself to upgrade from 2005-07-01 to 2005-07-13.

the thing i do, is to use diff, a command to generate a patch, this should be present on almost any unix system, however, it is probably also possible to find a win32 version on google.

now all we do to create the patch is to unpack the two different versions, so we get the dirs: “dokuwiki-2005-07-01” and “dokuwiki-2005-07-13” (this is the version change i did, your upgrade might be from/to different versions). now all we need to do is issue the diff command, and create the patch:

diff -Naur dokuwiki-2005-07-01 dokuwiki-2005-07-13 > doku.diff

now we have the patch, this is essentially only the differences between the two directories (e.g it knows nowthing of your pages, which is good) and you should be able to patch up, without it interfering with anything. however, you should not, that it might have changes in the conf/ dir in files you have edited, in which case you should do a backup of the file, copy the file from the version you already have, so the patch will work, and then when the patch is applied redo your changes, however this is only the case if changes to the dokuwiki standard php file is in an upgrade.

To check which files the patch will affect, you can run with –dry-run.. just cd into the dir where dokuwiki is installed, and run:

patch -p1 </path/to/doku.diff --dry-run

then if you accept it :) just run it like this, without –dry-run:

patch -p1 </path/to/doku.diff

Example of everything needed for this

動いた ― 次はどうすればいい?

無事すべての設定が終わって動き始めたら、次にやるべきことは次のとおりです。

Multiple Wiki

The topic of multi-wiki, or wiki farms, comes up briefly in freelists.org archives, in this thread, this thread, and this one. In the last one, Andi describes changes he made so $conf['title'] can be used to establish different cookies for separate installations.

Note that namespaces could be used to separate content in a single installation. And multiple installation means each one will need its own upgrade. It is not the same as multiple instances sharing common code. Package upgrades, like Debian’s, will not handle multiple installations. But for some this is a price worth paying. Here is an approach that worked with the GNU/Linux installation using Apache. It can probably be adapted to the other situations:

  1. Do the regular installation, and test it.
  2. Create conf/local.php with the title line and any other lines you want to tailor.
  3. Copy the folder “dokuwiki” and give it a name suggesting its content.
  4. Set $conf[’title’] in local.php of new folder, to title and differentiate the installation.
  5. If the new folder is named “newwiki,” bring up http://localhost/newwiki.

Do the first two steps once and repeat the last three to make multiple installations.

1) 上から古い順に並んでいます
2) インストーラーのパッケージが各種配布されていますので、それを使うのが簡単です。Uniserver, XAMPP, AppServ, EasyPHP or any other available
3) 例えばWindowsの場合、7-Zipeoなどのツールでtarファイルが展開できます
4) if not your version is older than 2005-01-14