DokuWiki is very simple to use open-source wiki software that doesn’t require a database and it is mainly aimed at creating documentation of any kind.
To install DokuWiki on a virtual server with Debian Wheezy follow the very easy steps described below. The installation instructions should apply to any Debian based server with Nginx and PHP-FPM installed on it.
Make sure your Debian VPS is up-to-date:
apt-get update apt-get upgrade
‘apt-get update’ will refresh your package list so it’s all up to date, then the upgrade will upgrade any packages that have newer versions.
Install Nginx and PHP-FPM using the following command:
apt-get install nginx php5-fpm php5-cli php5-mcrypt php5-gd
Download and unpack the latest version of DokuWiki available at http://download.dokuwiki.org :
cd /root wget http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz -O dokuwiki.tgz tar -xvf dokuwiki.tgz
Create a new Nginx server block. For example, create a new Nginx configuration file to the ‘/etc/nginx/sites-available’ directory:
vi /etc/nginx/sites-available/yourdomain.com
and add the following content:
server { server_name yourdomain.com; listen 80; root /var/www/yourdomain.com/; access_log /var/log/nginx/yourdomain.com-access.log; error_log /var/log/nginx/yourdomain.com-error.log; index index.php index.html doku.php; location ~ /(data|conf|bin|inc)/ { deny all; } location ~ /\.ht { deny all; } location ~ \.php { fastcgi_index index.php; fastcgi_split_path_info ^(.+\.php)(.*)$; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } }
Create a symbolic link using the following command:
ln -s /etc/nginx/sites-available/yourdomain.com /etc/nginx/sites-enabled/yourdomain.com
Restart the Nginx web server for the changes to take effect:
/etc/init.d/nginx restart
Move the DokuWiki installation files to the document root directory defined in the Nginx server block above:
mv /root/dokuwiki-* /var/www/yourdomain.com
The webserver user (www-data) needs to be able to write to ‘data’ , ‘conf’ and ‘lib/plugins/’ directories, so you can easily accomplish that by executing the following command:
chown -R www-data:www-data /var/www/yourdomain.com/
Open http://yourdomain.com/install.php in a web browser. Enter the following information: your site name, username, password and email address for the admin user, then click ‘Save’.
Once the installation is complete, our recommendation is to install ‘captcha’ and ‘preregister’ plug-ins in order to protect the registration against spam bots which create a huge amount useless fake users.
Delete the install script:
rm /var/www/yourdomain.com/install.php
That is it. The DokuWiki installation is now complete.
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 DokuWiki for you. 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.