DokuWiki is an open-source PHP-based wiki software developed by Andreas Gohr. It is very similar to MediaWiki and doesn’t require a database. It offers a simple yet powerful syntax that allows users to create structured texts easily. DokuWiki comes with all the necessary features to create a website along with SEO, authentication, and much more.

This post will show you how to install DokuWiki on Fedora Linux.

Step 1 – Install Apache and PHP

First, install the Apache web server package using the following command.

dnf install httpd -y

Next, add the PHP Remi repository to get the latest PHP version.

dnf install -y http://rpms.remirepo.net/fedora/remi-release-34.rpm
dnf module install php:remi-8.1

Next, install the PHP and other required dependencies using the following command.

dnf install php php-mysqlnd php-fpm php-xml php-cli php-soap php-opcache php-iconv php-pear php-bcmath php-gd php-mbstring php-json php-devel unzip wget -y

Next, start and enable the Apache service with the following command.

systemctl start httpd
systemctl enable httpd

Step 2 – Download DokuWiki

First, download the latest version of DokuWiki using the following command.

wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz

Next, extract the downloaded file to the Apache web root directory.

mkdir /var/www/html/dokuwiki
tar xzf dokuwiki-stable.tgz  --strip-components=1 -C /var/www/html/dokuwiki/

Next, change the ownership of the DokuWiki directory.

chown -R apache:apache /var/www/html/dokuwiki

Step 3 – Create an Apache Virtual Host for DokuWiki

Next, you will need to create an Apache virtual host configuration file.

nano /etc/httpd/conf.d/dokuwiki.conf

Add the following configurations:

<VirtualHost *:80>
        ServerAdmin [email protected]
	ServerName   doku.example.com
	DocumentRoot  /var/www/html/dokuwiki
	<Directory ~ "/var/www/html/dokuwiki/(bin/|conf/|data/|inc/)">
	    <IfModule mod_authz_core.c>
                AllowOverride All
        	Require all denied
	    </IfModule>
	    <IfModule !mod_authz_core.c>
	        Order allow,deny
        	Deny from all
	    </IfModule>
	</Directory>
	ErrorLog   /var/log/httpd/dokuwiki_error.log
	CustomLog  /var/log/httpd/dokuwiki_access.log combined
</VirtualHost>

Save and close the file then copy the .htaccess file.

cp /var/www/html/dokuwiki/.htaccess{.dist,}

Next, restart the Apache service to apply the changes.

systemctl restart httpd

Step 4 – Access DokuWiki

Now, open your web browser and access the DokuWiki web UI using the URL http://doku.example.com/install.php. You will see the following screen.

Provide all required information and click on the Save button. You will see the following screen.

Click on your new DokuWiki. You will see the DokuWiki dashboard on the following screen.

Conclusion

Congratulations! You have successfully installed DokuWiki on Fedora Linux. You can now start creating your own wiki website easily using DokuWiki. Try to host your own wiki site on VPS hosting from Atlantic.Net!