Disclaimer: This page is intended for a Solaris-savvy (geeky) audience. ;)
IMPORTANT NOTICE
This guide provides steps for installing Deki Wiki Itasca from source code to Sun SPARC Solaris box. There may be hurdles to install Deki Wiki on Solaris, but may passible if you sucess. Best of luck to you .
Install the Solaris 8 Operating Environment.
Following installation condition are shown as referencs, which installed to testing environment.
Software media
Solaris 8 H/W 7/03 CD-ROM
Machine
Solaris Operating Environment
Follow to next instruction to use the Blastware.org.
http://www.blastwave.org/howto_S8.html
All Steps (Step 0 to Step 7 and in red frame security concerns) in this document needed, and processed without problem.
Main task list is here:
Create /.bash_profile file to build the Deki Wiki world.
# cat /.bash_profile export PATH=/opt/csw/bin:/opt/csw/gcc3/bin:/opt/csw/mysql5/bin:/opt/csw/php5/bin:\ /usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ucb:/usr/ccs/bin export LD_LIBRARY_PATH=/opt/csw/lib:/opt/csw/mysql5/lib:/opt/csw/php5/lib:/usr/lib export MAN_PATH=/opt/csw/man:/usr/man export PAGER=/opt/csw/bin/less export LDFLAGS="-L/opt/csw/lib" export CPPFLAGS="-I/opt/csw/include -I/usr/include" export XFILESEARCHPATH=/opt/csw/lib/X11/%T/%N%C:/usr/openwin/lib/X11/%T/%N%C alias make=gmake alias as=gas
Afer this point I use /bin/bash as command line interpreter.
bash -login
(OPTIONAL)
Create $HOME/.wgetrc to specify wget defaults. For example put proxy definition on corporate network.
# cat /.wgetrc http_proxy=http://proxy.mydomain.com:8080 ftp_proxy=http://proxy.mydomain.com:8080
NOTE:
# pkg-get -i less # pkg-get -i curl # pkg-get -i binutils # pkg-get -i bison # pkg-get -i flex # pkg-get -i gawk # pkg-get -i gmake # pkg-get -i gsed # pkg-get -i gtar # pkg-get -i gcc3 # pkg-get -i ggrep # pkg-get -i glib # pkg-get -i glib2 # pkg-get -i gtk # pkg-get -i pkgconfig
The Mono daily package can obtain from the Mono-Project site.
You should build the Mono from source code as new as possible because 1.2.6-release of Mono doe's not work with Deki Wiki.
There are two pages to get the Mono sources, but according to my experience,
the forefront of (1)"Mono Daily Packages" obtain easy success,
but in the latter case (2)"Mono trunk Sources" I failed by core dumped error.
So that I recommend that you should be select (1)"Mono Daily Packages" expect as otherwise your need.
(1)Mono Daily Packages
http://mono.ximian.com/daily/
(2)Mono trunk Sources
http://mono.ximian.com/monobuild/snapshot/sources-trunk/
NOTE: There are helpful information to build the Mono from source.
Jonel Rienton's Blog > Solaris 10 x86 and Mono (4/01/2006)
http://blogs.rientongroup.com/jonel/2005/04/solaris-10-x86-and-mono.aspx
Extract Mono from archive, and run confgure on your working directory.
Please replace the Mono archive name with the latest name.
# cd / # wget http://mono.ximian.com/daily/mono-20080223.tar.bz2 # bzip2 -d < mono-20080223.tar.bz2 | gtar xf - # cd mono-20080223/ # MAKE=gmake AR=gar RANLIB=granlib STRIP=gstrip AS=gas CC=/opt/csw/gcc3/bin/gcc CFLAGS="-g -O2" \ ./configure --prefix=/opt/csw \ --with-tls=pthread --with-includes=/opt/csw/include/ --with-libs=/opt/csw/lib/ (snip) mcs source: $(top_srcdir)/mcs olive source: GC: included TLS: pthread SIGALTSTACK: yes Engine: Building and using the JIT 2.0 Beta: yes 2.1 Alpha: yes JNI support: IKVM Native libgdiplus: assumed to be installed zlib: system zlib oprofile: no
Then make the Mono at the top of source tree.
This task take an hour, so you can take a coffee or cup of tea :)
# gmake (snip) sed -e 's,@''bindir@,/opt/csw/bin,g' -e 's,@''plat_bindir@,/opt/csw/bin,g' -e 's,@' 'mono_instdir@,/opt/csw/lib/mono,g' -e 's,@''gtkdir@,,g' -e 's,@''mono_interp@,mono --debug,g' -e 's,@''framework_version@,2.0,g' -e 's,@''exe_name@,nunit-console,g' . /script.in > nunit-console2.tmp mv nunit-console2.tmp nunit-console2 gmake[2]: Leaving directory `/mono-20080223/scripts' Making all in man gmake[2]: Entering directory `/mono-20080223/man' gmake[2]: Nothing to be done for `all'. gmake[2]: Leaving directory `/mono-20080223/man' Making all in samples gmake[2]: Entering directory `/mono-20080223/samples' gmake[2]: Nothing to be done for `all'. gmake[2]: Leaving directory `/mono-20080223/samples' Making all in web gmake[2]: Entering directory `/mono-20080223/web' gmake[2]: Nothing to be done for `all'. gmake[2]: Leaving directory `/mono-20080223/web' Making all in msvc gmake[2]: Entering directory `/mono-20080223/msvc' gmake[2]: Nothing to be done for `all'. gmake[2]: Leaving directory `/mono-20080223/msvc' gmake[2]: Entering directory `/mono-20080223' gmake[2]: Leaving directory `/mono-20080223' gmake[1]: Leaving directory `/mono-20080223'
NOTE:
Then run self tests.
# gmake CC=gcc check (snip) Testing finalizer-abort.exe... Abort - core dumped failed 34304 (134) signal (0). Testing finalizer-exception.exe... Abort - core dumped failed 34304 (134) signal (0). Testing finalizer-exit.exe... pass. (snip) Testing invalid-token.exe... pass. 231 test(s) passed. 2 test(s) did not pass. Failed tests: finalizer-abort.exe finalizer-exception.exe gmake[4]: *** [testjit-default] Error 1 gmake[4]: Leaving directory `/mono-20080223/mono/tests' gmake[3]: *** [check-am] Error 2 gmake[3]: Leaving directory `/mono-20080223/mono/tests' gmake[2]: *** [check-recursive] Error 1 gmake[2]: Leaving directory `/mono-20080223/mono/tests' gmake[1]: *** [check-recursive] Error 1 gmake[1]: Leaving directory `/mono-20080223/mono' gmake: *** [check-recursive] Error 1 #
OOPS ! As shown above, self tests was NOT success, but I can't fix it. :(
So that, go ahead !
Install Mono into your Solaris box.
# gmake install # . /.bash_profile # ldd /opt/csw/bin/mono libgthread-2.0.so.0 => /opt/csw/lib/libgthread-2.0.so.0 libthread.so.1 => /usr/lib/libthread.so.1 libglib-2.0.so.0 => /opt/csw/lib/libglib-2.0.so.0 libintl.so.3 => /opt/csw/lib/libintl.so.3 libiconv.so.2 => /opt/csw/lib/libiconv.so.2 libc.so.1 => /usr/lib/libc.so.1 librt.so.1 => /usr/lib/librt.so.1 libdl.so.1 => /usr/lib/libdl.so.1 libsocket.so.1 => /usr/lib/libsocket.so.1 libnsl.so.1 => /usr/lib/libnsl.so.1 libxnet.so.1 => /usr/lib/libxnet.so.1 libpthread.so.1 => /usr/lib/libpthread.so.1 libm.so.1 => /usr/lib/libm.so.1 libsunmath.so.1 => /opt/csw/lib/libsunmath.so.1 libaio.so.1 => /usr/lib/libaio.so.1 libmp.so.2 => /usr/lib/libmp.so.2 /usr/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1 # /opt/csw/bin/mono -V Mono JIT compiler version 20080223 (tarball) Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com TLS: normal GC: Included Boehm (with typed GC) SIGSEGV: normal Notification: Thread + polling Architecture: sparc Disabled: none # /opt/csw/bin/gmcs --version Mono C# compiler version 2008.223.0.0 # cd /
pkg-get -i libexif pkg-get -i libungif cd / wget http://go-mono.com/sources/libgdiplus/libgdiplus-1.2.6.tar.bz2 bzip2 -d < libgdiplus-1.2.6.tar.bz2 | gtar xf - cd libgdiplus-1.2.6/ GREP=ggrep MAKE=gmake AR=gar RANLIB=granlib STRIP=gstrip AS=gas CC=/opt/csw/gcc3/bin/gcc \ ./configure --prefix=/opt/csw --with-includes=/opt/csw/include/ --with-libs=/opt/csw/lib/ gmake gmake install
I use mysql5-5.0.51 package.
# pkg-get -i mysql5
Following packages ware installed:
First time installation I use quick_start-csw command to create initial database.
# /opt/csw/mysql5/share/mysql/quick_start-csw This is the blastwave quick start script to setup a MySQL5 database directory. The base directory is /opt/csw/mysql5. The default database directory is /opt/csw/mysql5/var. If you have not setup a partition for the database and you want one; now is a good time to exit this script and create and mount the partition. If you have not setup a my.cnf file and you do not want one of the sample files; now is a good time to exit and create the file /opt/csw/mysql5/my.cnf. Data directory: The default is /opt/csw/mysql5/var. Accept the default or enter a directory [?,q] my.cnf pathname: The default is either to use the supplied file in the base directory or to create one in the base directory from the small memory footprint sample. If your enter a pathname, it will be used to create the options file in the base directory. Accept the default or enter a pathname [?,q] Using /opt/csw/mysql5/share/mysql/my-small.cnf to create the options file. data directory is /opt/csw/mysql5/var Continue with installation or quit [y,n,?,q] Setting up the database Creating MySQL core database in /opt/csw/mysql5/var ### The following messages are from mysql_install_db. /opt/csw/mysql5/bin/mysql_install_db: !: not found /opt/csw/mysql5/bin/mysql_install_db: !: not found Installing MySQL system tables... OK Filling help tables... OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /opt/csw/mysql5/bin/mysqladmin -u root password 'new-password' /opt/csw/mysql5/bin/mysqladmin -u root -h localhost password 'new-password' Alternatively you can run: /opt/csw/mysql5/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. You can start the MySQL daemon with: cd /opt/csw/mysql5 ; /opt/csw/mysql5/bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd mysql-test ; perl mysql-test-run.pl Please report any problems with the /opt/csw/mysql5/bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at http://shop.mysql.com ### The following messages are from quick_start-csw. See /opt/csw/mysql5/share/mysql/doc/README.CSW for packaging changes. Please ignore references to starting mysqld_safe in the messages above. These messages are from mysql_install_db. See the following for starting CSWmysql5. To start mysqld; run `/etc/init.d/cswmysql start` on Solaris 9 or earlier
Start MySQL daemon.
# /etc/init.d/cswmysql5 start Starting mysqld: [ OK ] Starting mysqld daemon with databases from /opt/csw/mysql5/var
(OPTIONAL but RECOMMENDED)
Change the "MySQL root" user password if you need.
/opt/csw/mysql5/bin/mysqladmin -u root password new-password
# pkg-get -i apache2
Following packages ware installed:
# pkg-get -i ap2_modphp5
Following package ware installed:
# pkg-get -i php5_gd # pkg-get -i php5_curl # pkg-get -i php5_mysql # pkg-get -i php5_mcrypt # pkg-get -i php5_mhash
Following package ware installed:
Install PEAR and DekiWiki required modules
# pear config-set http_proxy http://proxy.mydomain.com:8080 config-set succeeded # pear channel-update pear.php.net Updating channel "pear.php.net" Update of Channel "pear.php.net" succeeded # cd /tmp # wget http://pear.php.net/go-pear.phar # /opt/csw/php5/bin/php go-pear.phar Below is a suggested file layout for your new PEAR installation. To change individual locations, type the number in front of the directory. Type 'all' to change all of them or simply press Enter to accept these locations. 1. Installation base ($prefix) : /opt/csw/php5 2. Temporary directory for processing : /tmp/pear/install 3. Temporary directory for downloads : /tmp/pear/install 4. Binaries directory : /opt/csw/php5/bin 5. PHP code directory ($php_dir) : /opt/csw/php5/lib/php 6. Documentation directory : /opt/csw/php5/docs 7. Data directory : /opt/csw/php5/data 8. User-modifiable configuration files directory : /opt/csw/php5/cfg 9. Public Web Files directory : /opt/csw/php5/www 10. Tests directory : /opt/csw/php5/tests 11. Name of configuration file : /opt/csw/php5/etc/pear.conf 1-11, 'all' or Enter to continue: (hit a [Return] key) (snip) # pear install XML_RPC # pear install Cache_Lite # pear list Installed packages, channel pear.php.net: ========================================= Package Version State Archive_Tar 1.3.2 stable Cache_Lite 1.7.2 stable Console_Getopt 1.2.3 stable PEAR 1.7.1 stable Structures_Graph 1.0.2 stable XML_RPC 1.5.1 stable
(OPTIONAL but RECOMMENDED)
Update your PHP error reporting level to show all errors, except for notices and coding standards warnings
# cp -pi /opt/csw/php5/lib/php.ini /opt/csw/php5/lib/php.ini.orig # vi /opt/csw/php5/lib/php.ini edit as follows from: error_reporting = E_ALL allow_call_time_pass_reference = Off to: error_reporting = E_ALL & ~E_NOTICE allow_call_time_pass_reference = On
The ImageMagick - Image Manipulation Tool - required for Deki Wiki to create thumbnail of pucture.
# pkg-get -i imagemagick
Following package ware installed:
Some package are required for Deki Wiki to convert a Page to PDF file.
# pkg-get -i curl # pkg-get -i htmldoc # pkg-get -i aspell # pkg-get -i aspellen # pkg-get -i wv2
The Subversion version control are required for Deki Wiki to get the latest information for Deki Wiki from the Internet.
# pkg-get -i subversion
Install the html2ps which need to convert Deki Wiki's page to PDF file.
# cd /tmp # wget http://user.it.uu.se/~jan/html2ps-1.0b5.zip # unzip html2ps-1.0b5.zip # cd html2ps-1.0b5/ # perl install Do you want to proceed with the installation? [y]: Searching for Image/Magick.pm: found (/opt/csw/lib/perl/site_perl/Image/Magick.pm) Searching for LWP/UserAgent.pm: not found Searching for ImageMagick: found (/opt/csw/bin/mogrify) Searching for djpeg: found (/opt/csw/bin/djpeg) Searching for TeX: not found Searching for dvips: not found Searching for Ghostscript: found (/opt/csw/bin/gs) Searching for weblint: not found Searching for lynx: not found Searching for wget: found (/opt/csw/bin/wget) By default all files will be installed in subdirectories 'bin', 'lib', and 'man' in a common directory. Is this OK? [y]: Enter the name of this directory (full path) [/usr/local]: /opt/csw Created directory /opt/csw/lib/html2ps Enter the default paper type, possible choices are: A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, letter, legal, arche, archd, archc, archb, archa, flsa, flse, halfletter, 11x17, ledger, other [A4]: Installing html2ps in /opt/csw/bin Installing html2psrc in /opt/csw/lib/html2ps Installing html2ps.1 in /opt/csw/man/man1 Installing html2psrc.5 in /opt/csw/man/man5 Installing hyphen.tex in /opt/csw/lib/html2ps Installing html2ps.html in /opt/csw/lib/html2ps # ls -l html2ps.html html2ps.ps -rw-r--r-- 1 root other 62879 Dec 11 2005 html2ps.html -rw-r--r-- 1 root other 98867 Mar 1 22:29 html2ps.ps # which html2ps /opt/csw/bin/html2ps
The GNU getopt are required for Deki Wiki to run the "createdb.sh" script, when you create database schema manually.
(OPTION) You have to modify the "createdb.sh" script as below, if you you use it.
# pkg-get -i ggetopt
Download Itasca build from one of the following sources.
Extract the archive to your home directory:
cd $HOME wget http://jaist.dl.sourceforge.net/sourceforge/dekiwiki/Deki_Wiki_1.9.0b_Itasca_source.tar.gz gtar xfvz Deki_Wiki_1.9.0b_Itasca_source.tar.gz cd Deki_Wiki_1.9.0b_Itasca_source
Copy web files to your apache share directory.
NOTE:
The Blastwave.com 's Apache package configured to use "/opt/csw/apache2/share/htdocs" as DocumentRoot, but I choose "/opt/csw/apache2/share/dekiwiki" to DocumentRoot for Deiki Wiki's exclusive use.
mkdir /opt/csw/apache2/share/dekiwiki/ cp -pir web/* /opt/csw/apache2/share/dekiwiki/ chown -R nobody:nogroup /opt/csw/apache2/share/dekiwiki/
(OPTIONAL)
If you use Internet Explorer 6.0 browser, I recommend to do next ops to avoid link error for Deiki Wiki 1.9.0b.
cd /opt/csw/apache2/share/dekiwiki/skins/ cp -pi common/icons/icon-lock.gif ace/neutral/icon_lock.gif cp -pi common/icons/icon-mail.gif ace/neutral/icon_mail.gif cp -pi common/icons/icon-file.gif ace/neutral/icon_file.gif cp -pi common/icons/icon-discuss.gif ace/neutral/icon_discuss.gif cp -pi common/icons/anim-save.gif ace/neutral/anim-save.gif cp -pi common/icons/icon-lock.gif ace/blue/icon_lock.gif cp -pi common/icons/icon-mail.gif ace/blue/icon_mail.gif cp -pi common/icons/icon-file.gif ace/blue/icon_file.gif cp -pi common/icons/icon-discuss.gif ace/blue/icon_discuss.gif cp -pi common/icons/anim-save.gif ace/blue/anim-save.gif
Deki Wiki contains a Apache configuration file named "deki-apache.conf".
I include this file (deki-apache.conf) into the Apache bundled configuration file (httpd.conf).
Copy the "deki-apache.conf" file from source onto Apache configuration direcory.
cd $HOME/Deki_Wiki_1.9.0b_Itasca_source cp -pi ./config/deki-apache.conf /opt/csw/apache2/etc/deki-apache.conf.orig cp -pi ./config/deki-apache.conf /opt/csw/apache2/etc/deki-apache.conf
Edit and Change the "deki-apache.conf"file according to your setup:
vi /opt/csw/apache2/etc/deki-apache.conf diff /opt/csw/apache2/etc/deki-apache.conf.orig /opt/csw/apache2/etc/deki-apache.conf 2c2 < ServerName dekiwiki --- > ServerName hostname.mydomain.com 4,5c4,5 < ErrorLog /var/log/apache2/error.log < CustomLog /var/log/apache2/access.log common --- > ErrorLog /opt/csw/apache2/var/log/error_log > CustomLog /opt/csw/apache2/var/log/access_log common 7c7 < DocumentRoot "/var/www/dekiwiki" --- > DocumentRoot "/opt/csw/apache2/share/dekiwiki"
Add the Proxy definition to end of "deki-apache.conf"file.
<Proxy *> AddDefaultCharset off Order deny,allow Deny from all Allow from all </Proxy>
As a result, "deki-apache.conf"seems to like this.
cat /opt/csw/apache2/etc/deki-apache.conf
<VirtualHost *>
ServerName hostname.mydomain.com
ErrorLog /opt/csw/apache2/var/log/error_log
CustomLog /opt/csw/apache2/var/log/access_log common
DocumentRoot "/opt/csw/apache2/share/dekiwiki"
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^/$ /index.php?title= [L,NE]
RewriteCond %{REQUEST_URI} ^/@gui/[^.]+$
RewriteRule ^/@gui/(.*)$ /proxy.php?path=$1 [L,QSA,NE]
RewriteCond %{REQUEST_URI} !^/(@api|editor|skins|config|@gui)/
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} !^/favicon\.ico$
RewriteCond %{REQUEST_URI} !^/robots\.txt$
RewriteCond %{QUERY_STRING} ^$ [OR] %{REQUEST_URI} ^/Special:Search
RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA,NE]
# deki-api uses encoded slashes in query parameters so AllowEncodedSlashes must be On
AllowEncodedSlashes On
# mod_proxy rules
ProxyPass /@api http://localhost:8081 retry=1
ProxyPassReverse /@api http://localhost:8081
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
</VirtualHost>
<Proxy *>
AddDefaultCharset off
Order deny,allow
Deny from all
Allow from all
</Proxy>
The deki-api is a .NET application which runs under the Mono runtime. deki-api runs as a standalone mono application which uses MindTouch Dream's built-in webserver. mod_proxy proxy is used to proxy requests from apache to deki-api.
Edit the Apache root (bundled) configration file to lnclude "deki-apache.conf" file, and enable Apache modules required by Deki Wiki.
cp -pi /opt/csw/apache2/etc/httpd.conf /opt/csw/apache2/etc/httpd.conf.orig vi /opt/csw/apache2/etc/httpd.conf (1) add next two lines to this file near end of the file. # Deki Wiki settings Include etc/deki-apache.conf (2) enable next three lines LoadModule proxy_module libexec/mod_proxy.so LoadModule proxy_http_module libexec/mod_proxy_http.so LoadModule rewrite_module libexec/mod_rewrite.so (3) change DocumentRoot and the web root Directory to point directory Deki Wiki web files. DocumentRoot "/opt/csw/apache2/share/dekiwiki" <Directory "/opt/csw/apache2/share/dekiwiki"> (4) So that diffential between original file and edited file is: diff /opt/csw/apache2/etc/httpd.conf.orig /opt/csw/apache2/etc/httpd.conf 95c95 < #LoadModule proxy_module libexec/mod_proxy.so --- > LoadModule proxy_module libexec/mod_proxy.so 98c98 < #LoadModule proxy_http_module libexec/mod_proxy_http.so --- > LoadModule proxy_http_module libexec/mod_proxy_http.so 173c173,174 < DocumentRoot "/opt/csw/apache2/share/htdocs" --- > # DocumentRoot "/opt/csw/apache2/share/htdocs" > DocumentRoot "/opt/csw/apache2/share/dekiwiki" 200c201,202 < <Directory "/opt/csw/apache2/share/htdocs"> --- > # <Directory "/opt/csw/apache2/share/htdocs"> > <Directory "/opt/csw/apache2/share/dekiwiki"> 472a475,477 > # Deki Wiki settings > Include etc/deki-apache.conf >
Restart Apache to enable the module and apply the new settings
/etc/rc3.d/S50cswapache2 graceful
At this time, Apache's error_log file should not report any errors.
# tail -f /opt/csw/apache2/var/log/error_log [Sat Mar 29 20:22:13 2008] [notice] Digest: generating secret for digest authentication ... [Sat Mar 29 20:22:13 2008] [notice] Digest: done [Sat Mar 29 20:22:13 2008] [notice] Apache/2.2.6 (Unix) PHP/5.2.4 configured -- resuming normal operations
NOTE :
To run syntax check for Apache configuration file, use options of Apache server.
(1) to run syntax check for config files # /opt/csw/apache2/sbin/httpd -t Syntax OK (2) to show parsed settings # /opt/csw/apache2/sbin/httpd -S VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: *:* hostname.mydomain.com (/opt/csw/apache2/etc/deki-apache.conf:1) Syntax OK (3) to show all loaded modules # /opt/csw/apache2/sbin/httpd -M (snip)
Create the deki-api logfile with null contents which writable to Apache user.
# mkdir /var/log/dekiwiki/ # touch /var/log/dekiwiki/deki-api.log # chown nobody:nogroup /var/log/dekiwiki/deki-api.log # chmod 644 /var/log/dekiwiki/deki-api.log # ls -la /var/log/dekiwiki/ total 46 drwxr-xr-x 2 root other 512 Mar 29 13:05 . drwxr-xr-x 3 root sys 512 Mar 29 13:05 .. -rw-r--r-- 1 nobody nogroup 0 Mar 29 13:03 deki-api.log
Create the Mono's ".wapi" directory, then change the owner to Apache user.
NOTE:
# mkdir /.wapi # chown nobody:nogroup /.wapi # ls -la /.wapi total 100 drwxr-xr-x 2 nobody nogroup 512 Mar 29 17:22 . drwxr-xr-x 31 root root 1536 Mar 29 17:21 ..
Copy and Edit the config/dekiwiki-init.debian init script. This script can be used to test the status of the deki-api or start/stop the "mindtouch.host.exe" (deki-api) process.
Change the following to match your configuration:
NOTE:
It is generally used that "nobody" on Solaris, but "nobody" has no
shell definition at /etc/password file for security reason, so that
default shell (/usr/bin/sh) is used.
And then "nobody" has the "/" (root directory) as home directory, therefor "nobody" sharing dot-files like "/.bash_profile", "/.bashrc", "/.profile" with super-user ("root").
# cd $HOME/Deki_Wiki_1.9.0b_Itasca_source/
# cp -pi config/dekiwiki-init.debian /etc/init.d/dekiwiki
# chown root:root /etc/init.d/dekiwiki
# chmod 744 /etc/init.d/dekiwiki
# ln -s /etc/init.d/dekiwiki /etc/rc3.d/S92dekiwiki
# ls -l /etc/rc3.d/S92dekiwiki /etc/init.d/dekiwiki
-rwxr--r-- 1 root root 3187 Mar 30 13:29 /etc/init.d/dekiwiki
lrwxrwxrwx 1 root other 20 Mar 30 12:49 /etc/rc3.d/S92dekiwiki -> /etc/init.d/dekiwiki
# vi /etc/init.d/dekiwiki
# diff config/dekiwiki-init.debian /etc/init.d/dekiwiki
4c4
< PATH=/bin:/sbin:/usr/bin:/usr/sbin
---
> # PATH=/bin:/sbin:/usr/bin:/usr/sbin
5a6,8
> # setenv to run Mono
> . /.bash_profile
>
7c10,11
< DEKIWIKI_USER="www-data"
---
> # DEKIWIKI_USER="www-data"
> DEKIWIKI_USER="nobody"
71c75,77
< echo $(ps -U $DEKIWIKI_USER -o pid,cmd | grep mindtouch.host.exe | grep $HTTP_PORT |awk '{print $1}')
---
> # echo $(ps -U $DEKIWIKI_USER -o pid,cmd | grep mindtouch.host.exe | grep $HTTP_PORT |awk '{print $1}')
> echo $(/bin/ps -f -u $DEKIWIKI_USER -o pid,args | \
> grep mindtouch.host.exe | grep -v -- "-su -c" | awk '{print $1}')
109c115,116
< start-stop-daemon --start --quiet --chuid $DEKIWIKI_USER --exec $MONO -- $MONO_ARGS 2>&1 >> $LOGFILE &
---
> # start-stop-daemon --start --quiet --chuid $DEKIWIKI_USER --exec $MONO -- $MONO_ARGS 2>&1 >> $LOGFILE &
> su - $DEKIWIKI_USER -c "$MONO $MONO_ARGS" 2>&1 >> $LOGFILE &
Then /etc/init.d/dekiwiki will be:
#!/bin/bash
prog="MindTouch Deki Host Service"
# PATH=/bin:/sbin:/usr/bin:/usr/sbin
# setenv to run Mono
. /.bash_profile
DEKIHOST_CONF="/etc/dekiwiki/mindtouch.host.conf"
# DEKIWIKI_USER="www-data"
DEKIWIKI_USER="nobody"
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}')
echo $(/bin/ps -f -u $DEKIWIKI_USER -o pid,args | \
grep mindtouch.host.exe | grep -v -- "-su -c" | 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 &
su - $DEKIWIKI_USER -c "$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
Create a empty folder to store search index file.
mkdir -p /opt/csw/apache2/share/dekiwiki/bin/cache/luceneindex/ chown -R nobody:nogroup /opt/csw/apache2/share/dekiwiki/bin/cache/luceneindex/ chmod -R 775 /opt/csw/apache2/share/dekiwiki/bin/cache/luceneindex/
Launch a browser and go to the installer:
http://<hostname>/config/index.php
"DEKI WIKI Installation" page will be shown in your browser.
Environmental checking are all well and fine. Enter required information for Deki Wiki as below:
Deki Wiki Installation Checking environment... If you run into installation problems, please include the following lines. Environment checked. You can install Deki Wiki. All fields are required, unless otherwise noted. Deki Wiki Setup Site localization: English - United States Site name: Deki Wiki System e-mail: your e-mail Emails, such as password reminders, will be sent from this email address. Deki Wiki Administrator Account Setup Admin username: Admin Admin password: ***** Confirm password: ***** Admin e-mail: your e-mail Your Name: (optional) Your Phone: (optional) Country: None [X] Receive updates and notifications from MindTouch about Deki Wiki Database Configuration Database host: localhost If your database server isn't on your web server, enter the name or IP address here. Database name: wikidb The database must not exist. Database user: wikiuser The database user must not exist. Existing MySQL credentials In order to complete the Deki Wiki installation, we require a MySQL user who can create database, stored procedures, and MySQL users. Usually this user is root. Superuser name: root Superuser password: **** Advanced Configuration Deki Wiki API Key: ******************************** ImageMagick convert: /opt/csw/bin/convert The path to the ImageMagick convert binary ImageMagick identify: /opt/csw/bin/identify The path to the ImageMagick identify binary Mono: /opt/csw/bin/mono The path to the mono binary html2ps: /opt/csw/bin/html2ps The path to the html2ps binary ps2pdf: /opt/csw/bin/ps2pdf The path to the ps2pdf binary [Install Deki Wiki!]
OK !
Fill in the required information and click "Install Deki Wiki !"
Deki Wiki Installation Checking environment... If you run into installation problems, please include the following lines. Environment checked. You can install Deki Wiki. Performing installation... Success: Connected to installation database. Success: Created database wikidb. Creating tables...done.Granting user permissions to wikiuser on wikidb...done. Success: Created Deki Wiki administrator account admin Success: Generated API key and stored it in database. Success: Site language set to en-us. Success: Saved attachments path as /opt/csw/apache2/share/dekiwiki/attachments/ Success: Set your Deki Wiki site name as Deki Wiki Creating stored procedures...done. Success: Wrote LocalSettings.php to disk successfully. Success: Wrote mindtouch.deki.startup.xml to disk successfully. Success: Wrote mindtouch.host.conf to disk successfully. Installation successful!
But wait, you're not done yet! Please run the following commands manually from the command line to complete your installation: cd /opt/csw/apache2/share/dekiwiki/config mkdir /etc/dekiwiki cp -p mindtouch.host.conf /etc/dekiwiki cp -p mindtouch.deki.startup.xml /etc/dekiwiki cp -p LocalSettings.php /opt/csw/apache2/share/dekiwiki/ /etc/init.d/dekiwiki start Additionally, you might want to clean up your configuration files: cd /opt/csw/apache2/share/dekiwiki rm config/mindtouch.host.conf rm config/mindtouch.deki.startup.xml rm config/LocalSettings.php Visit your Deki Wiki! (http://<hostname>/index.php) Subscribe to the MindTouch Deki Wiki updates and notifications mailing list.
Complete the installation by running the additional commands as instructed by the installer.
NOTE:
Don't run commands shown by browser, they are for Linux distribution and not for Solaris.
Install derived files into suitable directory.
cd /opt/csw/apache2/share/dekiwiki/config/ mkdir /etc/dekiwiki chown nobody:nogroup /etc/dekiwiki chmod 755 /etc/dekiwiki cp -pi mindtouch.host.conf /etc/dekiwiki/ cp -pi mindtouch.deki.startup.xml /etc/dekiwiki/ cp -pi LocalSettings.php /opt/csw/apache2/share/dekiwiki/ chmod 644 /etc/dekiwiki/mindtouch.host.conf chmod 644 /etc/dekiwiki/mindtouch.deki.startup.xml chmod 644 /opt/csw/apache2/share/dekiwiki/LocalSettings.php
Start the deki-api daemon.
# /etc/rc3.d/S92dekiwiki start Starting MindTouch Deki API: mindtouch.host.exe. # /etc/rc3.d/S92dekiwiki status dekiwiki is running: 16323 16322 # ps -ef | grep mono | grep -v -- -su nobody 16323 16322 4 21:32:39 pts/3 0:05 /opt/csw/bin/mono /opt/csw/apache2/share/dekiwiki/bin/mindtouch.host.exe apikey # ls -l /var/log/dekiwiki/deki-api.log -rw-r--r-- 1 nobody nogroup 122 Mar 29 21:32 /var/log/dekiwiki/deki-api.log
deki-api's Log file is here:
# tail -f /var/log/dekiwiki/deki-api.log -------------------- initializing -------------------- initialized 1.638825 secs -------------------- ready 1.588045 secs
At this point you can talk to the deki-api daemon via the HTTP request.
deki-api daemon test:
# curl -i http://localhost:8081/deki/@about HTTP/1.1 200 OK Server: Dream-HTTPAPI/1.5.1.3404 Content-Type: text/html; charset=utf-8 Date: Sat, 29 Mar 2008 12:35:05 GMT Content-Length: 50940 Connection: close <html xmlns="http://www.w3.org/1999/xhtml"><head><title>MindTouch Deki Wiki Service</title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> (snip long HTML code) </body></html>
Verify your new Deki Wiki Itasca installation by launching a browser and going to the following URI:
http://<hostname>/index.php
This section describe upgrade procedure of Deki Wiki from Hayes 1.8x release to Itasca 19.x release.
IMPORTANT NOTICE
NOTE : This section was from official page below. Please referer "Official" guide to get the latest information.
Before delete old code, you should stop Apache Server and Dekihost daemon process.
/etc/init.d/dekihost stop /etc/rc3.d/S50cswapache2 stop ps -ef | egrep 'httpd|apache|mono'
mkdir $HOME/deki_backup cd /opt/csw/apache2/share/deki-hayes/ gtar cvzpf /deki_backup/attachments.tar.gz attachments
cp -pi LocalSettings.php AdminSettings.php $HOME/deki_backup
cp -pi ./bin/mindtouch.host.sh $HOME/deki_backup cp -pi ./config/mindtouch.deki.startup.xml $HOME/deki_backup
Export contents of your Deki Wiki's database schema to a export file (*.sql) by the "MySQL superuser".
mysqldump -u<user> -p<password> <dbname> > $HOME/deki_backup/wikidb.sql For example: mysqldump -uroot -psecret wikidb > $HOME/deki_backup/wikidb.sql
cd /opt/csw/apache2/share/ (OPTIONAL) Backup all web objects to archive if you need gtar cvzpf $HOME/deki_backup/deki-hayes.tar.gz deki-hayes rm -rf deki-hayes
cp -pi /etc/init.d/dekihost $HOME/deki_backup/ rm /etc/init.d/dekihost rm /etc/rc3.d/S92dekihost
Download the Deki Wiki Itasca build from one of the following sources:
Note that the filename used ("Deki_Wiki_1.9.0_Itasca_source.tar.gz") will be different depending on which version of Deki Wiki you are upgrading.
Exctract the archive to your home directory.
Then copy web files to your apache share directory.
cd $HOME wget http://jaist.dl.sourceforge.net/sourceforge/dekiwiki/Deki_Wiki_1.9.0b_Itasca_source.tar.gz gtar xfvz Deki_Wiki_1.9.0b_Itasca_source.tar.gz cd Deki_Wiki_1.9.0b_Itasca_source/ mkdir /opt/csw/apache2/share/dekiwiki/ cp -pir web/* /opt/csw/apache2/share/dekiwiki/ chown -R nobody:nogroup /opt/csw/apache2/share/dekiwiki/
(OPTIONAL)
If you use Internet Explorer 6.0 browser, I recommend to do next ops to avoid link error for Deiki Wiki 1.9.0b.
cd /opt/csw/apache2/share/dekiwiki/skins/ cp -pi common/icons/icon-lock.gif ace/neutral/icon_lock.gif cp -pi common/icons/icon-mail.gif ace/neutral/icon_mail.gif cp -pi common/icons/icon-file.gif ace/neutral/icon_file.gif cp -pi common/icons/icon-discuss.gif ace/neutral/icon_discuss.gif cp -pi common/icons/anim-save.gif ace/neutral/anim-save.gif cp -pi common/icons/icon-lock.gif ace/blue/icon_lock.gif cp -pi common/icons/icon-mail.gif ace/blue/icon_mail.gif cp -pi common/icons/icon-file.gif ace/blue/icon_file.gif cp -pi common/icons/icon-discuss.gif ace/blue/icon_discuss.gif cp -pi common/icons/anim-save.gif ace/blue/anim-save.gif
Create a directory which contain the deki-api logfile with null contents which writable to Apache user.
mkdir /var/log/dekiwiki/
touch /var/log/dekiwiki/deki-api.log
chown nobody:nogroup /var/log/dekiwiki/deki-api.log
chmod 644 /var/log/dekiwiki/deki-api.log
(Optional)
Move old ("Hayes") logfile to corresponsive location if you need.
mv -i /var/log/deki-api.log /var/log/dekiwiki/deki-api.log.hayes
ls -la /var/log/dekiwiki/
total 46
drwxr-xr-x 2 root other 512 Mar 29 13:05 .
drwxr-xr-x 3 root sys 512 Mar 29 13:05 ..
-rw-r--r-- 1 nobody nogroup 0 Mar 29 13:03 deki-api.log
-rw-r--r-- 1 nobody nogroup 21363 Mar 14 12:03 deki-api.log.hayes
Create the Deki Wiki host configuration file.
This file are described server specific definition for the dekihost daemon, and called from "/etc/init.d/dekiwiki" init script as shell script.
(1) Determine current global apikey ("APIKEY") from backup file
# grep "<apikey>" $HOME/deki_backup/mindtouch.deki.startup.xml
<apikey>zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz</apikey>
(2) Create the Deki Wiki host configuration file from scratch
# touch /etc/dekiwiki/mindtouch.host.conf
# chown nobody:nogroup /etc/dekiwiki/mindtouch.host.conf
# chmod 644 /etc/dekiwiki/mindtouch.host.conf
# vi /etc/dekiwiki/mindtouch.host.conf
(3) Contents of /etc/dekiwiki/mindtouch.host.conf are mentioned below.
Where right side of "APIKEY=" are equality of the apikey value determined at step (1).
# cat /etc/dekiwiki/mindtouch.host.conf
-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----
# MindTouch Deki Wiki host configuration file
# The full path to your mono executable
MONO="/opt/csw/bin/mono"
# The location of your wiki's bin directory
BIN_DIR="/opt/csw/apache2/share/dekiwiki/bin"
# The ApiKey for the dream host
APIKEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
PATH_PREFIX="@api"
# Port the API listens on
HTTP_PORT="8081"
# hostname to listen on
IP="localhost"
# location of the mindtouch.host.exe assembly
HOST_EXE="$BIN_DIR/mindtouch.host.exe"
# path to the Deki Wiki configuration xml file
SCRIPT="/etc/dekiwiki/mindtouch.deki.startup.xml"
# don't require a tty (non-interactive mode)
NOTTY="notty"
# The numbe of threads to reserve for internal use
CONNECT_LIMIT="-5"
# directory to store dekiwiki log files
LOGDIR="/var/log/dekiwiki"
# location of the dekiwiki API log file
LOGFILE="$LOGDIR/deki-api.log"
-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----
Create the dekiwiki init script. This script are build on "Debian"'s one, and are modified to Solaris Operating Environment.
(1) Create the dekihost init script
# touch /etc/init.d/dekiwiki
# chown root:root /etc/init.d/dekiwiki
# chmod 744 /etc/init.d/dekiwiki
# vi /etc/init.d/dekiwiki
(2) Contents of init script here
# cat /etc/init.d/dekiwiki
-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----
#!/bin/bash
prog="MindTouch Deki Host Service"
# PATH=/bin:/sbin:/usr/bin:/usr/sbin
# setenv to run Mono
. /.bash_profile
DEKIHOST_CONF="/etc/dekiwiki/mindtouch.host.conf"
# DEKIWIKI_USER="www-data"
DEKIWIKI_USER="nobody"
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}')
echo $(/bin/ps -f -u $DEKIWIKI_USER -o pid,args | \
grep mindtouch.host.exe | grep -v -- "-su -c" | 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 &
su - $DEKIWIKI_USER -c "$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
-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----
(3) Create an symbolic link to automatic start when Solaris goes "init state 3"
# ln -s /etc/init.d/dekiwiki /etc/rc3.d/S92dekiwiki
# ls -l /etc/rc3.d/S92dekiwiki /etc/init.d/dekiwiki
-rwxr--r-- 1 root root 3187 Mar 30 13:29 /etc/init.d/dekiwiki
lrwxrwxrwx 1 root other 20 Mar 30 12:49 /etc/rc3.d/S92dekiwiki -> /etc/init.d/dekiwiki
cd $HOME/deki_backup cp -pi LocalSettings.php AdminSettings.php /opt/csw/apache2/share/dekiwiki/ gtar xvzpf attachments.tar.gz -C /opt/csw/apache2/share/dekiwiki/ cp -pi mindtouch.host.sh /opt/csw/apache2/share/dekiwiki/bin/ cp -pi mindtouch.deki.startup.xml /etc/dekiwiki/
Edit the LocalSettings.php and the mindtouch.deki.startup.xml to point new location of Deki Wiki web objects.
Change the following paths according to your setup:
From: /opt/csw/apache2/share/deki-hayes To: /opt/csw/apache2/share/dekiwiki
# vi /opt/csw/apache2/share/dekiwiki/LocalSettings.php # diff $HOME/deki_backup/LocalSettings.php /opt/csw/apache2/share/dekiwiki/LocalSettings.php 11,12c11,12 < $IP = "/opt/csw/apache2/share/deki-hayes"; < ini_set( "include_path", ".:/opt/csw/apache2/share/deki-hayes:/opt/csw/apache2/share/deki-hayes/includes:/opt/csw/apache2/share/deki-hayes/languages" ); --- > $IP = "/opt/csw/apache2/share/dekiwiki"; > ini_set( "include_path", ".:/opt/csw/apache2/share/dekiwiki:/opt/csw/apache2/share/dekiwiki/includes:/opt/csw/apache2/share/dekiwiki/languages" );
o /etc/dekiwiki/mindtouch.deki.startup.xml
# vi /etc/dekiwiki/mindtouch.deki.startup.xml # diff $HOME/deki_backup/mindtouch.deki.startup.xml /etc/dekiwiki/mindtouch.deki.startup.xml 27c27 < <deki-path>/opt/csw/apache2/share/deki-hayes</deki-path> --- > <deki-path>/opt/csw/apache2/share/dekiwiki</deki-path> 70,81c70,81 < <path.store>/opt/csw/apache2/share/deki-hayes/bin/cache/luceneindex/$1</path.store> < <filter-path extension="doc">/opt/csw/apache2/share/deki-hayes/bin/filters/wvText</filter-path> < <filter-path extension="pdf">/opt/csw/apache2/share/deki-hayes/bin/filters/pdf2text</filter-path> < <filter-path extension="xhtml">/opt/csw/apache2/share/deki-hayes/filters/html2text</filter-path> < <filter-path extension="html">/opt/csw/apache2/share/deki-hayes/bin/filters/html2text</filter-path> < <filter-path extension="htm">/opt/csw/apache2/share/deki-hayes/bin/filters/html2text</filter-path> < <filter-path extension="docx">/opt/csw/apache2/share/deki-hayes/bin/filters/docx2txt</filter-path> < <filter-path extension="odt">/opt/csw/apache2/share/deki-hayes/bin/filters/odt2txt</filter-path> < <filter-path extension="odp">/opt/csw/apache2/share/deki-hayes/bin/filters/odp2txt</filter-path> < <filter-path extension="ppt">/opt/csw/apache2/share/deki-hayes/bin/filters/ppt2txt</filter-path> < <filter-path extension="pptx">/opt/csw/apache2/share/deki-hayes/bin/filters/pptx2txt</filter-path> < <filter-path extension="xls">/opt/csw/apache2/share/deki-hayes/bin/filters/xls2txt</filter-path> --- > <path.store>/opt/csw/apache2/share/dekiwiki/bin/cache/luceneindex/$1</path.store> > <filter-path extension="doc">/opt/csw/apache2/share/dekiwiki/bin/filters/wvText</filter-path> > <filter-path extension="pdf">/opt/csw/apache2/share/dekiwiki/bin/filters/pdf2text</filter-path> > <filter-path extension="xhtml">/opt/csw/apache2/share/dekiwiki/filters/html2text</filter-path> > <filter-path extension="html">/opt/csw/apache2/share/dekiwiki/bin/filters/html2text</filter-path> > <filter-path extension="htm">/opt/csw/apache2/share/dekiwiki/bin/filters/html2text</filter-path> > <filter-path extension="docx">/opt/csw/apache2/share/dekiwiki/bin/filters/docx2txt</filter-path> > <filter-path extension="odt">/opt/csw/apache2/share/dekiwiki/bin/filters/odt2txt</filter-path> > <filter-path extension="odp">/opt/csw/apache2/share/dekiwiki/bin/filters/odp2txt</filter-path> > <filter-path extension="ppt">/opt/csw/apache2/share/dekiwiki/bin/filters/ppt2txt</filter-path> > <filter-path extension="pptx">/opt/csw/apache2/share/dekiwiki/bin/filters/pptx2txt</filter-path> > <filter-path extension="xls">/opt/csw/apache2/share/dekiwiki/bin/filters/xls2txt</filter-path>
Edit Apache configuration file to point the Itasca's DocumentRoot location.
o/opt/csw/apache2/etc/httpd.conf
# cp -pi /opt/csw/apache2/etc/httpd.conf /opt/csw/apache2/etc/httpd.conf.02 # vi /opt/csw/apache2/etc/httpd.conf # diff /opt/csw/apache2/etc/httpd.conf.02 /opt/csw/apache2/etc/httpd.conf 174c174 < DocumentRoot "/opt/csw/apache2/share/deki-hayes" --- > DocumentRoot "/opt/csw/apache2/share/dekiwiki" 202c202 < <Directory "/opt/csw/apache2/share/deki-hayes"> --- > <Directory "/opt/csw/apache2/share/dekiwiki">
o /opt/csw/apache2/etc/deki-apache.conf
# cp -pi /opt/csw/apache2/etc/deki-apache.conf /opt/csw/apache2/etc/deki-apache.conf.02 # vi /opt/csw/apache2/etc/deki-apache.conf # diff /opt/csw/apache2/etc/deki-apache.conf.02 /opt/csw/apache2/etc/de ki-apache.conf 7c7 < DocumentRoot "/opt/csw/apache2/share/deki-hayes" --- > DocumentRoot "/opt/csw/apache2/share/dekiwiki"
Run DB update script to migrate DB schema from Hayes to Itasca.
# cd /opt/csw/apache2/share/dekiwiki/maintenance # php update-db.php Updating wikidb on localhost permission system DB upgrade has already been performed. sprocs update complete Applying misc database updates...done adding role_hidden to roles table cleanup up special pages anonymous user updated for all tables removed browse from private restriction Updated `roles`: dropped unused column role_hidden added page_template_id column to pages table Done.
Modify DB manually to update the attachment storage path .
NOTE:
# mysql -uwikiuser -p<secret> wikidb Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 148 Server version: 5.0.51 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> desc config; +--------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+------------------+------+-----+---------+----------------+ | config_id | int(10) unsigned | NO | PRI | NULL | auto_increment | | config_key | varchar(255) | NO | MUL | NULL | | | config_value | text | NO | | NULL | | +--------------+------------------+------+-----+---------+----------------+ 3 rows in set (0.02 sec) mysql> select * from config where config_key = 'storage/fs/path'; +-----------+-----------------+-----------------------------------------------+ | config_id | config_key | config_value | +-----------+-----------------+-----------------------------------------------+ | 26 | storage/fs/path | /opt/csw/apache2/share/deki-hayes/attachments | +-----------+-----------------+-----------------------------------------------+ 1 row in set (0.00 sec) mysql> update config set config_value = '/opt/csw/apache2/share/dekiwiki/attachments' where config_key = 'storage/fs/path'; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> commit; Query OK, 0 rows affected (0.00 sec) mysql> exit; Bye
Please make sure your skins/common/cache folder can be written by the apache user.
# chown -R nobody:nogroup /opt/csw/apache2/share/dekiwiki/skins/common/cache/ # rm -rf /opt/csw/apache2/share/dekiwiki/skins/common/cache/cache-* # ls -la /opt/csw/apache2/share/dekiwiki/skins/common/cache/ total 6 drwxr-xr-x 2 nobody nogroup 512 Mar 16 15:21 . drwxr-xr-x 11 nobody nogroup 1536 Mar 16 15:21 ..
(1) Confirm options of deki-api init script
# /etc/init.d/dekiwiki
Usage: /etc/init.d/dekiwiki {start|stop|force-reload|restart|status}
(2) Show status deki-api daemon
# /etc/init.d/dekiwiki status
dekiwiki is stopped
(3) Start the deki-api daemon
# /etc/init.d/dekiwiki start
Starting MindTouch Deki API: mindtouch.host.exe.
(4) Confirm pid of the daemon
# ps -ef | grep mono | grep -v -- -su
nobody 16700 16699 0 13:17:29 pts/3 0:05 /opt/csw/bin/mono \
/opt/csw/apache2/share/dekiwiki/bin/mindtouch.host.exe apikey
# /etc/init.d/dekiwiki status
dekiwiki is running: 16700
(5) Show contents of thedeki-api.log
# ls -l /var/log/dekiwiki/deki-api.log
-rw-r--r-- 1 nobody nogroup 121 Mar 29 16:03 /var/log/dekiwiki/deki-api.log
# tail -f /var/log/dekiwiki/deki-api.log
-------------------- initializing
-------------------- initialized 1.635871 secs
-------------------- ready 1.66142 secs
^C (Press [Ctrl]+[C] to terminate)
(6) Talk to the deki-api daemon via the HTTP request
# curl -i http://localhost:8081/deki/@about
HTTP/1.1 200 OK
Server: Dream-HTTPAPI/1.5.1.3404
Content-Type: text/html; charset=utf-8
Date: Sat, 29 Mar 2008 07:09:51 GMT
Content-Length: 50940
Connection: close
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>MindTouch Deki Wiki Service</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
(snip long HTML code)
</body></html>
# /etc/rc3.d/S50cswapache2 start
# ps -ef | grep httpd
nobody 11693 11692 0 16:38:30 ? 0:00 /opt/csw/apache2/sbin/httpd -k start
root 11692 1 1 16:38:30 ? 0:00 /opt/csw/apache2/sbin/httpd -k start
nobody 11694 11692 0 16:38:30 ? 0:00 /opt/csw/apache2/sbin/httpd -k start
nobody 11696 11692 0 16:38:30 ? 0:00 /opt/csw/apache2/sbin/httpd -k start
nobody 11697 11692 0 16:38:30 ? 0:00 /opt/csw/apache2/sbin/httpd -k start
nobody 11695 11692 0 16:38:30 ? 0:00 /opt/csw/apache2/sbin/httpd -k start
Verify your new Deki Wiki Itasca installation by launching a browser and going to the following URI:
http://<hostname>/index.php
If deki-api failed to load try the following:
# ps -ef | grep mindtouch.host | grep -v -- -su
You should see a process like:
nobody 11806 11805 0 17:22:47 pts/2 0:17 /opt/csw/bin/mono \ /opt/csw/apache2/share/dekiwiki/bin/mindtouch.host.exe apikey
If you don't see the process above, check the dekiapi error logs (/opt/csw/apache2/share/dekiwiki/bin/logs/trace.log) for more details
You can restart the deki-api process by:
/etc/init.d/dekiwiki restart
| Hayes(Linux) | Itasca(Linux) | Hayes(Solaris) | Itasca(Solaris) | |
| Deki Wiki web files directory | /var/www/deki-hayes/ | /var/www/dekiwiki/ | /opt/csw/apache2/share/deki-hayes/ | /opt/csw/apache2/share/dekiwiki/ |
| deki-api daemon init script | /etc/init.d/dekihost | /etc/init.d/dekiwiki | /etc/init.d/dekihost | /etc/init.d/dekiwiki |
| deki-api daemon log file | /var/log/deki-api.log | /var/log/dekiwiki/deki-api.log | /var/log/deki-api.log | /var/log/dekiwiki/deki-api.log |
/.bash_profile - personal initialization file for bash (shared by root and nobody) /.wgetrc - personal initialization file for wget /etc /dekiwiki mindtouch.deki.startup.xml - deki-api server configuration file mindtouch.host.conf - deki-api server configuration file, which called in /etc/init.d/dekiwiki (NOTE: Added on Itasca) /init.d dekihost - startup for deki-api (NOTE: Obsoleted on Itasca) dekiwiki - startup for deki-api (NOTE: New on Itasca) /rc3.d S40cswmysql5 - startup for MySQL server S50cswapache2 -> ../init.d/cswapache2 - startup Apache server S92dekihost -> /etc/init.d/dekiwiki - startup for deki-api (NOTE: Changed on Itasca, old link was /etc/init.d/dekihost) /opt /csw /apache2 /etc deki-apache.conf - Apache config file for Deki Wiki httpd.conf - Apache "main" config file (includes deki-apache.conf) /share /deki-hayes - DocumentRoot for Deki Wiki "Hayes release" /dekiwiki - DocumentRoot for the Deki Wiki "Itasca release" (NOTE: New on Itasca, old name was "deki-hayes") /bin /cache /luceneindex - Lucene index directory mindtouch.host.exe - deki-api daemon executable mindtouch.host.sh - deki-api startup script (NOTE: Obsolated on Itasca) /logs info.log trace.log warning.log LocalSettings.php AdminSettings.php /htdocs - DocumentRoot of Apache2 original (Not used) /var /log access_log - Apache access log file error_log - Apache error log file /bin wget - network utility to retrieve files from the Web mono - .NET runtime gmcs - C# compiler /etc pkg-get.conf - pkg-get configuration file /mysql my.cnf - configuration file for MySQL server /php5 /lib php.ini - configuration for PHP5 /var /log deki-api.log - deki-api log file (NOTE: This is for Hayes) /dekiwiki deki-api.log - deki-api log file (NOTE: New on Itasca) /.wapi - Mono shared directory
END OF GUIDE