Table of Contents

DokuWiki

Install

ファイルを取得して、アップロード。

ファイルを解凍。

tar zxvf dokuwiki-2006-03-09e.tgz

ディレクトリー名を変更して、移動。

mv dokuwiki-2006-03-09e dokuwiki
cd dokuwiki

ログファイルの作成とpermissionの変更(最新版では、これは必要なかったです。楽だねー。)

touch data/changes.log
chmod 777 data/

ただ使うだけなら、ここまでで大丈夫。 でも、できれば次の設定もしておきましょう。

Setting

cp conf/users.auth.php.dist conf/users.auth.php
cp conf/acl.auth.php.dist conf/acl.auth.php
chmod 666 conf/users.auth.php
chmod 666 conf/acl.auth.php

conf/dokuwiki.phpを編集。

Defaultではこうなっています。

$conf['useacl']      = 0;                //Use Access Control Lists to restrict access?
$conf['openregister']= 1;                //Should users to be allowed to register?
$conf['autopasswd']  = 1;                //autogenerate passwords and email them to user

これをこうすると、「Login」ボタンが表示されます。

$conf['useacl']      = 1;                //Use Access Control Lists to restrict access?
$conf['openregister']= 1;                //Should users to be allowed to register?
$conf['autopasswd']  = 0;                //autogenerate passwords and email them to user

(autopasswdは0でも1でもどちらでも可。0なら自分でパスワードを設定できます。)

この状態で、「Login」ボタンを押して、自分のユーザーを作成。(以下、ユーザー名をhogeとします。)

それからconf/users.auth.phpを編集。元のファイルはこうです。

hoge:***********:Hoge:hoge@***.com:user

こう編集してください。

hoge:***********:Hoge:hoge@***.com:admin

それからconf/acl.auth.phpを編集。元のファイルがはこうです。

こう編集してください。

次にconf/dokuwiki.phpをもう一度編集。こうしてください。

$conf['superuser']   = '@admin';    //The admin can be user or @group

上記の手順をふんで「hoge」でログインすると、画面右下に「Admin」ボタンが表示されます。 Admin画面では、ブラウザ上から「Configuration Manager」で、Wiki title、Start page nameなどconf/dokuwiki.phpを直接編集せずにいろいろな設定が変更できます。 Allow debugはオフにしておきましょう。

もし、自分以外のユーザーに登録させたくなかったら、こう変更。(これは最新のバージョンではなし。)

$conf['openregister']= 0;                //Should users to be allowed to register?

これで設定の確認も可能。

doku.php?do=check

最新の設定では

/* Authentication Options - read http://www.splitbrain.org/dokuwiki/wiki:acl */

$conf['useacl']      = 0;                //Use Access Control Lists to restrict access?
$conf['autopasswd']  = 1;                //autogenerate passwords and email them to user
$conf['authtype']    = 'plain';          //which authentication backend should be used
$conf['passcrypt']   = 'smd5';           //Used crypt method (smd5,md5,sha1,ssha,crypt,mysql,my411)
$conf['defaultgroup']= 'user';           //Default groups new Users are added to
$conf['superuser']   = '!!not set!!';    //The admin can be user or @group
$conf['manager']     = '!!not set!!';    //The manager can be user or @group
$conf['profileconfirm'] = '1';           //Require current password to confirm changes to user profile
$conf['disableactions'] = '';            //comma separated list of actions to disable
$conf['sneaky_index']   = 0;             //check for namespace read permission in index view (0|1) (1 might cause unexpected behavior)
$conf['auth_security_timeout'] = 900;    //time (seconds) auth data is considered valid, set to 0 to recheck on every page view
# <?php exit()?>
# Don't modify the lines above
#
# Userfile
#
# Format:
#
# user:MD5password:Real Name:email:groups,comma,seperated

kaoru:$*****************:Tachibana Kaoru:toyship@***.***:admin

# acl.auth.php
# <?php exit()?>
# Don't modify the lines above
#
# Access Control Lists
#
# Editing this file by hand shouldn't be necessary. Use the ACL
# Manager interface instead.
#
# If your auth backend allows special char like spaces in groups
# or user names you need to urlencode them (only chars <128, leave
# UTF-8 multibyte chars as is)
#
# none   0
# read   1
# edit   2
# create 4
# upload 8
# delete 16

*               @ALL        8

Nucleus