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:
/etc/conf.d/apache2
…you should find PHP in the list of options supported; for instance:
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP"
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
To use this example, vhosts
will need to be recognized by your dokuwiki package. In a new file:
/etc/portage/package.use/dokuwiki
…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 1.54
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!