{"id":11984,"date":"2022-03-29T21:01:46","date_gmt":"2022-03-29T18:01:46","guid":{"rendered":"https:\/\/kifarunix.com\/?p=11984"},"modified":"2024-03-09T10:34:48","modified_gmt":"2024-03-09T07:34:48","slug":"install-dokuwiki-on-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-dokuwiki-on-ubuntu-22-04\/","title":{"rendered":"Install DokuWiki on Ubuntu 22.04"},"content":{"rendered":"\n<p>In this demo, we are going to learn how to install DokuWiki on Ubuntu 22.04.\u00a0<a href=\"https:\/\/www.dokuwiki.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">DokuWiki<\/a>\u00a0is 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=\"#install-doku-wiki-on-ubuntu-22-04\">Install DokuWiki on Ubuntu 22.04<\/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><\/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-ubuntu-22-04\">Complete DokuWiki Setup on Ubuntu 22.04<\/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=\"install-doku-wiki-on-ubuntu-22-04\">Install DokuWiki on Ubuntu 22.04<\/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<p>DokuWiki, as of this writing, is not yet fully compatible with PHP 8.<\/p>\n\n\n\n<p>Hence, you need to install PHP 7.4;<\/p>\n\n\n\n<p>To install PHP 7.4 and the required modules for DokuWiki, run the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add-apt-repository ppa:ondrej\/php --yes &amp;&gt; \/dev\/null<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sed -i 's\/jammy\/focal\/' \/etc\/apt\/sources.list.d\/ondrej-ubuntu-php-jammy.list<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install php7.4 php7.4-gd php7.4-xml php7.4-json libapache2-mod-php7.4 -y<\/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<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>apache2\/jammy,now 2.4.52-1ubuntu2 amd64 &#91;installed]<\/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<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>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-ubuntu-22-04\">Complete DokuWiki Setup on Ubuntu 22.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<p>Pay attention to the Initial ACL Policy.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/dokuwiki-setup.png\" class=\"td-modal-image\"><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><\/a><\/div>\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\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/welcome-page.png\" class=\"td-modal-image\"><figure class=\"wp-block-image 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><\/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\/2020\/05\/login.png\" class=\"td-modal-image\"><figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"801\" height=\"458\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/05\/login.png\" alt=\"Install DokuWiki on ubuntu\" 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><\/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\/2020\/05\/admin-tab.png\" class=\"td-modal-image\"><figure class=\"wp-block-image 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=\"Install DokuWiki on ubuntu 22.04\" 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><\/a><\/div>\n\n\n\n<p>The installation of DokuWiki on Ubuntu 22.04 is now done. 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\/install-and-setup-dokuwiki-on-ubuntu-20-04\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install and Setup DokuWiki on Ubuntu 20.04<\/a><\/p>\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","protected":false},"excerpt":{"rendered":"<p>In this demo, we are going to learn how to install DokuWiki on Ubuntu 22.04.\u00a0DokuWiki\u00a0is an opensource software written in PHP that allows users to<\/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],"tags":[1276,4774,4772,4412,4773,4775],"class_list":["post-11984","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-dokuwiki","tag-dokuwiki-install-ubuntu","tag-install-dokuwiki-ubuntu-22-04","tag-ubuntu-22-04","tag-ubuntu-22-04-dokuwiki","tag-ubuntu-install-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\/11984"}],"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=11984"}],"version-history":[{"count":7,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/11984\/revisions"}],"predecessor-version":[{"id":20424,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/11984\/revisions\/20424"}],"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=11984"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=11984"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=11984"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}