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[编辑 | 编辑源代码]
安装 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 主站 会有你可能需要的全部信息与帮助。