方案1
1. sudo apt-get install dokuwiki
- 将/var/www/html权限设置为777 chmod -R 777 /var/www/html
- 打开浏览器,输入http://127.0.0.1/dokuwiki/doku.php
原文是ip/index.php
查看版本命令为:
root@raspberrypi:/etc/init.d # apache2 -v
Server version: Apache/2.4.38 (Raspbian)
Server built: 2020-08-25T20:08:29
root@raspberrypi:/etc/init.d # php -v
PHP 7.3.19-1~deb10u1 (cli) (built: Jul 5 2020 06:46:45) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.19, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.19-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies
root@raspberrypi:/var/lib/dokuwiki/data/pages/wiki # find / -name doku.php
/usr/share/dokuwiki/doku.php
方案2
sudo apt-get update
安装apache
sudo apt-get install apache2 -y
安装PHP
sudo apt install php libapache2-mod-php -y
sudo chmod -R 777 /var/www/html(注意有安全隐患)
wget http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
tar xvf dokuwiki-stable.tgz
mv dokuwiki-stable.tgz /tmp/
mv dokuwiki-2020-07-29 dokuwiki
打开浏览器,访问
http://127.0.0.1/dokuwiki/doku.php
遇到的问题1:
DokuWiki Setup Error
The datadir ('pages') at ./data/pages is not found, isn't accessible or writable. You should check your config and permission settings. Or maybe you want to run the installer?
是权限问题,执行下面解决:
chmod -R 777 data/
问题2:
PHP function xml_parser_create is not available. Maybe your hosting provider disabled it for some reason?
解决方法:
php -v
apt search php |grep xml
sudo apt-get install php7.3-xml
以下是详细log:
root@raspberrypi:~ # php -v
PHP 7.3.19-1~deb10u1 (cli) (built: Jul 5 2020 06:46:45) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.19, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.19-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies
root@raspberrypi:~ # apt search php |grep xml
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libsmokeqtxml4-3/stable 4:4.14.3-1.2 armhf
php-horde-xml-element/stable 2.0.4-5 all
php-horde-xml-wbxml/stable 2.0.3-5 all
Horde_Xml_Wbxml provides an API for encoding and decoding WBXML documents used in SyncML and other wireless applications
php-sabre-xml/stable 1.4.2-1 all
php-symfony-polyfill-xml/stable 1.9.0-1 all
Symfony polyfill for xml's utf8_encode and utf8_decode functions
php-xml/stable 2:7.3+69 all
php-xml-dtd/stable 0.5.2+dfsg1-3 all
php-xml-htmlsax3/stable 3.0.0+really3.0.0-3 all
php-xml-parser/stable 1.3.6-1 all
php-xml-rpc/stable 1.5.5-1 all
php-xml-rpc2/stable 1.1.3-0.1 all
php-xml-svg/stable 1.1.0-2 all
php-xmlrpc/stable 2:7.3+69 all
php-zend-xml/stable 1.0.2-1 all
php7.1-xml/stable 7.1.20-1+b2 armhf
php7.1-xmlrpc/stable 7.1.20-1+b2 armhf
php7.2-xml/stable 7.2.9-1+b2 armhf
php7.2-xmlrpc/stable 7.2.9-1+b2 armhf
php7.3-xml/stable 7.3.19-1~deb10u1 armhf
php7.3-xmlrpc/stable 7.3.19-1~deb10u1 armhf
问题3:
{DOCUMENT_ROOT}/dokuwiki/conf/ is not writable by DokuWiki. You need to fix the permission settings of this directory!
权限问题,执行:
sudo chmod -R 777 /var/www/html
部署的路径具体为:
root@raspberrypi:/etc/init.d # find / -name doku.php
/var/www/html/dokuwiki/doku.php
解决中文文件名乱码的问题
1.修改文件 conflocal.php
在末尾增加
$conf['fnencode'] = 'utf-8';
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。