出家如初,成佛有余

mindtouch deki wiki 安装配置指南

Posted in Uncategorized by chuanliang on 2008/02/01

1 环境说明

操作系统:

Redhat AS4

数据库:

mysql 5.0.51。由于使用了存储过程,必须使用myq 5.0.51以上版本,自带的版本太低。

php

5.2.5,必须使用5.0以上php版本,自带的版本太低。

mono

wget http://www.go-mono.com/download-stable/rhel-4-i386/mono.zip

mkdir mono

mv mono.zip mono/

rpm -ivh *rpm

httpd

httpd-2.0.52-25.ent

httpd-manual-2.0.52-25.ent

system-config-httpd-1.3.1-1

httpd-devel-2.0.52-25.ent

httpd-suexec-2.0.52-25.ent

gd

gd-2.0.28-4.4E.1

gd-devel-2.0.28-4.4E.1

zlib

zlib-devel-1.2.1.2-1.2

zlib-1.2.1.2-1.2

png

libpng-1.2.7-1.el4.2

libpng10-1.0.16-1

libpng-devel-1.2.7-1.el4.2

libpng10-devel-1.0.16-1

jpeg

libjpeg-devel-6b-33

libjpeg-6b-33

curl

curl-7.12.1-8.rhel4

curl-devel-7.12.1-8.rhel4

freetype

freetype-2.1.9-1

freetype-demos-2.1.9-1

freetype-devel-2.1.9-1

freetype-utils-2.1.9-1

ImageMagick

ImageMagick-c++-6.0.7.1-14

ImageMagick-devel-6.0.7.1-14

xloadimage-4.1-36.RHEL4

ImageMagick-perl-6.0.7.1-14

ImageMagick-6.0.7.1-14

ImageMagick-c++-devel-6.0.7.1-14

wv

libwvstreams-3.75.0-2

wvdial-1.54.0-3

links

symlinks-1.2-22

elinks-0.9.2-3.2

2 安装步骤

2.1 、卸载系统缺省的mysql库

2.2 、卸载缺省的php库

2.3 、安装PHP5

./configure –with-apxs2=/usr/sbin/apxs

–with-mysql=/usr

–with-mysqli=/usr/bin/mysql_config

–with-libxml-dir=/usr

–enable-dba

–with-openssl

–with-regex=php

–enable-bcmath

–with-gnu-ld

–with-tsrm-pthreads

–enable-ftp

–with-gettext

–enable-zend-multibyte

–enable-mbstring=all

–with-curl=/usr

–with-gd=/usr

–with-jpeg-dir=/usr

–with-png-dir=/usr

–with-zlib-dir=/usr

–with-freetype-dir=/usr

make

make install

2.4 、修改httpd.conf

AddType application/x-httpd-php .php

AddType application/x-httpd-php3 .php3

AddType application/x-httpd-php4 .php4

AddType application/x-httpd-php-source .phps

2.5 、修改php.ini

拷贝php.ini-dist为php.ini

cp php.ini-dist `php -i|grep php.ini|awk -F “=>” ‘{print $2}’`/php.ini

修改php.ini的如下内容:

session.save_path=/tmp

memory_limit = 128M

post_max_size = 64M

upload_max_filesize = 64M

2.6 、安装mysql

2.7 、安装mono

wget http://www.go-mono.com/download-stable/rhel-4-i386/mono.zip

mkdir mono

mv mono.zip mono/

rpm -ivh *rpm

2.8 、为mono创建/var/www/.wapi

mkdir /var/www/.wapi

chown apache /var/www/.wapi

2.9 、安装deki

wget http://downloads.sourceforge.net/dekiwiki/Deki_Wiki_1.8.3c_Hayes_source.tar.gz

tar xvzf Deki_Wiki_1.8.2b_Hayes_source.tar.gz

cd Deki_Wiki_1.8.3c_Hayes_source

mkdir /var/www/deki-hayes

cp -r web/* /var/www/deki-hayes/

service httpd restart

2.10 、编辑config/dekihost,修改apache用户www-data为apache

#!/bin/bash

# path to your wiki

DEKI_PATH=/var/www/deki-hayes

# this should match your Apache ServerName directive

DEKI_SERVERNAME=deki-hayes

prog=”MindTouch Deki Host Service”

start(){

if [ -f $DEKI_PATH/bin/mindtouch.host.sh ]; then

su -s /bin/bash apache — $DEKI_PATH/bin/mindtouch.host.sh start

fi

}

stop(){

if [ -f $DEKI_PATH/bin/mindtouch.host.sh ]; then

su -s /bin/bash apache — $DEKI_PATH/bin/mindtouch.host.sh stop

fi

}

status(){

testDream

}

以下内容省略

2.11 、配置自动启动

cp config/dekihost /etc/init.d/

ln -s /etc/init.d/dekihost /etc/rc3.d/S86dekihost

ln -s /etc/init.d/dekihost /etc/rc5.d/S86dekihost

2.12 、创建deki的log文件

touch /var/log/deki-api.log

chown apache /var/log/deki-api.log

2.13 、编辑/etc/httpd/conf/httpd.conf,在文件后增加如下内容

NameVirtualHost *:80

#

# NOTE: NameVirtualHost cannot be used without a port specifier

# (e.g. :80) if mod_ssl is being used, due to the nature of the

# SSL protocol.

#

#

# VirtualHost example:

# Almost any Apache directive may go into a VirtualHost container.

# The first VirtualHost section is used for requests without a known

# server name.

#

<VirtualHost *:80>

ServerName deki-hayes

ErrorLog /var/log/httpd/error.log

CustomLog /var/log/httpd/access.log common

DocumentRoot “/var/www/deki-hayes”

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

ProxyPassReverse /@api http://localhost:8081

SetEnv force-proxy-request-1.0 1

SetEnv proxy-nokeepalive 1

</VirtualHost>

2.14 、修改目录权限

chown -R apache /var/www/deki-hayes

apachectl restart

2.15 、授权apache能够创建/usr/local/var/目录,用于存放lucene index

mkdir -p /usr/local/var

chown apache /usr/local/var

2.16 、登录http://ip/config/index.php,通过页面安装deki

2.17 、页面安装完成后,自行如下操作

cd /var/www/deki-hayes/config

mkdir /etc/dekiwiki

chown apache /etc/dekiwiki

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

cp LocalSettings.php /var/www/deki-hayes/

cp AdminSettings.php /var/www/deki-hayes/

cp mindtouch.host.sh /var/www/deki-hayes/bin/

/etc/init.d/dekihost start

3 参考资料

http://wiki.opengarden.org/Deki_Wiki/Installation_and_Upgrade/1.8_Hayes_Official_Install_and_Upgrade_Guide/CentOS_5

Technorati 标签: ,,,

No Responses Yet

Subscribe to comments with RSS.

  1. […]   由于jira与deki知识库(mindtouch deki wiki 安装配置指南)安装在同一台机器上,80端口已被架设deki的apache占用,原本懒得将apache和tomcat集成,打算直接用8080端口访问jira算了,安装完成后发现路由器上没有做8080端口影射的,不能直接从公网访问,放假了网管还没有上班,看来还是只有借助jk2将apache和tomcat集成,以便能够从外网直接通过80端口访问jira服务。记录一下架设过程。 […]


发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: