About the VM

The Deki VM is built on the strength and stability of the Debian GNU/Linux distribution. As well as being a hugely successful distribution in its own right, Debian is the base for the popular Ubuntu operating system.

Determining the path to your Deki installation

Deki is normally installed in /var/www/dekiwiki.  This guide will refer to that location in its examples.  If you have a Hayes virtual machine, your wiki will be installed in /var/www/deki-hayes, and you should substitute that path.

User accounts and access

By default, the Deki VM has only the administrator account, named root.  The password is password. You should change this password immediately.

The only way to access the shell is via the VMware console.  You may wish to enable remote access by SSH, so you can have multiple connections open at once.

Some basic Linux commands

Set the user password

passwd

Add a new user

adduser

You can grant users the right to run commands as root using sudo.

Change directory

cd /var/www/dekiwiki

Show directory contents

ls

Edit a file

nano filename

Hit Ctrl-X to exit, and then Y to save.

Experienced Linux users will be pleased to know that vi is also installed.  Emacs fans, can type apt-get install emacs.  To change the default editor enter update-alternatives -config editor.

Useful commands for Deki

Restart the Apache web server

If you change the configuration of the web server, you can reload the configuration

/etc/init.d/apache2 reload

If you add a module (such as enabling NTLM authentication), you need to restart the service:

/etc/init.d/apache2 restart

Restart the Deki API

After making changes to the configuration for the Deki API, you must restart it.

/etc/init.d/dekiwiki restart

Configuration files

/var/www/dekiwiki/LocalSettings.php

When you first browse to your wiki, you are redirected to http://wiki/config/, and asked to run through a setup wizard.  This wizard writes a file called LocalSettings.php to your Deki directory, which is the control file for the web application. 

It contains

  • the API key used to authorize connections to the API
  • the credentials for the database connection.

Default config settings for the web application are kept in /var/www/dekiwiki/includes/DefaultSettings.php.  If you want to change any of them, copy them to LocalSettings.php and edit them there, so future upgrades do not change your customizations.

/etc/dekiwiki/mindtouch.deki.startup.xml

This file is the script that controls the behavior of the Deki API. One instance of the API can serve more than one wiki, but only one is set up by default in the VM.

It contains:

  • the API key (which has to match the key in LocalSettings.php)
  • paths to the libraries used for image processing
  • wiki database information
  • information on which file types can be indexed for search

/var/www/dekiwiki/bin/mindtouch.host.exe.config

This is a control file for the Deki API.  It is usually only touched to enable debug logging.

Look for <level value="WARN"> and change to <level value="DEBUG">.

/etc/dekiwiki/mindtouch.host.conf

This file contains information on how to start the Deki API, such the path to the Mono C# runtime, mindtouch.host.exe, the path to the mindtouch.deki.startup.xml file, and the IP and port to listen on.

Log files

The logs are rotated every day, and 30 days of logs are kept. 

  • For yesterday's log, append .1 to any of the filenames. 
  • A good viewer for log files is the less command.  To install it: apt-get install less.
    (Why is it called less?  It's like 'more' on DOS. It's a nerd joke - less is more, more or less.)
  • To view a log with a .gz extension, use zless.
  • It's sometimes helpful to watch a log while you're making changes.  You can have a log automatically update new lines using the tail -f command.

/var/log/apache2/access.log

Each page requested from the web site is logged here.  It contains the page requested, the IP the request came from, any authentication information used, and the result given.

/var/log/apache2/error.log

Any Apache errors are logged here.  If you see a 500 error when hitting your wiki, check this file to see why.

/var/log/dekiwiki/deki-api.log

This log contains the output of the Deki API.  By default, it will show you stops, starts and any warning or error.  You can increase the verbosity of this log by editing /var/www/dekiwiki/bin/mindtouch.host.exe.config.

/var/log/dekiwiki/checkdeki.log

By default, every 5 minutes, a script runs to check the wiki and API are reachable. It logs its result here.  If you wish, you can edit /usr/bin/checkdeki to include an e-mail address for errors to be sent to.

Tag page
You must login to post a comment.