Difference between revisions of "DokuWiki"
(→pcre) |
imported>ThorstenStaerk |
||
(5 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
= Installing = | = Installing = | ||
− | This example shows how to install dokuwiki on your local computer. It has been tested with SUSE Linux 11.2- | + | This example shows how to install dokuwiki on your local computer. It has been tested with SUSE Linux 11.2-13.1. |
You will need a running php-enabled http service, [[open a console]] and enter: | You will need a running php-enabled http service, [[open a console]] and enter: | ||
− | yast -i apache2 apache2-mod_php5 | + | <source> |
+ | yast -i apache2 apache2-mod_php5 php5-zlib | ||
/etc/init.d/apache2 start | /etc/init.d/apache2 start | ||
+ | </source> | ||
Then download the dokuwiki package and unpack it to /srv/www/htdocs/dokuwiki. | Then download the dokuwiki package and unpack it to /srv/www/htdocs/dokuwiki. | ||
− | + | <source> | |
− | + | cp Downloads/dokuwiki-2011-05-25a.tgz /srv/www/htdocs | |
− | + | cd /srv/www/htdocs | |
− | + | tar xvzf dokuwiki-* | |
+ | mv dokuwiki-* dokuwiki | ||
+ | </source> | ||
Change the owner of the directories to the web server: | Change the owner of the directories to the web server: | ||
+ | <source> | ||
chown -R wwwrun:www dokuwiki | chown -R wwwrun:www dokuwiki | ||
+ | </source> | ||
Then surf to http://localhost/dokuwiki/install.php | Then surf to http://localhost/dokuwiki/install.php | ||
== TroubleShooting == | == TroubleShooting == | ||
If you get an error message like this: | If you get an error message like this: | ||
+ | <source> | ||
{DOCUMENT_ROOT}/dokuwiki/data/pages is not writable by DokuWiki. You need to fix the permission settings of this directory! | {DOCUMENT_ROOT}/dokuwiki/data/pages is not writable by DokuWiki. You need to fix the permission settings of this directory! | ||
+ | </source> | ||
First make sure you know DOCUMENT_ROOT, let's assume it is /srv/www/htdocs. Then do a | First make sure you know DOCUMENT_ROOT, let's assume it is /srv/www/htdocs. Then do a | ||
+ | <source> | ||
chmod -R 777 /srv/www/htdocs | chmod -R 777 /srv/www/htdocs | ||
+ | </source> | ||
If this does not help, you may have safe_mode turned on. You can find this out with the command | If this does not help, you may have safe_mode turned on. You can find this out with the command | ||
+ | <source> | ||
grep -ir "safe_mode" /etc/apache2/* | grep -ir "safe_mode" /etc/apache2/* | ||
+ | </source> | ||
In this case, apache only reads files that its user owns. Solution can be to chown all files to the user apache is running under. In one case, under Ubuntu, the solution was: | In this case, apache only reads files that its user owns. Solution can be to chown all files to the user apache is running under. In one case, under Ubuntu, the solution was: | ||
+ | <source> | ||
chown -R sw-cp-server:crontab /var/www/vhosts/default/htdocs/dokuwiki/data/ | chown -R sw-cp-server:crontab /var/www/vhosts/default/htdocs/dokuwiki/data/ | ||
+ | </source> | ||
= Redirect = | = Redirect = | ||
Line 43: | Line 57: | ||
Use the monobook that resembles to mediawiki | Use the monobook that resembles to mediawiki | ||
* download the monobook template from http://www.dokuwiki.org/template:monobook, as of 2013-10-16 this went like: | * download the monobook template from http://www.dokuwiki.org/template:monobook, as of 2013-10-16 this went like: | ||
+ | <source> | ||
cd /srv/www/htdocs/dokuwiki/lib/tpl/ | cd /srv/www/htdocs/dokuwiki/lib/tpl/ | ||
wget --no-check-certificate http://andreas-haerter.com/downloads/dokuwiki-template-monobook/latest-update | wget --no-check-certificate http://andreas-haerter.com/downloads/dokuwiki-template-monobook/latest-update | ||
+ | </source> | ||
* extract it to the template directory | * extract it to the template directory | ||
+ | <source> | ||
cd /srv/www/htdocs/dokuwiki/lib/tpl/ | cd /srv/www/htdocs/dokuwiki/lib/tpl/ | ||
tar xvf *monobook-update.tar.gz | tar xvf *monobook-update.tar.gz | ||
+ | </source> | ||
* rename it to default | * rename it to default | ||
+ | <source> | ||
mv default/ default-save | mv default/ default-save | ||
mv monobook/ default | mv monobook/ default | ||
+ | </source> | ||
* set admin -> Configuration Settings -> "Template aka. the design of the wiki." : "default" | * set admin -> Configuration Settings -> "Template aka. the design of the wiki." : "default" | ||
* adapt :wiki:navigation to contain | * adapt :wiki:navigation to contain | ||
+ | <source> | ||
* <nowiki>[[:start]]</nowiki> | * <nowiki>[[:start]]</nowiki> | ||
* [[http://''yourhost''/dokuwiki/doku.php?do=recent|Recent Changes]] | * [[http://''yourhost''/dokuwiki/doku.php?do=recent|Recent Changes]] | ||
* [[http://''yourhost''/dokuwiki/doku.php?id=wiki&do=admin&page=statistics|Statistics]] | * [[http://''yourhost''/dokuwiki/doku.php?id=wiki&do=admin&page=statistics|Statistics]] | ||
+ | </source> | ||
== URL rewriting == | == URL rewriting == | ||
Line 62: | Line 84: | ||
See http://www.dokuwiki.org/rewrite | See http://www.dokuwiki.org/rewrite | ||
− | == pcre == There are a lot of issues regarding pcre. One is that you may not be able to log in if you have not compiled pcre with the option --enable-utf8. So, here is how to compile pcre to work with dokuwiki: ./configure --enable-utf8 && make -j8 && make install | + | == pcre == |
+ | There are a lot of issues regarding pcre. One is that you may not be able to log in if you have not compiled pcre with the option --enable-utf8. So, here is how to compile pcre to work with dokuwiki: | ||
+ | <source> | ||
+ | ./configure --enable-utf8 && make -j8 && make install | ||
+ | </source> | ||
= TroubleShooting = | = TroubleShooting = | ||
== Plugin cannot be unpacked == | == Plugin cannot be unpacked == | ||
'''Symptom:''' | '''Symptom:''' | ||
+ | <source> | ||
The plugin manager was unable to decompress the downloaded file. This maybe as a result of a bad download, in which case you should try again; or the compression format may be unknown, in which case you will need to download and install the plugin manually. | The plugin manager was unable to decompress the downloaded file. This maybe as a result of a bad download, in which case you should try again; or the compression format may be unknown, in which case you will need to download and install the plugin manually. | ||
+ | </source> | ||
'''Solution:''' | '''Solution:''' |
Latest revision as of 07:15, 5 April 2020
DokuWiki is a wiki that stores data in plain files and to priviledge distinct users for viewing articles.
Contents
Website
DokuWiki's website is http://www.dokuwiki.org/
Installing
This example shows how to install dokuwiki on your local computer. It has been tested with SUSE Linux 11.2-13.1.
You will need a running php-enabled http service, open a console and enter: <source>
yast -i apache2 apache2-mod_php5 php5-zlib /etc/init.d/apache2 start
</source> Then download the dokuwiki package and unpack it to /srv/www/htdocs/dokuwiki. <source>
cp Downloads/dokuwiki-2011-05-25a.tgz /srv/www/htdocs cd /srv/www/htdocs tar xvzf dokuwiki-* mv dokuwiki-* dokuwiki
</source>
Change the owner of the directories to the web server: <source>
chown -R wwwrun:www dokuwiki
</source> Then surf to http://localhost/dokuwiki/install.php
TroubleShooting
If you get an error message like this: <source>
{DOCUMENT_ROOT}/dokuwiki/data/pages is not writable by DokuWiki. You need to fix the permission settings of this directory!
</source> First make sure you know DOCUMENT_ROOT, let's assume it is /srv/www/htdocs. Then do a <source>
chmod -R 777 /srv/www/htdocs
</source> If this does not help, you may have safe_mode turned on. You can find this out with the command <source>
grep -ir "safe_mode" /etc/apache2/*
</source> In this case, apache only reads files that its user owns. Solution can be to chown all files to the user apache is running under. In one case, under Ubuntu, the solution was: <source>
chown -R sw-cp-server:crontab /var/www/vhosts/default/htdocs/dokuwiki/data/
</source>
Redirect
To make what mediawiki calls a redirect, use the goto plugin: http://www.dokuwiki.org/plugin:goto
Hints
make it similar to mediawiki
syntax
- install the MediaSyntax plugin
template
Use the monobook that resembles to mediawiki
- download the monobook template from http://www.dokuwiki.org/template:monobook, as of 2013-10-16 this went like:
<source>
cd /srv/www/htdocs/dokuwiki/lib/tpl/ wget --no-check-certificate http://andreas-haerter.com/downloads/dokuwiki-template-monobook/latest-update
</source>
- extract it to the template directory
<source>
cd /srv/www/htdocs/dokuwiki/lib/tpl/ tar xvf *monobook-update.tar.gz
</source>
- rename it to default
<source>
mv default/ default-save mv monobook/ default
</source>
- set admin -> Configuration Settings -> "Template aka. the design of the wiki." : "default"
- adapt :wiki:navigation to contain
<source>
* [[:start]] * [[http://yourhost/dokuwiki/doku.php?do=recent|Recent Changes]] * [[http://yourhost/dokuwiki/doku.php?id=wiki&do=admin&page=statistics|Statistics]]
</source>
URL rewriting
Want a pretty URL like www.foo.com/products instead of www.foo.com/doku.php?id=products?
See http://www.dokuwiki.org/rewrite
pcre
There are a lot of issues regarding pcre. One is that you may not be able to log in if you have not compiled pcre with the option --enable-utf8. So, here is how to compile pcre to work with dokuwiki: <source>
./configure --enable-utf8 && make -j8 && make install
</source>
TroubleShooting
Plugin cannot be unpacked
Symptom: <source>
The plugin manager was unable to decompress the downloaded file. This maybe as a result of a bad download, in which case you should try again; or the compression format may be unknown, in which case you will need to download and install the plugin manually.
</source>
Solution: Install the zlib package for php, e.g. php5-zlib