Mindtouch (Dekiwiki)

    版本為 11:21, 26 Dec 2024

    到這個版本。

    返回到 版本存檔.

    查閱目前版本

    Mindtouch (前身為 Dekiwiki),自 2013 年下半年起,官方對 OpenSource 版已停止繼續維護,最後版為 Mindtouch 10.1.4。

    系統環境:

    • CentOS 5.8
    • Mono 2.10.8
    • Mindtouch 10.1.4

    安裝 Mono 2.10.8

    Installing Dependencies
    http://fedoraproject.org/wiki/EPEL

    wget http://mirror01.idc.hinet.net/EPEL/5/i386/epel-release-5-4.noarch.rpm
    rpm -Uvh epel-release-5-4.noarch.rpm
    yum install bison gettext glib2 freetype fontconfig libpng libpng-devel libX11 libX11-devel glib2-devel libgdi* libexif glibc-devel urw-fonts java unzip gcc gcc-c++ automake autoconf libtool make bzip2 wget
    

    Downloading and Compiling

    cd /usr/src
    wget http://download.mono-project.com/sources/mono/mono-2.10.8.tar.gz
    tar xzf mono-2.10.8.tar.gz
    cd mono-2.10.8
    ./configure --prefix=/opt/mono-2.10.8
    make && make install
    

    TIP:

    如果安裝過程遇到錯誤 Out of memory 時,就執行

    ulimit -v unlimited

    Completed the installation

    # /opt/mono-2.10.8/bin/mono --version
    Mono JIT compiler version 2.10.8 (tarball Sun Jul  6 02:48:03 EDT 2014)
    Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
            TLS:           __thread
            SIGSEGV:       altstack
            Notifications: epoll
            Architecture:  x86
            Disabled:      none
            Misc:          softdebug
            LLVM:          supported, not enabled.
            GC:            Included Boehm (with typed GC and Parallel Mark)
    

    安裝 Mindtouch 10.1.4

    安裝 RPMForge
    http://wiki.centos.org/zh-tw/Additio...ories/RPMForge

    wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.i386.rpm
    rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
    rpm -ivh rpmforge-release-0.5.3-1.el5.rf.i386.rpm

    安裝相依性套件

    yum install wv links pdftohtml tidy html2ps
    

    安裝 Mindtouch
    新增 /etc/yum.repo.d/mindtouch.repo

    [home_mindtouch]
    name=mindtouch's Home Project (CentOS_5)
    type=rpm-md
    baseurl=http://repo.mindtouch.com/CentOS_5/
    gpgcheck=1
    gpgkey=http://repo.mindtouch.com/CentOS_5/repodata/repomd.xml.key
    enabled=1
    

    開始安裝

    yum install dekiwiki
    

    初始化 Mindtouch

    設定 Apache
    新增 /etc/httpd/conf.d/deki-apache.conf

    <VirtualHost 192.168.7.51:80>
            ServerName www.osslab.org.tw
            #ServerAlias
    
            ErrorLog /var/log/httpd/error-dekiwiki.log
            CustomLog /var/log/httpd/access-dekiwiki.log common
    
            DocumentRoot "/var/www/dekiwiki"
    
            RewriteEngine On
            RewriteCond %{REQUEST_URI} ^/$
            RewriteRule ^/$ /index.php?title= [L,QSA,NE]
    
            RewriteCond %{REQUEST_URI} !^/(@api|editor|skins|config|deki)/
            RewriteCond %{REQUEST_URI} !^/index\.php
            RewriteCond %{REQUEST_URI} !^/favicon\.ico$
            RewriteCond %{REQUEST_URI} !^/robots\.txt$
            RewriteCond %{REQUEST_URI} !^/error/(.*)\.var$
            RewriteCond %{QUERY_STRING} ^$ [OR] %{REQUEST_URI} ^/Special:Search
            RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA,NE]
    
            # Bug: 5252 https rewrite/proxy rules
            RewriteCond %{HTTPS} =on
            RewriteCond %{REQUEST_URI} ^/@api/
            RewriteCond %{QUERY_STRING} !^(.*)dream.in.scheme= [NC]
            RewriteRule ^/@api/(.*)$ http://localhost:8081/$1?dream.in.scheme=https [QSA,P,L]
    
            RewriteCond %{HTTPS} =on
            RewriteCond %{REQUEST_URI} ^/@api/
            RewriteCond %{QUERY_STRING} ^(.*)dream.in.scheme= [NC]
            RewriteRule ^/@api/(.*)$ http://localhost:8081/$1 [QSA,P,L]
            # End Bug: 5252
    
            # deki-api uses encoded slashes in query parameters so AllowEncodedSlashes must be On
            AllowEncodedSlashes On
    
            # FIXME:
            # Some php flags we need. These are only needed until all
            # the short php open tags are changed to long in the source code.
            php_flag short_open_tag on
            # Allow short open tags and turn off E_NOTICE messages
            php_value error_reporting "E_ALL & ~E_NOTICE"
            # Setting php memory parameters
            # php_value memory_limit "128M"
            # php_value post_max_size "64M"
            # php_value upload_max_filesize "64M"
    
            # 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
    
            <Proxy *>
              AddDefaultCharset off
              Order deny,allow
              Deny from all
              Allow from all
            </Proxy>
    </VirtualHost>
    
    <Directory "/var/www/dekiwiki">
            # Possible values for the Options directive are "None", "All",
            # or any combination of:
            #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
            #
            # Note that "MultiViews" must be named *explicitly* --- "Options All"
            # doesn't give it to you.
            #
            # The Options directive is both complicated and important.  Please see
            # http://httpd.apache.org/docs-2.2/mod/core.html#options
            # for more information.
            Options None
            # AllowOverride controls what directives may be placed in .htaccess files.
            # It can be "All", "None", or any combination of the keywords:
            #   Options FileInfo AuthConfig Limit
            AllowOverride All
            # Controls who can get stuff from this server.
            Order allow,deny
            Allow from all
    </Directory>
    

    設定 Mindtouch
    NOTE: 這裡是假設從舊網站轉移至新網站,不適用新安裝。

    複製舊網站的設定檔

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

    修改 /etc/dekiwiki/mindtouch.host.conf

    ...
    #MONO="/usr/bin/mono"
    MONO="/opt/mono-2.10.8/bin/mono"
    ... 
    

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

    <host>www.osslab.tw</host>^M
    <host>m.osslab.tw</host>^M
    
    <db-server>localhost</db-server>^M
    <db-port>3306</db-port>^M
    <db-catalog>wikidb</db-catalog>^M
    <db-user>wikiuser</db-user>^M
    <db-password hidden="true">1234567890</db-password>^
    

    回復舊網站資料

    建立資料庫

    Powered by MindTouch Core