Ubuntu 16.04: Install DokuWiki

This article will describe installing DokuWiki.

1 Install dokuwiki

Install packages for dokuwiki with apt.

$ sudo apt install -y apache2 libapache2-mod-php7.0 \
php7.0-xml php7.0-mbstring

Install dokuwiki with apt.

$ sudo apt install -y dokuwiki

The dialog for "purge pages on package removal" is displayed. This article selects no.

0001_purge-pages.png

Input admin password.

0002_Input-admin-password.png

Confirm admin password.

0003_Confirm-admin-password.png

2 Apache2

Create symbolic link from /usr/share/dokuwiki to /var/www/html.

$ sudo ln -s /usr/share/dokuwiki /var/www/html/

Change owner of /usr/share/dokuwiki to www-data:www-data.

$ sudo chown -R www-data:www-data /usr/share/dokuwiki

Create site file for DokuWiki.

$ sudo su -c 'cat <<EOF > /etc/apache2/sites-available/dokuwiki.conf
<Directory /usr/share/dokuwiki>
  Order allow,deny
  Allow from all
</Directory>
EOF
'
$ sudo a2ensite dokuwiki
$ sudo systemctl restart apache2

3 Access to DokuWiki

Access the following URL with browser.

http://<server>/dokuwiki

DokuWiki page is displayed.

0004_DokuWiki.png