In this post, you will learn how to install DokuWiki on Ubuntu 22.04
DokuWiki is a user-friendly and flexible wiki software that is coded in PHP. It is a free and open-source software and does not use a database software like MariaDB or etc but instead saves data in a simple file format. This tool offers many features that allow easy scalability and optimization of your wiki site. It comes with a web-interface allowing you complete customization of your websites.
Requirements:
- 1-2GB or more RAM (The more the better performance)
- 1vCore or more CPU
- 5-10GB of Disk
- Ubuntu 22.04
Step 1: Update the server
First step is to update your server and look for newer packages and security releases for your distribution :
apt-get update -y
apt-get upgrade -y
Step 2: Install PHP
We will be needing Apache2 and some PHP libraries to continue the installation of our Wiki :
apt-get install apache2 php php-gd php-xml php-json -y
systemctl start apache2
systemctl enable apache2
Step 3: Install DokuWiki on Ubuntu:
This tools requires only PHP libraries to install now we can move on to installing the Wiki :
wget https://download.dokuwiki.org/out/dokuwiki-a6b3119b5d16cfdee29a855275c5759f.tgz
mkdir /var/www/html/doku
tar -xvzf dokuwiki-a6b3119b5d16cfdee29a855275c5759f.tgz -C /var/www/html/
cp /var/www/html/dokuwiki/.htaccess{.dist,}
Set the permissions :
chown -R www-data:www-data /var/www/html/dokuwiki
Create an apache2 host file :
nano /etc/apache2/sites-available/doku.conf
<VirtualHost *:80>
ServerName blog.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/apache2/dokuwiki_error.log
CustomLog /var/log/apache2/dokuwiki_access.log combined
</VirtualHost>
Save the changes and reload apache2 :
a2ensite doku.conf
systemctl reload apache2
Open your site at your domain name :
2.
Conclusion :
You have installed Doku Wiki on your Ubuntu 22.04 Machine! This tutorial assumes you are root!