| Applies to | MindTouch 9.02 or later | License | All versions |
|---|---|---|---|
| Operating System | Linux | Documentation Types | Setup |
| MindTouch Certified | |||
Download the MindTouch Core (aka Deki Wiki) from the MindTouch Core source code repository. Unpack the source code in your home directory using the following command:
tar -xzvf deki-09.02.1.tar.gz
The direcotry deki-09.02.1 will be created containing the source code and compiled binaries.
Note: The directory created is hereafter refered to as ${DEKI_SRC_INSTALL_DIR}.
The remainder of this installation guide requires that you be logged in as root.
Create a user account to run the dekiwiki app-server:
addgroup --system dekiwiki adduser --system --home /home/dekiwiki --shell /bin/bash --disabled-login --ingroup dekiwiki dekiwiki
Install the dependencies for MindTouch. The following example lists the dependencies for Ubuntu Linux:
apt-get update
apt-get -y install \
apache2 \
apache2-mpm-prefork \
libapache2-mod-php5 \
imagemagick \
mono-2.0-runtime \
libmono-system-web2.0-cil \
mysql-server \
curl \
php-pear \
php5-curl \
php5-gd \
php5-mysql \
ssl-cert \
html2ps \
html2text \
poppler-utils \
wv \
gs \
tidy \
links \
msttcorefonts \
cabextract \
aspell \
aspell-en
apt-get -y install sysvconfig # Useful, but not technically required.
cd /root
wget http://www.princexml.com/download/prince_6.0r8-1_i386.deb
dpkg -i /root/prince_6.0r8-1_i386.deb
Copy the deki wiki files from the ${DEKI_SRC_INSTALL_DIR} to the apache directory
mkdir /var/www/dekiwiki
cp -rp ${DEKI_SRC_INSTALL_DIR}/web/* /var/www/dekiwiki/
chown dekiwiki:dekiwiki /var/www/dekiwiki/bin/cache
chown dekiwiki:dekiwiki /var/www/dekiwiki/attachments
chown www-data:www-data /var/www/dekiwiki/skins/common/cache
chmod 777 /var/www/dekiwiki/config # Note: Temporary, only for installatio
MindTouch depends on several apache modules. Run the following command to load them automatically:
a2enmod rewrite a2enmod proxy a2enmod proxy_http
Copy deki-apache.conf file to the apache configuration directory.
cp ${DEKI_SRC_INSTALL_DIR}/config/deki-apache.conf /etc/apache2/sites-available/dekiwiki
Next, edit /etc/apache2/sites-available/dekiwiki and set the 'ServerName' and 'ServerAlias' values at the top to appropriate values (if needed):
<VirtualHost *> #ServerName #ServerAlias ErrorLog /var/log/apache2/error-dekiwiki.log CustomLog /var/log/apache2/access-dekiwiki.log common ...
Disable the default apache virtual host and add the deki wiki virtual host:
a2dissite default a2ensite dekiwiki
Visit your MindTouch site and enter the appropriate data. The Web Based installer will prompt your for some configuration data, creates a new MySQL database instance, assign your site an API KEY and create some configuration files.
You will need to install the configuration files in the correct places (listed at the bottom of the web installer):
mkdir /etc/dekiwiki cp /var/www/dekiwiki/config/mindtouch.deki.startup.xml /etc/dekiwiki cp /var/www/dekiwiki/config/mindtouch.host.conf /etc/dekiwiki cp /var/www/dekiwiki/config/LocalSettings.php /var/www/dekiwiki chown www-data:www-data /etc/dekiwiki/mindtouch.host.conf chown dekiwiki:dekiwiki /etc/dekiwiki/mindtouch.deki.startup.xml chmod 640 /etc/dekiwiki/* chown 400 /var/www/dekiwiki/LocalSettings.php chmod 400 /var/www/dekiwiki/config
Create /etc/init.d/dekiwiki
#!/bin/bash
prog="MindTouch Deki Host Service"
PATH=/bin:/sbin:/usr/bin:/usr/sbin
DEKIHOST_CONF="/etc/dekiwiki/mindtouch.host.conf"
DEKIWIKI_USER="dekiwiki"
if [ ! -f $DEKIHOST_CONF ]; then
echo "$DEKIHOST_CONF does not exist"
exit 1
fi
. $DEKIHOST_CONF
# set default values if not specified in $DEKIHOST_CONF
if [ ! -f "$MONO" ]; then
echo "Please specify the full path to your mono binary"
exit 1
fi
if [ ! -d "$BIN_DIR" ]; then
echo "Please specify the path to your DekiWiki bin directory"
exit 1
fi
if [ -z "$APIKEY" ]; then
echo "Please specify your APIKEY"
exit 1
fi
if [ -z "$PATH_PREFIX" ]; then
PATH_PREFIX="@api"
fi
if [ -z "$HTTP_PORT" ]; then
HTTP_PORT="8081"
fi
if [ -z "$IP" ]; then
IP="localhost"
fi
if [ -z "$HOST_EXE" ]; then
HOST_EXE="$BIN_DIR/mindtouch.host.exe"
fi
if [ -z "$SCRIPT" ]; then
SCRIPT="/etc/dekiwiki/mindtouch.deki.startup.xml"
fi
if [ -z "$NOTTY" ]; then
NOTTY="notty"
fi
if [ -z "$CONNECT_LIMIT" ]; then
CONNECT_LIMIT="-5"
fi
if [ -z "$LOGDIR" ]; then
LOGDIR="/var/www/dekiwiki"
fi
if [ -z "$LOGFILE" ]; then
LOGFILE="$LOGDIR/deki-api.log"
fi
pidof_dekiwiki() {
# we grep on assembly name and port in case multiple mono processes are running
echo $(ps -U $DEKIWIKI_USER -o pid,cmd | grep mindtouch.host.exe | grep $HTTP_PORT |awk '{print $1}')
}
stop() {
PID=$(pidof_dekiwiki)
echo -n "Stopping MindTouch Deki API: mindtouch.host.exe"
if [ -z "$PID" ]; then
echo
echo "dekiwiki is not running"
else
# attempt to shut down gracefully using curl
curl -m 10 -s -d "" "http://$IP:$HTTP_PORT/host/?apikey=$APIKEY&dream.in.verb=DELETE"
sleep 3
# if the host didn't shut down properly then kill it
PID=$(pidof_dekiwiki)
if [ -n "$PID" ]; then
kill $PID
fi
echo .
fi
}
start() {
if [ ! -d $LOGDIR ]; then
mkdir $LOGDIR
chown $DEKIWIKI_USER $LOGDIR
fi
PID=$(pidof_dekiwiki)
if [ -n "$PID" ]; then
echo "dekiwiki is already running: $PID"
exit 1;
fi
# see if the process is already running
MONO_ARGS="$HOST_EXE apikey $APIKEY script $SCRIPT path-prefix $PATH_PREFIX http-port $HTTP_PORT ip $IP connect-limit $CONNECT_LIMIT $NOTTY"
echo -n "Starting MindTouch Deki API: mindtouch.host.exe"
start-stop-daemon --start --quiet --chuid $DEKIWIKI_USER --exec $MONO -- $MONO_ARGS 2>&1 >> $LOGFILE &
echo .
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
PID=$(pidof_dekiwiki)
if [ -n "$PID" ]; then
echo "dekiwiki is running: $PID"
else
echo "dekiwiki is stopped"
fi
;;
restart|force-reload)
stop
start
;;
force-reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|force-reload|restart|status}"
exit 1
esac
exit 0
Make the /etc/init.d/dekiwiki script executable:
chmod 755 /etc/init.d/dekiwiki
Configure dekiwiki to start at boot time. The most user friendly way to do this is to use the sysvconfig program. Run sysvconfig, press ENTER on "Enable/Disable", press the DOWN ARROW to find the "dekiwiki" entery and press the SPACE BAR to select it (an asterisk next to its name means it's selected). Next press ENTER to return to the menu.
Press the DOWN ARROW to highlight "Finished", press ENTER to save your changes, press ENTER a second time to return to the menu. Lastly press the DOWN ARROW to highlight "Quit" and press ENTER to exit.
See the how to at http://wiki.developer.mindtouch.com/...ell-checker%3f
aspell. On Ubuntu Linux the aspell dictionaries are bundled as separate packages, so install both aspell and the dictionary for your language:
apt-get install aspell aspell-en
userconfig.js file chown www-data:www-data /var/www/dekiwiki/editor/fckeditor/editor
Configure Deki Wiki to use aspell. Visit "Control Panel" --> "Configuration of FCKeditor" and make the following changes
FCKConfig.ToolbarSets["Default"] = [
['MindTouchDeki_Save','-','Source'],
['RemoveFormat','-','TextColor','BGColor'],
['MindTouchDeki_InsertExtension','-','MindTouchDeki_Transform'],
'/',
['MindTouchDeki_Cancel'],
['Bold','Italic','Underline','StrikeThrough','-','OrderedList','UnorderedList','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','Outdent','Indent','Blockquote'],
['MindTouchDeki_InsertLink','MindTouchDeki_InsertImage','MindTouchDeki_InsertVideo','MindTouchDeki_InsertTemplate','Table'],
'/',
['Style','FontFormat','FontName','FontSize','SpellCheck']
] ;
FCKConfig.SpellChecker = 'SpellerPages' ;
spellchecker.php file has a path to aspell for Windows enabled. Edit spellchecker.php and comment out the aspell path for Windows and uncomment the aspell path for Linux.vi /var/www/dekiwiki/editor/fckeditor/core/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php
/etc/dekiwiki/mindtouch.deki.startup.xml file<princexml-path>/usr/local/bin/prince</princexml-path>
mkdir /var/www/dekiwiki/bin/cache mkdir /var/www/dekiwiki/bin/cache/luceneindex mkdir /var/www/dekiwiki/bin/cache/luceneindex/default chown -R www-data:www-data /var/www/dekiwiki/bin/cache
/var/www/dekiwiki/skins/common/prince.content.css file to avoid a TrueType font problem@font-face {
font-family: sans-serif;
src: url("/skins/fonts/gentium-basic/GenBkBasR.ttf");
}
@font-face {
font-family: serif;
src: url("/skins/fonts/gentium-basic/GenBkBasR.ttf");
}
@font-face {
font-family: monospace;
src: url("/skins/fonts/gentium-basic/GenBkBasR.ttf");
}
MindTouch requires write access to a number of directories:
| PATH | REQUIREMENT | SYMPTOM IF NOT SET |
${DEKI_ROOT}/skins/common/cache | writeable by the apache user (via PHP scripts | Customized CSS files won't be processed |
|
| writeable by the deki wiki server user (dekiwiki by default under Ubuntu_Linux) | Error message when the index is cleared in the control pannel |
${DEKI_ROOT}/attachments/ | writeable by the deki wiki server user (dekiwiki by default under Ubuntu_Linux) | Attachments cannot be uploaded |
${DEKI_ROOT}/config/ | No need for any read access by any apache or Deki Wiki user. Can be safely deleted after configuration. | Possible security vulnerability if accessible (access to MySQL host IP address, user name and password). |
${DEKI_ROOT}/bin/filters/ |
chmod a+x *txt chmod a+x *text chmod a+x *Text | Tags may not work if the index fails |
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Should this be "www-data" or "dekiwiki"? Or it doesn´t matter. Thx.
apt-get install mono-2.0-devel
apt-get install libmono-i18n2.0-cil
The first replaces mono-2.0-runtime (and adds developer tools), the second solves the exception. More on the exception:
http://forums.developer.mindtouch.com/showthread.php?&p=15237#post15237