{"id":5805,"date":"2020-05-05T22:15:28","date_gmt":"2020-05-05T19:15:28","guid":{"rendered":"https:\/\/kifarunix.com\/?p=5805"},"modified":"2024-03-14T20:39:22","modified_gmt":"2024-03-14T17:39:22","slug":"install-and-setup-dokuwiki-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-and-setup-dokuwiki-on-ubuntu-20-04\/","title":{"rendered":"Install and Setup DokuWiki on Ubuntu 20.04"},"content":{"rendered":"\n<p>In this demo, we are going to learn how to install and setup DokuWiki on ubuntu 20.04 server.&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/www.dokuwiki.org\/\" target=\"_blank\">DokuWiki<\/a>&nbsp;is an opensource software written in PHP that allows users to create and edit pages using a web browser. It works on plain texts and requires no database.<\/p>\n\n\n\n<p>DokuWiki is feature rich. Read about the features on&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/www.dokuwiki.org\/features\" target=\"_blank\">DokuWiki features page<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing DokuWiki on Ubuntu 20.04<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Run system update<\/h3>\n\n\n\n<p>Update and upgrade your system packages;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt update<\/code><\/pre>\n\n\n\n<pre id=\"block-cab855d9-b137-42b3-be0d-e9d57281a690\" class=\"wp-block-preformatted\">apt upgrade<\/pre>\n\n\n\n<p>Next, run system reboot;<\/p>\n\n\n\n<p><strong>Note<\/strong>: <em>In order to determine whether to reboot the system after the upgrade or what services need restart, just install the <code>needrestart<\/code> package, <code>apt install needrestart<\/code>. Once you install it, just run <code>needrestart<\/code> from terminal.<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl reboot<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install PHP and Required PHP Modules<\/h3>\n\n\n\n<p>DokuWiki is a PHP based web application. It requires PHP and some PHP extensions installed in order to function correctly. To install PHP and the required modules for DokuWiki, run the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install php php-gd php-xml php-json<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install Apache Web Server<\/h3>\n\n\n\n<p>Apache is used as web server for DokuWiki in this demo. When PHP is installed, it installs Apache as one of its required package dependency. To confirm this use the <code>list<\/code> option of <code>apt<\/code> command;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt list apache2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apache2\/focal,now 2.4.41-4ubuntu3 amd64 [<strong>installed<\/strong>,automatic]<\/code><\/pre>\n\n\n\n<p>Assuming that for some weird reasons Apache is not installed with PHP, run the command below to install it.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install apache2<\/code><\/pre>\n\n\n\n<p>Start and enable Apache to run on system boot.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl enable --now apache2<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Open Apache Port on Firewall<\/h4>\n\n\n\n<p>To allow external access to your DokuWiki, you need to open Apache port on firewall (UFW) if at all it is running. The port to open depends on the traffic being server, which in this case is just basic HTTP (port 80).<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ufw allow 80\/tcp<\/code><\/pre>\n\n\n\n<p>or simply;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ufw allow Apache<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install DokuWiki on Ubuntu 20.04<\/h3>\n\n\n\n<p>DokuWiki is distributed as a ready to run application. All you need to do is download the distribution tarball and extract it to your web root directory;<\/p>\n\n\n\n<p>Download the latest release version from <a rel=\"noreferrer noopener\" href=\"https:\/\/download.dokuwiki.org\/\" target=\"_blank\">DokuWiki download\u2019s page<\/a>. You can simply run the command below to get it;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>wget https:\/\/download.dokuwiki.org\/src\/dokuwiki\/dokuwiki-stable.tgz<\/code><\/pre>\n\n\n\n<p>&nbsp;Unpack DokuWiki Tarball to your web root directory, <code>\/var\/www\/html\/dokuwiki<\/code>, in our case;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mkdir \/var\/www\/html\/dokuwiki<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>tar xzf dokuwiki-stable.tgz -C \/var\/www\/html\/dokuwiki\/ --strip-components=1<\/code><\/pre>\n\n\n\n<p>This will extract the application files on to our web root directory, <code>\/var\/www\/html\/dokuwiki\/<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ls \/var\/www\/html\/dokuwiki<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>bin conf COPYING data doku.php feed.php inc index.php install.php lib README vendor VERSION<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Create Apache VirtualHost for DokuWiki<\/h3>\n\n\n\n<p>To create a VirtualHost config file for DokuWiki, simply proceed as follows making the relevant changes as per your environment setup.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vi \/etc\/apache2\/sites-available\/dokuwiki.conf<\/code><\/pre>\n\n\n\n<pre class=scroll-box>\n&lt;VirtualHost *:80&gt;\n        ServerName    dokuwiki.kifarunix-demo.com\n        DocumentRoot  \/var\/www\/html\/dokuwiki\n\n        &lt;Directory ~ \"\/var\/www\/html\/dokuwiki\/(bin\/|conf\/|data\/|inc\/)\"&gt;\n            &lt;IfModule mod_authz_core.c&gt;\n                AllowOverride All\n                Require all denied\n            &lt;\/IfModule&gt;\n            &lt;IfModule !mod_authz_core.c&gt;\n                Order allow,deny\n                Deny from all\n            &lt;\/IfModule&gt;\n        &lt;\/Directory&gt;\n\n        ErrorLog   \/var\/log\/apache2\/dokuwiki_error.log\n        CustomLog  \/var\/log\/apache2\/dokuwiki_access.log combined\n&lt;\/VirtualHost&gt;\n<\/code><\/pre>\n\n\n\n<p>Save and exit the configuration file.<\/p>\n\n\n\n<p>The use of <code><strong>AllowOverride All<\/strong><\/code> allows the use of <code><strong>.htaccess<\/strong><\/code>&nbsp;files. As such, rename the DokuWiki .htaccess file as shown below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>cp \/var\/www\/html\/dokuwiki\/.htaccess{.dist,}<\/code><\/pre>\n\n\n\n<p>Set the ownership of the DokuWiki web root directory to&nbsp;<code>www-data<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>chown -R www-data:www-data \/var\/www\/html\/dokuwiki<\/code><\/pre>\n\n\n\n<p>Check Apache for any syntax errors;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apache2ctl -t<\/code><\/pre>\n\n\n\n<p>If you get the Syntax OK output, then you good. Otherwise, fix any error.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>Syntax OK<\/code><\/pre>\n\n\n\n<p>Disable the default Apache test site;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>a2dissite 000-default.conf<\/code><\/pre>\n\n\n\n<p>Enable the DokuWiki site;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>a2ensite dokuwiki.conf<\/code><\/pre>\n\n\n\n<p>Reload Apache;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl reload apache2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Complete DokuWiki Setup on Ubuntu 20.04<\/h3>\n\n\n\n<p>To complete the setup, access your DokuWiki from the browser, <code>http:\/\/&lt;server-IP-or-hostname&gt;\/install.php<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1233\" height=\"648\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/dokuwiki-setup.png\" alt=\"\" class=\"wp-image-5810\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/dokuwiki-setup.png?v=1588705738 1233w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/dokuwiki-setup-768x404.png?v=1588705738 768w\" sizes=\"(max-width: 1233px) 100vw, 1233px\" \/><\/figure>\n\n\n\n<p>Set the name of the wiki, enable the ACL and other settings. Save the configurations and continue to your DokuWiki.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"786\" height=\"653\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/welcome-page.png\" alt=\"\" class=\"wp-image-5812\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/welcome-page.png?v=1588705825 786w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/welcome-page-768x638.png?v=1588705825 768w\" sizes=\"(max-width: 786px) 100vw, 786px\" \/><\/figure><\/div>\n\n\n<p>To login to your DokuWiki, click <strong>Log in<\/strong> at the top right corner.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"801\" height=\"458\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/login.png\" alt=\"\" class=\"wp-image-5811\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/login.png?v=1588705780 801w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/login-768x439.png?v=1588705780 768w\" sizes=\"(max-width: 801px) 100vw, 801px\" \/><\/figure><\/div>\n\n\n<p>To make further configurations after login, click <strong>Admin<\/strong> gear icon at the top right corner.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"801\" height=\"496\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/admin-tab.png\" alt=\"\" class=\"wp-image-5813\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/admin-tab.png?v=1588705873 801w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/admin-tab-768x476.png?v=1588705873 768w\" sizes=\"(max-width: 801px) 100vw, 801px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\">Reference<\/h3>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/www.dokuwiki.org\/install\" target=\"_blank\">Install [DokuWiki]<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Other Tutorials<\/h3>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/kifarunix.com\/how-to-configure-dokuwiki-openldap-authentication\/\" target=\"_blank\">How to Configure DokuWiki OpenLDAP Authentication<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/kifarunix.com\/install-dokuwiki-on-centos-8\/\" target=\"_blank\">Install DokuWiki on CentOS 8<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/kifarunix.com\/install-and-setup-openvpn-server-on-ubuntu-20-04\/\" target=\"_blank\">Install and Setup OpenVPN Server on Ubuntu 20.04<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-elastic-elk-stack-on-ubuntu-20-04\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install ELK Stack on Ubuntu 20.04<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this demo, we are going to learn how to install and setup DokuWiki on ubuntu 20.04 server.&nbsp;DokuWiki&nbsp;is an opensource software written in PHP that<\/p>\n","protected":false},"author":3,"featured_media":11982,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,1275],"tags":[1276,1573,1572,1574,1200],"class_list":["post-5805","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-wiki","tag-dokuwiki","tag-dokuwiki-ubuntu-20-04","tag-install-dokuwiki-on-ubuntu-20-04","tag-setup-dokuwiki-with-apache-ubuntu-20-04","tag-ubuntu-20-04","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/5805"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=5805"}],"version-history":[{"count":6,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/5805\/revisions"}],"predecessor-version":[{"id":21398,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/5805\/revisions\/21398"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/11982"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=5805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=5805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=5805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}