Installing DokuWiki is very easy - in general it’s just a matter of unpacking and setting permissions; however, detailed descriptions of various scenarios are given here.
This is the common scenario for installing DokuWiki in a corporate environment or on your own rootserver.
#> cd /var/www #> tar -xzvf /path/to/downloaded/dokuwiki-YYYY-MM-DD.tgz
#> mv dokuwiki-YYYY-MM-DD dokuwiki
#> touch dokuwiki/data/changes.log
#> cp dokuwiki/conf/users.auth.php.dist dokuwiki/conf/users.auth.php #> cp dokuwiki/conf/acl.auth.php.dist dokuwiki/conf/acl.auth.php
nobody
, www-data
or apache
#> chgrp nogroup dokuwiki/conf/users.auth.php #> chgrp nogroup dokuwiki/conf/acl.auth.php #> chmod 664 dokuwiki/conf/users.auth.php #> chmod 664 dokuwiki/conf/acl.auth.php
#> chown -R nobody dokuwiki/data #> chmod -R g=rwx dokuwiki/data
dokuwiki/conf/dokuwiki.php
(see config) if you want to
change anything within it. Better yet, create
dokuwiki/conf/local.php
containing those lines from
dokuwiki.php
which you want to change. This way, your changes are
preserved when overwriting the dokuwiki.php
with a new release.
Next command can help you creating it. Delete those lines which you don’t want
to change.#> cp dokuwiki/conf/dokuwiki.php dokuwiki/conf/local.php
check
option in a URL and pull it up into a browser:
http://127.0.0.1/dokuwiki/doku.php?do=check.htaccess
give you
error 500, add RewriteBase /path
where /path
is the
path to doku.php
from your website’s URL.Currently, DokuWiki is included in the unstable and testing distributions of Debian. To install, use the standard Debian procedure:
#> apt-get update #> apt-get install dokuwiki
After unpacking, Debian’s configuration system debconf will ask a few questions about the preferred configuration.
Please use the Debian bug tracking system to report any bugs with the package http://www.debian.org/Bugs/. Note that to comply with the Debian policy the directory structure of DokuWiki has been reorganized. For example, the configuration files are located in /etc/dokuwiki/ .
To install dokuwiki using the FreeBSD ports tree, do the following:
#> cd /usr/ports/www/dokuwiki #> make install clean
The default DokuWiki directory is /usr/local/www/data/dokuwiki
– Of course the directory can be changed or symbolic linked to anywhere
To
configure dokuwiki copy the options from the
/usr/local/www/data/dokuwiki/conf/dokuwiki.php file you want to edit to
/usr/local/www/data/dokuwiki/conf/local.php.
If not done, then after a
portupgrade your config will be changed to default.
To upgrade using the ports tree, do:
#> portupgrade dokuwiki
Make sure that the ports tree has been updated, or this will have no effect.
To install dokuwiki on Gentoo do
$> emerge --sync $> emerge -a dokuwiki
This will install dokuwiki in
/var/www/localhost/htdocs/dokuwiki
.
You should not forget to set up Apache (the web server) to support PHP. See http://gentoo-wiki.com/Apache_Modules_mod_php.
See the detailed HOWTO for DokuWiki on Tiger.
The HOWTO does not appear to be up-to-date (though it was helpful).
Below is what I did for Tiger (no previous DokuWiki installed):
$ cd ~/Desktop && tar -zxvf dokuwiki-2005-07-13.tgz $ mv dokuwiki-2005-07-13 ~/Sites/dokuwiki $ cd ~/Sites/dokuwiki $ touch data/changes.log $ sudo chown -R www data
$ cp conf/users.auth.php.dist conf/users.auth.php $ sudo chown www conf/users.auth.php $ cp conf/acl.auth.php.dist conf/acl.auth.php $ sudo chown www conf/acl.auth.php
$conf['basedir'] = '/~user/dokuwiki/';
in conf/local.php; autodetection does not work!
## in 10.4.3 client running the built in apache, but with site at /Library/Webserver/Documents (to mimic server) adding ‘basedir’ actually breaks it.
## The third-party Apache2 package runs as ‘nobody’, not ‘www’ – change your chown command accordingly
I got through installing Lighttpd, php5-fastcgi and DokuWiki, and it’s all working, but it required some rewriting of the rewrite rules, if you’ll pardon the pun.
Install PHP-FastCGI from the source, or use your distribution’s packages, which will probably be much easier. Once php-fastcgi is installed, follow the directions under the “Configuration” heading here: http://trac.lighttpd.net/trac/wiki/TutorialLighttpdAndPHP. You shouldn’t have to mess with the FastCGI settings a lot unless you really want to.
These are my settings:
fastcgi.server = ( ".php" => ( "localhost" => ( "socket" => "/tmp/php-fastcgi.socket", "bin-path" => "/usr/bin/php5-fcgi" ) ) )
Then we need to add some custom rewrite rules
url.rewrite = ( "^/wiki/_media/(.*)\?(.*)" => "/wiki/lib/exe/fetch.php?media=$1", "^/wiki/_detail/(.*)\?(.*)" => "/wiki/lib/exe/detail.php?media=$1", "/(.*)\.(.*)" => "$0", "/(lib)/" => "$0", "$^" => "/wiki/doku.php", "/wiki/(.*)\?(.*)" => "/wiki/doku.php?id=$1&$2", "/wiki/(.*)" => "/wiki/doku.php?id=$1", )
Some explanation is in order. Lighttpd does not use per directory .htaccess files, so any directory deny must be done at a higher level. This set of rewrite rules effectively does that.
These are what I have so far. Feel free to make corrections to them, as I will if I find anything that isn’t working right.
This is for people who want to use DokuWiki on their Desktop-Machine
dokuwiki-YYYY-MM-DD
directory to somewhere
below your new webserver documentroot eg. c:\xampp\htdocs\
and
rename it to dokuwiki
dokuwiki/data/
directory create a new empty
file named changes.log
(rightclick and select new → Textfile,
then rename the file)dokuwiki.php
file in the conf
directory to configure your Wiki (see config) or (better) create a
new conf/local.php
file containing those lines from
dokuwiki.php
, which you want to change. This way your changes are
preserved when overwriting the dokuwiki.php
with a new
release.Sometimes, you might require to create an attic/ directory under data dir. Thanks to oak to help me out with this.
This is for people who want to use DokuWiki on a Windows machine with IIS webserver (Windows 2000, Windows XP or Windows Server 2003)
dokuwiki-YYYY-MM-DD
directory to
dokuwiki
and move it toc:\inetpub\dokuwiki
dokuwiki/data/
directory create a new empty
file named changes.log
, and create the folders attic/, meta/,
locks/ and cache/ This is no longer necessary as
of version 2006-03-09 (and possibly earlier).The above fixme note is incorrect. As of 2006/05/01 I had to create the changes.log and the meta/ folder manually. This file and folder were not included in the original .tar.gz file for dokuwiki.
I do not agree to “incorrect”. The word “This” may be understood wrong. You still have to createchanges.log
, but the directories are created automagically
dokuwiki.php
file in the conf
directory to configure your Wiki (see config) or (better) create a
new conf/local.php
file containing those lines from
dokuwiki.php
, which you want to change. This way your changes are
preserved when overwriting the dokuwiki.php
with a new
release.dokuwiki/
directory and Check the
properties of the data/
folder. Ensure that the Internet Guest
Account (IUSR_computername) or the appropriate web server account has
Folder level “Write” permissions to the data/
folder. Windows-Users may need to rename the file from
dokuwiki-YYYY-MM-DD.tgz
to dokuwiki-YYYY-MM-DD.tar.gz
to make their archive tool recognize the file format correctly (See 209).
The windows file extension is now .tar - however renaming it and using winzip works just fine.
Extraction Programs:
NanoWeb is a PHP-based web server, and much lighter in its memory footprint than something like Apache. Nagios and Double Choco Latte both work fine, as does DokuWiki.
However, after following the instructions as described above for use with the Apache web server, it will be necessary to modify dokuwiki.php, as it does not automatically detect its web server location (URL).
Autodetection of an URL is not possible in all thinkable environments. Especially not when extensive URL rewriting and other forwarding mechnisms are in use. Furthermore the word “relative dir” is a bit missleading. Because dokuwiki requires an absolute pathname here. So start with a slash and end with a slash as in the example below. – Doogie - 27. May 2005
Change the line:
$conf['basedir'] = ''; //relative dir to serveroot - blank for autodetection
to something like:
$conf['basedir'] = '/dokuwiki/'; //relative dir to serveroot - blank for autodetection
Note that, for whatever reason, a trailing slash is required!!
This applies to most users of rented webspace.
A Screencast for this type of installation is available, too.
dokuwiki-YYYY-MM-DD/
data
directory create a new empty file named changes.log
dokuwiki.php
file in the conf
directory to configure your Wiki (see config) or (better) create a
new conf/local.php
file containing those lines from
dokuwiki.php
, which you want to change. This way your changes are
preserved when overwriting the dokuwiki.php
with a new
release.dokuwiki-YYYY-MM-DD
directory to your webhost using your
favourite FTP-toolcheck
option like this:
http://www.example.com/dokuwiki/doku.php?do=check. Go to your favorite webhost configuration page example for free.fr or test CHMOD command thru your command line FTP or right clicking in Filezilla.
Warning: session_start(): open(/tmp/php-ses/sess_215aaa2a389d6a10eee8c57939b486b6, O_RDWR) failed: No such file or directory (2) in /nfs/cust/6/36/44/644636/web/decuong/inc/init.php on line 53
// After the line: if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__)).'/'); // Add: session_save_path(DOKU_INC.'tmp');
rwxrwx—
or 770 for the dokuwiki/data/
directory and all files and directories below.
dokuwiki/data/
: attic, cache, locks, meta, media
(see also config)check
option like this:http://www.example.com/dokuwiki/doku.php?do=check.
After you have followed the basic install instructions, your DokuWiki may have out of the box behaviour:
Warning: include() [function.include]: Unable to access /home/s/o/s/sosml/www/lib/tpl/default/main.php in /home/s/o/s/sosml/www/inc/actions.php on line 103 Warning: include(/home/s/o/s/sosml/www/lib/tpl/default/main.php) [function.include]: failed to open stream: No such file or directory in /home/s/o/s/sosml/www/inc/actions.php on line 103 Warning: include() [function.include]: Failed opening '/home/s/o/s/sosml/www/lib/tpl/default/main.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/s/o/s/sosml/www/inc/actions.php on line 103
touch data/changes.log chmod 777 data/changes.log chmod 777 conf/acl.auth.php chmod 777 conf/users.auth.php mkdir data/meta chmod 777 data chmod 777 data/attic chmod 777 data/cache chmod 777 data/locks chmod 777 data/media chmod 777 data/meta chmod 777 data/pages
Sergio - 13.06.2006 For shared hosting, this seems to be an essential step. Can you add information about security issues or different approaches to solve this problem? I think most of the dokuwiki users install the system on shared hosting services.
Before upgrading, you should always read the changelog
to see if something changed you should be aware of when upgrading. To determine
the version you are running, have a look in the HTML source of a Page generated by
DokuWiki there should be something like <meta name=”generator”
content=”DokuWiki 2005-02-06” />
4).
Note for Windows Users: Remember to use an editor that saves in UTF-8 Unix format, such as Crimson Editor or Textpad.
The easiest way to upgrade is perform the following steps
changes.log
and the contents of your
data/
(perhaps not the wiki/
directory),
attic/
and media/
directories from the backup
location to the new install dirchanges.log
(which was in the root directory)
is now in the data/
directory;data/
directory is now in the data/pages/
directory; andattic/
and media/
directories that were in the root directory are now under the
data/
directory.conf/local.php
from the backup
location to the new install dirusers.auth
into
users.auth.php
and acl.auth
into
acl.auth.php
.If you have made any changes on interwiki or smiley configurations or the source code itself, you will probably want to reapply them after upgrading.
When you upgrade from a version prior to 2005-02-06, you will need to convert your data to UTF8 after upgrading.
If you encounter some inconsistencies in DokuWikis behaviour after
upgrading, you should delete the cache files in data/.cache/
and
media/.cache/
. You should make sure your browser hasn’t cached an
old stylesheet, too.
Some reminders! I tried to upgrade from 2005-05-17 to 2005-07-13, and had problems with plain ACL. This has been discussed at http://wiki.splitbrain.org/wiki:discussion:acl?s=users%5C.auth#user_registration_-_can_t_register . I was in the process of reverted to 2005-05-13, and decided to give another try, which appears to have been successful. Two hints: (a) when transferring files over to the updated program directory, make sure that the chmod is set to 777 for all of them, or they won’t be editable! (In the Windows world, that means clearing the ReadOnly flag on files and folders. You may also need to make sure the right people/groups have read/write/full access in both Explorer and IIS —DGM2, 2006-03-02); and (b) when updating configuration files, remember to use a UTF-8 editor if you’re on Windows! (Such as Crimson Editor or Textpad.). {David Ing, 2005/07/17}
This method is not official - i (redeeman, visitor) just thought it would be nice to present this method of upgrade, which i just have used myself to upgrade from 2005-07-01 to 2005-07-13.
the thing i do, is to use diff, a command to generate a patch, this should be present on almost any unix system, however, it is probably also possible to find a win32 version on google.
now all we do to create the patch is to unpack the two different versions, so we get the dirs: “dokuwiki-2005-07-01” and “dokuwiki-2005-07-13” (this is the version change i did, your upgrade might be from/to different versions). now all we need to do is issue the diff command, and create the patch:
diff -Naur dokuwiki-2005-07-01 dokuwiki-2005-07-13 > doku.diff
now we have the patch, this is essentially only the differences between the two directories (e.g it knows nowthing of your pages, which is good) and you should be able to patch up, without it interfering with anything. however, you should note, that it might have changes in the conf/ dir in files you have edited, in which case you should do a backup of the file, copy the file from the version you already have, so the patch will work, and then when the patch is applied redo your changes, however this is only the case if changes to the dokuwiki standard php file is in an upgrade.
To check which files the patch will affect, you can run with –dry-run.. just cd into the dir where dokuwiki is installed, and run:
patch -p1 --dry-run </path/to/doku.diff
then if you accept it :) just run it like this, without –dry-run:
patch -p1 </path/to/doku.diff
Here is what you may want to do when everything is up and working.
footer.html
inside the dokuwiki/lib/tpl/default folder to
represent the appropriate license:.htaccess
and set the appropriate config file option.style.css
to your own ideasThe topic of multi-wiki, or wiki farms, comes up briefly in freelists.org archives, in this thread, this thread, and this one. In the last one, Andi describes changes he made so $conf[’title’] can be used to establish different cookies for separate installations.
Note that namespaces could be used to separate content in a single installation. And multiple installation means each one will need its own upgrade. It is not the same as multiple instances sharing common code. Package upgrades, like Debian’s, will not handle multiple installations. But for some this is a price worth paying. Here is an approach that worked with the GNU/Linux installation using Apache. It can probably be adapted to the other situations:
Do the first two steps once and repeat the last three to make multiple installations.
Another way to make it multi-wiki by whoo5) :
add follow line:
@ini_set("session.cookie_path", DOKU_BASE);
to init.php(inc\init.php) line 44. just follow
line 43:
@ini_set('arg_separator.output', '&');
the make any copy as your wish. it’s that simple
.