In the following article, we’ll explain how you can install and run DokuWiki on a CentOS 7 server. We support DokuWiki running on all our SSD VPS hosting plans and with our DokuWiki hosting stack, you’ll get DokuWiki pre-loaded on your virtual server, making your wiki up and running in no-time.
Sweet!
What is DokuWiki?
DokuWiki is considered to be the most versatile open source Wiki software application which is proven to meet your demanding wiki needs.
DokuWiki does not require a database and it’s extremely simple and easy to use. Check out DokuWiki features to learn more.
System Requirements?
- Webserver such as Apache, Nginx etc..
- PHP server version 5.2 or later
- PHP-GD / Image Magick library
UPDATE THE SYSTEM
Before proceeding with the actual DokuWiki installation, ssh
to your CentOS 7 SSD VPS, initiate a screen
session and upgrade your system using yum
:
INSTALL SOME PACKAGES
Install some useful packages on your CentOS SSD powered virtual server:
INSTALL APACHE WEBSERVER
In this set-up we are going to serve DokuWiki using the Apache 2.4 webserver, so install Apache on your CentOS 7 using the following yum
command:
Once installed, restart Apache and add it to automatically start on your system start-up using:
Now let’s configure some extra Apache options, for example, hide its version number, its banner etc… by adding the following to /etc/httpd/conf.d/options.conf
Test Apache configuration file and restart the webserver for the changes to take effect:
INSTALL PHP
Since DokuWiki relies on PHP, we have to add PHP support to the Apache webserver by installing the following packages:
Although DokuWiki operates with the default PHP settings, it is recommended to tune your PHP configuration (php.ini
). At least you should edit your /etc/php.ini
and set the following:
restart Apache using systemctl for the changes to take effect:
Test if PHP module is loaded in Apache using:
SET-UP APACHE VHOST
We’ll use wiki.mydomain.com
to access the DokuWiki installation, so we would have to create an Apache Virtual Host directive. So, create /etc/httpd/conf.d/vhosts.conf
and add the following:
This tells Apache, to load the configuration files ending with .conf
which reside in /etc/httpd/vhosts.d
. As you can guess, this is the place where we put the Virtual Hosts, so let’s set-up one for wiki.mydomain.com
VHOST for wiki.mydomain.com
restart apache for the changes to take effect:
INSTALL DOKUWIKI
First thing to do is to go to DokuWiki’s download page and download the latest stable version of DokuWiki.
once the archive is downloaded, extract it to /var/www/html
using:
set-up proper ownership using the chown
command:
and open http://wiki.mydomain.com/install.php
in your favorite browser to initiate the DokuWiki installer. You should get something like this:
once you complete the installer, you can safely remove the install.php
script located withing your DokuWiki document root in /var/www/html/dokuwiki
WHAT IS NEXT?
Now you have your DokuWiki up and running, so you may want to check its manual at https://www.dokuwiki.org/manual and also learn more about its syntax at https://www.dokuwiki.org/wiki:syntax
LET US DO THIS FOR YOU?
Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install Apache and DokuWiki. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.
Great doc!
Hello,
I used these instructions, now I am having permission issues :(
DokuWiki Setup Error
The datadir (‘pages’) at ./data/pages is not found, isn’t accessible or writable. You should check your config and permission settings. Or maybe you want to run the installer?
Please check the file and directory permissions of your DokuWiki installation.