{"id":4948,"date":"2020-01-21T22:46:32","date_gmt":"2020-01-21T19:46:32","guid":{"rendered":"https:\/\/kifarunix.com\/?p=4948"},"modified":"2024-03-13T07:44:38","modified_gmt":"2024-03-13T04:44:38","slug":"install-dokuwiki-on-centos-8","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-dokuwiki-on-centos-8\/","title":{"rendered":"Install DokuWiki on CentOS 8"},"content":{"rendered":"\n<p>In this demo, we are going to learn how to install DokuWiki on CentOS 8 server. <a rel=\"noreferrer noopener\" aria-label=\"Dokuwiki (opens in a new tab)\" href=\"https:\/\/www.dokuwiki.org\/\" target=\"_blank\">DokuWiki<\/a> 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 <a rel=\"noreferrer noopener\" aria-label=\"Dokuwiki features page (opens in a new tab)\" 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 CentOS 8<\/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. These can be installed by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><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-preformatted\"><code>dnf info httpd<\/code><\/pre>\n\n\n\n<pre class=scroll-box>\nInstalled Packages\nName         : httpd\nVersion      : 2.4.37\nRelease      : 16.module_el8.1.0+256+ae790463\nArchitecture : x86_64\nSize         : 5.4 M\nSource       : httpd-2.4.37-16.module_el8.1.0+256+ae790463.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-preformatted\"><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-preformatted\"><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-preformatted\"><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 <a rel=\"noreferrer noopener\" aria-label=\"Dokuwiki download&#039;s page (opens in a new tab)\" href=\"https:\/\/download.dokuwiki.org\/\" target=\"_blank\">DokuWiki download&#8217;s page<\/a> 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-preformatted\"><code>dnf install wget<\/code><\/pre>\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<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 <code>\/var\/www\/html<\/code> in this demo.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install tar<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><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 <code>\/var\/www\/html\/<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ls \/var\/www\/html\/\nbin  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>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<\/code><\/pre>\n\n\n\n<p>Save and quit the configuration file.<\/p>\n\n\n\n<p>Note that the line, <strong><code>AllowOverride All<\/code><\/strong>, turns on the use of <strong><code>htaccess<\/code><\/strong> 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-preformatted\"><code>cp \/var\/www\/html\/.htaccess{.dist,}<\/code><\/pre>\n\n\n\n<p>Set the ownership of the DokuWiki web root directory to <code>apache<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><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-preformatted\"><code>dnf install policycoreutils-python-utils<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>semanage fcontext -a -t httpd_sys_rw_content_t \"\/var\/www\/html\/conf(\/.*)?\"<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>restorecon -Rv \/var\/www\/html\/conf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>restorecon -Rv \/var\/www\/html\/data<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>setsebool -P httpd_can_network_connect on<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>setsebool -P httpd_can_sendmail on<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><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-preformatted\"><code><strong>httpd -t<\/strong>\nSyntax 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 CentOS 8, you can now access it from your preferred browser using the URL, <strong><code>http:\/\/server-hostname-OR-IP\/install.php<\/code><\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><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 CentOS 8\" 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>\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<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"773\" height=\"650\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/welcome-page.png\" alt=\"\" class=\"wp-image-12002\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/welcome-page.png?v=1648578989 773w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/welcome-page-768x646.png?v=1648578989 768w\" sizes=\"(max-width: 773px) 100vw, 773px\" \/><\/figure><\/div>\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 size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1016\" height=\"595\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/login.png\" alt=\"\" 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>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 size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1026\" height=\"626\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/administration-1.png\" alt=\"\" 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<h3 class=\"wp-block-heading\">Reference<\/h3>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\"DokuWiki Installation (opens in a new tab)\" href=\"https:\/\/www.dokuwiki.org\/install\" target=\"_blank\">DokuWiki Installation<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Other Tutorials<\/h2>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/setup-ldap-self-service-password-tool-on-centos-8\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Setup LDAP Self Service Password Tool on CentOS 8<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/configure-sssd-for-openldap-authentication-on-ubuntu-18-04\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Configure SSSD for OpenLDAP Authentication on Ubuntu 18.04<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-phpldapadmin-on-centos-8\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install phpLDAPadmin on CentOS 8<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-google-chrome-browser-on-centos-8\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install Google Chrome Browser on CentOS 8<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/implement-openldap-password-policies\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Implement OpenLDAP Password Policies<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this demo, we are going to learn how to install DokuWiki on CentOS 8 server. DokuWiki is an opensource software written in PHP that<\/p>\n","protected":false},"author":1,"featured_media":12006,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,1275],"tags":[1276,1277,1278],"class_list":["post-4948","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-wiki","tag-dokuwiki","tag-dokuwiki-centos-8","tag-install-dokuwiki-on-centos-8","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\/4948"}],"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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=4948"}],"version-history":[{"count":10,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4948\/revisions"}],"predecessor-version":[{"id":21296,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4948\/revisions\/21296"}],"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=4948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=4948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=4948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}