DokuWiki

本页使用了标题或全文手工转换
来自 Arch Linux 中文维基

本文内容或本节内容已经过期。

原因: 请提供模板的第一个位置参数以概括原因。 (在Talk:DokuWiki讨论)

安装 DokuWiki[编辑 | 编辑源代码]

DokuWiki 是什么?[编辑 | 编辑源代码]

"DokuWiki 是一个让使用者能建立出丰富文档库,并与标准相容且易用的wiki系统。它提供环境给个人、团队或公司使用一种简单但抛耳否的语法格式来创作与协作,并确保档案资料在wiki之外也能维持内容的结构与可读性。"

"无次数限制的页面修订可让页面恢复到先前任一版本,资料也以纯文字档储存,无需使用资料库。抛耳否的外挂架构让系统核心得以扩充与强化。看看功能特色章节了解DokuWiki所提供功能的完整描叙。"[1]

另一方面来说,DokuWiki是个由PHP程式语言所编写、可不使用资料库的wiki系统。

想看看一个在跑的例子?

说在前头[编辑 | 编辑源代码]

接下来的内容会指引你设置DokuWiki在html目录之下。

若有人可把vhost设置步骤加入的话,请觉得免费去加进来。

lighttp 笔记[编辑 | 编辑源代码]

更多细节请看 Lighttpd#FastCGI

html 目录位于 /srv/http 。这目录可能不是预设就被建立的,没有你可以自己产生它。

 #mkdir -p /srv/http

lighttp 也会产生或使用 http:http 使用者帐号与群组。

 #chown http:http /srv/http

所有这些设定都能在这个档案中作修改

 /etc/lighttpd/lighttpd.conf

DokuWiki 笔记[编辑 | 编辑源代码]

DocuWiki 部份外挂会寻找网页伺服器的根目录,而不是DokuWiki的根目录这会导致一些问题发生。 所有预设外挂都能用下面的方法安装。

安装 lighttp[编辑 | 编辑源代码]

PHP, lighttp, 还有 fastcgi[编辑 | 编辑源代码]

本文内容或本节内容已经过期。

原因: 请提供模板的第一个位置参数以概括原因。 (在Talk:DokuWiki讨论)

安装 PHP Lighttpd#FastCGI

 #pacman -S lighttpd fcgi php-cgi

加 lighttpd 到你的 rc.conf 里

 DAEMONS=(syslog-ng network netfs crond lighttpd)

编辑你的 /etc/hosts.allow (加下面这一行)

 lighttpd:    ALL

启动你的网页伺服器 (sanity check)

 #/etc/rc.d/lighttpd start

建测试文件

 #echo "Testing lighttpd" > /srv/http/index.html

开浏览器到 http://127.0.0.1/,你應該看到測試文件內容。

要是试了没有用(也检查过):

chown -R http:http /var/run/lighttpd/

停掉网页伺服器

 #/etc/rc.d/lighttpd stop

组态配置[编辑 | 编辑源代码]

去注解 /etc/lighttpd/lighttpd.conf 里的这几行

"mod_fastcgi"
fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                 (
                                   "socket" => "/var/run/lighttpd/php-fastcgi.socket",
                                   "bin-path" => "/usr/bin/php-cgi"
                                 )
                               )
                            )

装上 DokuWiki[编辑 | 编辑源代码]

下载最新版[编辑 | 编辑源代码]

到网站 DokuWiki download 拿到最新版

 #tar -C /srv/http -zxvf dokuwiki*.tgz
 #mv /srv/http/dokuwiki-DATE /srv/http/dokuwiki

预备安装的档案[编辑 | 编辑源代码]

chown DokuWiki 的档案

 #chown -R http:http dokuwiki/

(http 是 lighttp 的预设启动帐号,如果你有改过,把上面指令里的 user:group 改成 lighttp 指定的 user:group)

DokuWiki Specific lighttp Configuration[编辑 | 编辑源代码]

编辑 /etc/lighttpd/lighttpd.conf 依照 dokuwiki instructions (可能会包含更新过的资讯)。

在这几行下面:

$HTTP["url"] =~ "\.pdf$" {
  server.range-requests = "disable"
}

加上这些内容:

# subdir of dokuwiki
# comprised of the subdir of the root dir where dokuwiki is installed
# in this case the root dir is the basedir plus /htdocs/
# Note: be careful with trailing slashes when uniting strings.
# all content on this example server is served from htdocs/ up.
#var.dokudir = var.basedir + "/dokuwiki"
var.dokudir = server.document-root + "/dokuwiki"

# make sure those are always served through fastcgi and never as static files
# deny access completly to these
$HTTP["url"] =~ "/\.ht" { url.access-deny = ( "" ) }
$HTTP["url"] =~ "/_ht" { url.access-deny = ( "" ) }
$HTTP["url"] =~ "^" + var.dokudir + "/bin/"  { url.access-deny = ( "" ) }
$HTTP["url"] =~ "^" + var.dokudir + "/data/" { url.access-deny = ( "" ) }
$HTTP["url"] =~ "^" + var.dokudir + "/inc/"  { url.access-deny = ( "" ) }
$HTTP["url"] =~ "^" + var.dokudir + "/conf/" { url.access-deny = ( "" ) }

这些项目给 dokuwiki 设定基本保全。 lighttpd 不会用到像 apache 的 .htaccess 档案。 你*可以*不安装这些设定,但*绝不*建议这么做。

重新启动 lighttp[编辑 | 编辑源代码]

开网页伺服器

 #/etc/rc.d/lighttpd start

Install DokuWiki[编辑 | 编辑源代码]

开浏览器到

 http://127.0.0.1/dokuwiki/install.php

后安装[编辑 | 编辑源代码]

打扫干净[编辑 | 编辑源代码]

设定好组态配置后移除 install.php 档案!

 #rm /srv/http/dokuwiki/install.php

装外挂[编辑 | 编辑源代码]

许多社群制作的外挂可以在这找到 here 它们可以从网页界面的 Admin 选单加挂(更新也是)。

要备份[编辑 | 编辑源代码]

如果没有用资料库的话备份DokuWiki没什么。全部的页面都是纯文字,靠 tar 或 rsync 就能备份。

目前版本(2008-05-05)的目录结构:

 /dokuwiki/data/  =>  所有使用者建立的資料
 /dokuwiki/lib/plugins/  =>  所有使用者加入的外掛

延伸阅读[编辑 | 编辑源代码]

DokuWiki 主站 会有你可能需要的全部资讯与帮助。