{"id":2005,"date":"2022-03-29T23:06:48","date_gmt":"2022-03-29T20:06:48","guid":{"rendered":"http:\/\/kifarunix.com\/?p=2005"},"modified":"2024-03-09T10:32:05","modified_gmt":"2024-03-09T07:32:05","slug":"install-dokuwiki-on-rocky-linux","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-dokuwiki-on-rocky-linux\/","title":{"rendered":"Install DokuWiki on Rocky Linux"},"content":{"rendered":"\n<p>In this demo, we are going to learn how to install DokuWiki on Rocky Linux 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. Read about the features provided by the DokuWiki 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\">Install DokuWiki on Rocky Linux<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Run system update<\/h3>\n\n\n\n<p>To begin with, ensure your system packages are up-to-date.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf update<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install PHP and Other Required PHP Modules<\/h3>\n\n\n\n<p>DokuWiki is a PHP based web application which requires PHP and some other PHP extensions to function correctly.<\/p>\n\n\n\n<p>By default, PHP 7.2 stream repos are enabled on Rocky Linux. In order to be able to install PHP 7.4 in Rocky Linux, reset PHP 7.2 repos and enable PHP 7.4 repos;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf module -y reset php<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf module -y enable php:7.4<\/code><\/pre>\n\n\n\n<p>Next, run the command below to install PHP and required DokuWiki modules;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf install php php-gd php-xml php-json<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Run Apache Web Server<\/h3>\n\n\n\n<p>In this demo, we are using Apache as our web server for DokuWiki. Apache is installed alongside PHP.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf info httpd<\/code><\/pre>\n\n\n\n<pre class=scroll-box>\nInstalled Packages\nName         : httpd\nVersion      : 2.4.37\nRelease      : 43.module+el8.5.0+747+83fae388.3\nArchitecture : x86_64\nSize         : 4.3 M\nSource       : httpd-2.4.37-43.module+el8.5.0+747+83fae388.3.src.rpm\nRepository   : @System\nFrom repo    : appstream\nSummary      : Apache HTTP Server\nURL          : https:\/\/httpd.apache.org\/\nLicense      : ASL 2.0\nDescription  : The Apache HTTP Server is a powerful, efficient, and extensible\n             : web server.\n<\/code><\/pre>\n\n\n\n<p>If not installed for some reasons, run the command below to install it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf install httpd<\/code><\/pre>\n\n\n\n<p>Next, start and enable Apache to run on system boot.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable --now httpd<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Allow Apache through Firewall<\/h3>\n\n\n\n<p>To remotely allow HTTP traffic to the DokuWiki server, you need to open port 80 on firewall. Otherwise, for HTTPS, open port 443. This demo is using HTTP, hence open port 80\/TCP by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>firewall-cmd --permanent --add-port=80\/tcp\nfirewall-cmd --reload<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install DokuWiki<\/h3>\n\n\n\n<p>DokuWiki installation is as simple as downloading the application itself and placing it on the default web root directory.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Download Stable Release Version<\/h4>\n\n\n\n<p>Navigate to&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/download.dokuwiki.org\/\" target=\"_blank\">DokuWiki download\u2019s page<\/a>&nbsp;and grab the latest release version. You can simply run the command below to download the current stable release version of DokuWiki.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf install wget<\/code><\/pre>\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<h4 class=\"wp-block-heading\">Extract DokuWiki Tarball<\/h4>\n\n\n\n<p>Once the download is complete, run the command below to extract DokuWiki to the default web root directory, which is&nbsp;<code>\/var\/www\/html<\/code>&nbsp;in this demo.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf install tar<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>tar xzf dokuwiki-stable.tgz  --strip-components=1 -C \/var\/www\/html\/<\/code><\/pre>\n\n\n\n<p>This will extract DokuWiki and place it on&nbsp;<code>\/var\/www\/html\/<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -1 \/var\/www\/html\/<\/code><\/pre>\n\n\n\n<pre class=scroll-box>\nbin\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\">Create Apache VirtualHost for DokuWiki<\/h3>\n\n\n\n<p>Create an Apache VirtualHost for DokuWiki as shown below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vi \/etc\/httpd\/conf.d\/dokuwiki.conf<\/code><\/pre>\n\n\n\n<pre class=scroll-box>\n&lt;VirtualHost *&gt;\n\tServerName    dokuwiki.kifarunix-demo.com\n\tDocumentRoot  \/var\/www\/html\n\n\t&lt;Directory ~ \"\/var\/www\/html\/(bin\/|conf\/|data\/|inc\/)\"&gt;\n\t    &lt;IfModule mod_authz_core.c&gt;\n                AllowOverride All\n        \tRequire all denied\n\t    &lt;\/IfModule&gt;\n\t    &lt;IfModule !mod_authz_core.c&gt;\n\t        Order allow,deny\n        \tDeny from all\n\t    &lt;\/IfModule&gt;\n\t&lt;\/Directory&gt;\n\n\tErrorLog   \/var\/log\/httpd\/dokuwiki_error.log\n\tCustomLog  \/var\/log\/httpd\/dokuwiki_access.log combined\n&lt;\/VirtualHost&gt;\n\n<\/code><\/pre>\n\n\n\n<p>Save and quit the configuration file.<\/p>\n\n\n\n<p>Note that the line,&nbsp;<strong><code>AllowOverride All<\/code><\/strong>, turns on the use of&nbsp;<strong><code>htaccess<\/code><\/strong>&nbsp;file for more directory access controls. As such, rename the DokuWiki .htaccess file as shown below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp \/var\/www\/html\/.htaccess{.dist,}<\/code><\/pre>\n\n\n\n<p>Set the ownership of the DokuWiki web root directory to&nbsp;<code>apache<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chown -R apache:apache \/var\/www\/html<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Configure SELinux Policies for DokuWiki<\/h3>\n\n\n\n<p>If SELinux is running, you need to run the commands below to configure SELinux to allow various accesses for DokuWiki.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf install policycoreutils-python-utils<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>semanage fcontext -a -t httpd_sys_rw_content_t \"\/var\/www\/html\/conf(\/.*)?\"<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>restorecon -Rv \/var\/www\/html\/conf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>restorecon -Rv \/var\/www\/html\/data<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>setsebool -P httpd_can_network_connect on<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>setsebool -P httpd_can_sendmail on<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>setsebool -P httpd_unified 1<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>semanage fcontext -a -t httpd_sys_rw_content_t \"\/var\/www\/html\/lib\/plugins(\/.*)?\"<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>restorecon -Rv \/var\/www\/html\/lib\/plugins<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>semanage fcontext -a -t httpd_sys_rw_content_t \"\/var\/www\/html\/lib\/tpl(\/.*)?\"<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>restorecon -Rv \/var\/www\/html\/lib\/tpl<\/code><\/pre>\n\n\n\n<p>If you ever get any denied access, be sure to check the audit logs;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>tail -f \/var\/log\/audit\/audit.log | grep -i denied<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Restart Apache<\/h3>\n\n\n\n<p>Check for any syntactical error on Apache configuration file and restart it if no issues.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>httpd -t<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>Syntax OK<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl restart httpd<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Finalize DokuWiki Installation<\/h3>\n\n\n\n<p>To complete the installation of DokuWiki on Rocky Linux, you can now access it from your preferred browser using the URL,&nbsp;<strong><code>http:\/\/server-hostname-OR-IP\/install.php<\/code><\/strong>.<\/p>\n\n\n\n<p>Set the name of the wiki, enable the ACL and other settings and click Save and continue to your DokuWiki welcome page.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/name-acl.png\" class=\"td-modal-image\"><figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1240\" height=\"642\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/name-acl.png\" alt=\"Install DokuWiki on Rocky Linux\" class=\"wp-image-12001\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/name-acl.png?v=1648578948 1240w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/name-acl-768x398.png?v=1648578948 768w\" sizes=\"(max-width: 1240px) 100vw, 1240px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>You can now login to your DokuWiki as the user created while setting up the ACL.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1016\" height=\"595\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/login.png\" alt=\"Install DokuWiki on Rocky Linux\" class=\"wp-image-12003\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/login.png?v=1648579007 1016w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/login-768x450.png?v=1648579007 768w\" sizes=\"(max-width: 1016px) 100vw, 1016px\" \/><\/figure>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/login.png\"><\/a><\/p>\n\n\n\n<p>If you need to make any configurations upon successful authentication, click on the Admin gear icon at the top right corner.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1026\" height=\"626\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/administration-1.png\" alt=\"Install DokuWiki on Rocky Linux\" class=\"wp-image-12004\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/administration-1.png?v=1648579025 1026w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/administration-1-768x469.png?v=1648579025 768w\" sizes=\"(max-width: 1026px) 100vw, 1026px\" \/><\/figure>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/administration-1.png\"><\/a><\/p>\n\n\n\n<p>That is all on how to install DokuWiki on Rocky Linux.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Reference<\/h3>\n\n\n\n<p><a href=\"https:\/\/www.dokuwiki.org\/install\" target=\"_blank\" rel=\"noreferrer noopener\">DokuWiki Installation<\/a><\/p>\n\n\n\n<p>Other Tutorials<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-dokuwiki-on-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install DokuWiki on ubuntu 22.04<\/a><\/p>\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 Rocky Linux server.&nbsp;DokuWiki&nbsp;is an opensource software written in PHP that allows users<\/p>\n","protected":false},"author":3,"featured_media":12006,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121],"tags":[1276,4784,4782,3587,4783],"class_list":["post-2005","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-dokuwiki","tag-dokuwiki-install-rocky-linux","tag-install-dokuwiki-on-rocky-linux","tag-rocky-linux-8","tag-rocky-linux-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\/2005"}],"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=2005"}],"version-history":[{"count":7,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2005\/revisions"}],"predecessor-version":[{"id":20421,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2005\/revisions\/20421"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/12006"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=2005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=2005"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=2005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}