Debian 8: Install DokuWiki for wiki software

This article will describe installing DokuWiki.

1 Install DokuWiki

  • This article uses default SSL/TLS certicication file for https. Please change your SSL/TLS certification file.
  • If you use http instead of https, change 443 to 80 and delete SSLXXX directive in /etc/apache2/sites-available/wordpress.conf.
#!/bin/sh

DOKUWIKI_PASSWD=dokuwiki

debian_install_dokuwiki()
{
  cat <<EOF | sudo debconf-set-selections
dokuwiki dokuwiki/wiki/confirm password ${DOKUWIKI_PASSWD}
dokuwiki dokuwiki/wiki/password password ${DOKUWIKI_PASSWD}
dokuwiki dokuwiki/system/purgepages boolean false
EOF
  sudo apt install -y dokuwiki

  sudo ln -s /usr/share/dokuwiki /var/www/html/
  sudo su -c 'cat <<EOF > /etc/apache2/sites-available/dokuwiki.conf
<VirtualHost _default_:443>
  SSLEngine on
  SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
  SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

  <Directory /usr/share/dokuwiki>
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>
EOF
'
  sudo a2enmod ssl
  sudo a2ensite dokuwiki
  sudo systemctl restart apache2
}

debian_install_dokuwiki

2 Access to DokuWiki

Access to the following URL.

https://<server>/dokuwiki

Because the chrome does not have this page's certification, the crome warns the following and cannot to access to this page. You need to click "ADVANCED" and "Proceed to <server> (unsafe)". The other browser will needs the similar way.

0001_YourConnectionIsNotPrivate.png

DokuWiki page is displayed. Login to DokuWiki with inputing admin to user and DOKUWIKI_PASSWD value to password.

0002_DokuWiki.png