×


Install Dokuwiki on Ubuntu 20.04 LTS

Install Dokuwiki on Ubuntu 20.04 LTS

DokuWiki is considered to be the most versatile open-source Wiki software application which is proven to meet your demanding wiki needs. Using a very familiar interface, allows you to easily scale and optimize using many advanced features. Utilizing files instead of a database, DokuWiki is extremely flexible with the type of system it will run on (no database server required).

Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related Open-source Software Installation queries.

In this context, we shall look into how to install Dokuwiki on Ubuntu 20.04 LTS.


Steps to Install Dokuwiki on Ubuntu 20.04 LTS Focal Fossa

1.  Perform System Update

First, make sure that all your system packages are up-to-date by running the following apt commands in the terminal:

$ sudo apt update
$ sudo apt upgrade


2. Install  LAMP stack

If you do not have LAMP installed, you can follow our guide here.


3. Install Dokuwiki on the system

Now we download the latest version of DokuWiki using the following command:

$ cd /var/www/html
$ wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz

Unpack the Dokuwiki archive to the document root directory on your server:

$ tar -xvzf dokuwiki-stable.tgz
$ mv dokuwiki-2020-07-29 dokuwiki

We will need to change some folders permissions:

$ chown -R www-data:www-data /var/www/html/dokuwiki
$ chmod -R 775 /var/www/html/dokuwiki


4. Configure Apache webserver

Create a new virtual host directive in Apache. For example, create a new Apache configuration file named 'dokuwiki.conf' on your virtual server:

$ touch /etc/apache2/sites-available/dokuwiki.conf
$ ln -s /etc/apache2/sites-available/dokuwiki.conf /etc/apache2/sites-enabled/dokuwiki.conf
$ nano /etc/apache2/sites-available/dokuwiki.conf

Add the following lines:

<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/html/dokuwiki/
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory /var/www/html/dokuwiki/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common
</VirtualHost>

Now, we can restart the Apache webserver so that the changes take place:

$ sudo a2enmod rewrite
$ sudo a2ensite dokuwiki.conf
$ sudo systemctl restart apache2


5. Set up HTTPS

We should enable a secure HTTPS connection on Nextcloud. We can obtain a free TLS certificate from Let’s Encrypt. Install Let’s Encrypt client (certbot) from Ubuntu 20.04 repository:

$ sudo apt install certbot python3-certbot-apache

Next, run the following command to obtain a free TLS certificate using the Apache plugin:

$ sudo certbot --apache --agree-tos --redirect --staple-ocsp --email you@example.com -d example.com

If the test is successful, reload Apache for the change to take effect:

$ sudo apache2ctl -t
$ sudo systemctl reload apache2


How to Access DokuWiki Web Interface ?

DokuWiki will be available on HTTP port 80 by default. 

Open your favorite browser and navigate to http://your-domain.com/install.php or http://server-ip-address/install.php and complete the required steps to finish the installation. 

If you are using a firewall, please open port 80 to enable access to the control panel.


[Need help in installing any Software on your Linux system ? We can help you. ]


Conclusion

This article covers the process of installing Dokuwiki on your Ubuntu 20.04 LTS Focal Fossa system. In fact, DokuWiki is an open source wiki program written in PHP that doesn't require a database. It stores data in text files.


Search by typing a one letter Word Term Here