DokuWiki is a free and open-source wiki software that is easy to set up and use. This tutorial will guide you through the installation process of DokuWiki on the Elementary OS.
Before we proceed with the installation, make sure that the following prerequisites are met:
Before installing any new software package, it is always a good practice to update the system to ensure that all the packages are up to date.
Open the terminal and execute the following command:
sudo apt-get update && sudo apt-get upgrade
This command will update the package list and upgrade the existing packages to their latest versions.
DokuWiki requires a web server to function, and Apache is a popular choice. To install Apache on your Elementary OS, run the following command in the terminal:
sudo apt-get install apache2
This command will install the Apache web server on your system.
DokuWiki is written in PHP, so you need to install PHP to run it. To install PHP, use the following command:
sudo apt-get install php libapache2-mod-php php-mbstring php-gd php-xml
This command will install PHP along with some necessary libraries required to run PHP on your Apache server.
Download the latest version of DokuWiki from the official website https://www.dokuwiki.org/DokuWiki. You can use the wget
command to download the file directly from the terminal:
cd /tmp
wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
Extract the downloaded tarball using the following command:
tar -xzf dokuwiki-stable.tgz
It will create a new directory dokuwiki-xxx
(where xxx is the current version number of DokuWiki). Move this directory to the Apache document root directory.
sudo mv dokuwiki-xxx/ /var/www/html/dokuwiki
This command will move the extracted directory to Apache's document root directory.
By default, Apache does not allow you to access the contents of the dokuwiki
directory. To allow access, you need to configure Apache to serve the DokuWiki directory.
Create a new Apache configuration file using a text editor:
sudo nano /etc/apache2/sites-available/dokuwiki.conf
Then, add the following configuration:
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/dokuwiki/
ServerName example.com
ErrorLog ${APACHE_LOG_DIR}/dokuwiki_error.log
CustomLog ${APACHE_LOG_DIR}/dokuwiki_access.log combined
<Directory /var/www/html/dokuwiki/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
This configuration file will set up a virtual host for DokuWiki and allow access to the contents of the dokuwiki
directory. Change the ServerAdmin
and ServerName
to suit your needs.
Enable the virtual host and restart Apache:
sudo a2ensite dokuwiki.conf
sudo systemctl restart apache2
Open your web browser and go to http://localhost/dokuwiki/install.php. This will start the DokuWiki installation wizard.
Follow the instructions on the screen to complete the installation process. When prompted for the data directory, enter /var/www/html/dokuwiki/data
. This directory will store all the data created by DokuWiki.
After completing the installation process, make sure to remove the install.php
file:
sudo rm /var/www/html/dokuwiki/install.php
Congratulations! You have successfully installed DokuWiki on your Elementary OS. You can now start using DokuWiki to create and manage your wikis. If you encounter any issues during the installation process, feel free to consult the official documentation at https://www.dokuwiki.org/DokuWiki.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!