It's better when it's simple

User Tools

Site Tools


DokuWiki on Gentoo

To install DokuWiki on Gentoo:

Prior Configs

System Base

First, be sure your system is up to date:

$> sudo emerge --sync

As usual, be sure to follow any directions that come back from updating your system before you go on to the later parts of this outline. It's also good practice to have your Gentoo system up to date, so if possible, do something like:

$> sudo emerge -auv @world

In this example, we assume you've got the equery command available. It's not strictly necessary to run dokuwiki, but it is handy for this and lots of other situation. It's part of the gentoolkit package; if you don't have that already:

$> sudo emerge -av gentoolkit

Assuming that Apache is your web server, and already installed on your host, be sure that PHP is supported. In:


…you should find PHP in the list of options supported; for instance:


We assume that you'll use the webapp-config process to control dokuwiki space on your server:

$> equery l webapp-config
* Searching for webapp-config ...
[IP-] [  ] app-admin/webapp-config-1.54-r1:0

If it doesn't show up, go get it:

$> sudo emerge -av webapp-config

DokuWiki package

To use this example, vhosts will need to be recognized by your dokuwiki package. In a new file:


…be sure there's something like:

www-apps/dokuwiki vhosts


Once that's ready, you can bring the package to your host.

$> sudo emerge -av dokuwiki 

To be sure that the vhosts option is in place, or to check for other options in the dokuwiki package, use equry u:

$ equery u dokuwiki
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for www-apps/dokuwiki-20170219b:
 U I
 - - gd     : Add support for media-libs/gd (to generate graphics on the fly)
 + + vhosts : Add support for installing web-based applications into a
            virtual-hosting environment

If you don't like what you see there – for instance, if the vhosts setting shows up “-” instead of “+” and you want to keep following the instructions here – find and fix any changes necessary, and build the dokuwiki package again.

To use the webapp-config command, be sure you know the version you're using; equery can tell us that too. As of 26 June 2017, we find version 20170219b:

$> equery l dokuwiki
* Searching for dokuwiki ...
[IP-] [  ] www-apps/dokuwiki-20170219b:20170219b

Here, our webapp-config tool will only answer commands from root (which is probably a good thing):

$> webapp-config --version
bash: webapp-config: command not found
$> sudo webapp-config --version

To use webapp-config to install DokuWiki, version 20170219b, in a server named <host>, in /var/www/<host>/htdocs/dokuwiki/1):

$> sudo webapp-config -h <host> -d dokuwiki -I dokuwiki 20170219b
*   Creating required directories
*   Linking in required files
*     This can take several minutes for larger apps
*   Files and directories installed

If all goes well, that should be followed by “POST-INSTALL INSTRUCTIONS”. Read well! In particular, follow the part about copying local.php.dist into local.php, and adjust it to suit your needs. Then… carry on!

If you don't want a virtual service, or you don't need your DokuWiki to appear on the network at all, “host” can just be “localhost”.
install/gentoo.txt · Last modified: 2017-06-27 02:57 by

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki