{"id":15757,"date":"2023-03-16T23:53:37","date_gmt":"2023-03-16T20:53:37","guid":{"rendered":"https:\/\/kifarunix.com\/?p=15757"},"modified":"2024-03-10T08:27:58","modified_gmt":"2024-03-10T05:27:58","slug":"install-dokuwiki-on-debian-11","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-dokuwiki-on-debian-11\/","title":{"rendered":"Install DokuWiki on Debian 11"},"content":{"rendered":"\n<p>In this demo, we are going to learn how to install DokuWiki on Debian 11.&nbsp;<a href=\"https:\/\/www.dokuwiki.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">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 href=\"https:\/\/www.dokuwiki.org\/features\" target=\"_blank\" rel=\"noreferrer noopener\">DokuWiki features page<\/a>.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#installing-doku-wiki-on-debian-11\">Installing DokuWiki on Debian 11<\/a><ul><li><a href=\"#run-system-update\">Run system update<\/a><\/li><li><a href=\"#install-php-and-required-php-modules\">Install PHP and Required PHP Modules<\/a><ul><li><a href=\"#install-php-8-1\">Install PHP 8.1<\/a><\/li><li><a href=\"#install-dokuwiki-required-php-modules\">Install Dokuwiki Required PHP modules<\/a><\/li><\/ul><\/li><li><a href=\"#install-apache-web-server\">Install Apache Web Server<\/a><\/li><li><a href=\"#open-apache-port-on-firewall\">Open Apache Port on Firewall<\/a><\/li><li><a href=\"#install-doku-wiki\">Install DokuWiki<\/a><\/li><li><a href=\"#create-apache-virtual-host-for-doku-wiki\">Create Apache VirtualHost for DokuWiki<\/a><\/li><li><a href=\"#complete-doku-wiki-setup-on-debian-11\">Complete DokuWiki Setup on Debian 11<\/a><\/li><li><a href=\"#reference\">Reference<\/a><\/li><li><a href=\"#other-tutorials\">Other Tutorials<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing-doku-wiki-on-debian-11\">Installing DokuWiki on Debian 11<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"run-system-update\">Run system update<\/h3>\n\n\n\n<p>Update and upgrade your system packages;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-php-and-required-php-modules\">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.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"install-php-8-1\">Install PHP 8.1<\/h4>\n\n\n\n<p>DokuWiki, as of this writing, compatible with PHP 8.0 and 8.1.<\/p>\n\n\n\n<p>To install PHP 8.1 on Debian 11 for DokuWiki, check the guide below;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-php-8-on-debian-11\/#install-php-8-0-8-1-8-2-8-x-on-debian-11\" target=\"_blank\" rel=\"noreferrer noopener\">Install PHP 8.1 on Debian 11<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"install-dokuwiki-required-php-modules\">Install Dokuwiki Required PHP modules<\/h4>\n\n\n\n<p>Install required PHP 8.1 modules for DokuWiki on Debian 11;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install libapache2-mod-php8.1 php8.1-xml php8.1-mbstring php8.1-zip php8.1-intl php8.1-gd<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-apache-web-server\">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-code\"><code>apt list apache2 -a<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Listing... Done\napache2\/stable,now 2.4.54-1~deb11u1 amd64 &#91;installed,automatic]\napache2\/stable-security 2.4.52-1~deb11u2 amd64<\/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-code\"><code>apt install apache2 -y<\/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-code\"><code>systemctl enable --now apache2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"open-apache-port-on-firewall\">Open Apache Port on Firewall<\/h3>\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.<\/p>\n\n\n\n<p>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-code\"><code>ufw allow 80\/tcp<\/code><\/pre>\n\n\n\n<p>or simply;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ufw allow Apache<\/code><\/pre>\n\n\n\n<p>or if you are planning on using HTTPS;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ufw allow \"Apache Full\"<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-doku-wiki\">Install DokuWiki<\/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-code\"><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-code\"><code>mkdir \/var\/www\/html\/dokuwiki<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><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-code\"><code>ls -1 \/var\/www\/html\/dokuwiki<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>bin\nconf\nCOPYING\ndata\ndoku.php\nfeed.php\ninc\nindex.php\ninstall.php\nlib\nREADME\nvendor\nVERSION\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"create-apache-virtual-host-for-doku-wiki\">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\"><code>&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>There are some DokuWiki files and directories that needs to be protected.<\/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-code\"><code>chown -R 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-code\"><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-code\"><code>systemctl reload apache2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"complete-doku-wiki-setup-on-debian-11\">Complete DokuWiki Setup on Debian 11<\/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<p>Pay attention to the Initial ACL Policy.<\/p>\n\n\n\n<p>Set the name of the wiki, enable the ACL and other settings.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/doku-wiki-install-debian11.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1740\" height=\"889\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/doku-wiki-install-debian11.png\" alt=\"Install DokuWiki on Debian 11\" class=\"wp-image-15771\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/doku-wiki-install-debian11.png?v=1678999385 1740w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/doku-wiki-install-debian11-768x392.png?v=1678999385 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/doku-wiki-install-debian11-1536x785.png?v=1678999385 1536w\" sizes=\"(max-width: 1740px) 100vw, 1740px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>Save the configurations and continue to your DokuWiki.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/dokuwiki-welcome-page.png\" class=\"td-modal-image\"><figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1111\" height=\"941\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/dokuwiki-welcome-page.png\" alt=\"\" class=\"wp-image-15772\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/dokuwiki-welcome-page.png?v=1678999592 1111w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/dokuwiki-welcome-page-768x650.png?v=1678999592 768w\" sizes=\"(max-width: 1111px) 100vw, 1111px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>To login to your DokuWiki, click <strong>Log in<\/strong> at the top right corner.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/login-to-dokuwiki.png\" class=\"td-modal-image\"><figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1140\" height=\"601\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/login-to-dokuwiki.png\" alt=\"\" class=\"wp-image-15773\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/login-to-dokuwiki.png?v=1678999600 1140w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/login-to-dokuwiki-768x405.png?v=1678999600 768w\" sizes=\"(max-width: 1140px) 100vw, 1140px\" \/><\/figure><\/a><\/div>\n\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\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/dokuwiki-settings.png\" class=\"td-modal-image\"><figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1264\" height=\"738\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/dokuwiki-settings.png\" alt=\"\" class=\"wp-image-15774\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/dokuwiki-settings.png?v=1678999608 1264w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/dokuwiki-settings-768x448.png?v=1678999608 768w\" sizes=\"(max-width: 1264px) 100vw, 1264px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>Beautiful. That is all on installing DokuWiki on Debian 11. Explore the tool further and make your own tweaks. Enjoy.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"reference\">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\" id=\"other-tutorials\">Other Tutorials<\/h3>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-configure-dokuwiki-openldap-authentication\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Configure DokuWiki OpenLDAP Authentication<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-dokuwiki-on-rocky-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install DokuWiki on Rocky Linux<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this demo, we are going to learn how to install DokuWiki on Debian 11.&nbsp;DokuWiki&nbsp;is an opensource software written in PHP that allows users to<\/p>\n","protected":false},"author":10,"featured_media":15778,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,1275],"tags":[6455,6456,6454,6458],"class_list":["post-15757","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-wiki","tag-debian-11-dokuwiki","tag-dokuwiki-php-8-1","tag-install-dokuwiki-debian-11","tag-php-8-1-with-dokuwiki","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\/15757"}],"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\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=15757"}],"version-history":[{"count":7,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/15757\/revisions"}],"predecessor-version":[{"id":20703,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/15757\/revisions\/20703"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/15778"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=15757"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=15757"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=15757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}