Everything is a contribution

走过Java的点点滴滴,与大家共勉~
随笔 - 21, 文章 - 0, 评论 - 10, 引用 - 0
数据加载中……

在Linux9/Linux ES3上安装moinmoin

在网上查找了好多wiki,对国际化的支持,最后选择了moinmoin,以下是搭建过程:

1. 安装Python2.3.4版本
解压缩Python2.3.4包后,进入解压后的目录:
#./configure --enable-unicode=ucs4
#make
#make install

2. 安装moinmoin
解压缩moin安装包后,进入解压后的目录:
#python2.3 setup.py --quiet install --record=install.log

3. 建立一个wiki实例
#export PREFIX=/usr/local
#export SHARE=$PREFIX/share/moin
#export WIKILOCATION=$SHARE
#export INSTANCE=moin.cgi

#export USER=apache
#export GROUP=apache

#cd $WIKILOCATION
#mkdir $INSTANCE
#cp -R $SHARE/data $INSTANCE
#cp -R $SHARE/underlay $INSTANCE
#cp $SHARE/config/wikiconfig.py $INSTANCE

#chown -R $USER.$GROUP $INSTANCE
#chmod -R ug+rwX $INSTANCE
#chmod -R o-rwx $INSTANCE

#cd $WIKILOCATION/$INSTANCE
#mkdir cgi-bin
#cp $SHARE/server/moin.cgi cgi-bin
#chown -R $USER.$GROUP cgi-bin
#chmod -R ug+rx cgi-bin
#chmod -R o-rwx cgi-bin
#vi cgi-bin/moin.cgi
修改第一行为:#!/usr/local/bin/python2.3
增加如下内容:
import sys
sys.path.insert(0, '/usr/local/share/moin/moin.cgi')

#echo "" >>/etc/httpd/conf/httpd.conf
#echo "Alias /wiki/ \"$SHARE/htdocs/\"" >>/etc/httpd/conf/httpd.conf
#echo "ScriptAlias /mywiki \"$WIKILOCATION/$INSTANCE/cgi-bin/moin.cgi\"" >>/etc/httpd/conf/httpd.conf
#echo "Alias /wikiattach/ \"/usr/local/share/moin/moin.cgi/data/pages/\"">>/etc/httpd/conf/httpd.conf

3. 修改wiki的配置文件wikiconfig.py
sitename = u'SoftBrain Wiki'
logo_string = sitename
interwikiname = None

data_dir = '../data/'
data_underlay_dir = '../underlay/'
url_prefix = '/wiki'

allowed_actions = ['DeletePage', 'AttachFile', 'RenamePage']
attachments = {
'dir': '../data/pages',
'url': '/wikiattach',
}

acl_enabled = 1

acl_rights_default = 'All:read'
acl_rights_before = "liu chunping,zhaowm,zhangcg,wenyp,xiajx,fuxw,chenjing,chu,shichida:read,write,delete,revert,admin"


mail_smarthost = "192.168.99.2"
mail_from = "xiajx@hotmail.com"
mail_login = ""

navi_bar = [
# Will use page_front_page, (default FrontPage)
u'%(page_front_page)s',
u'RecentChanges',
u'FindPage',
u'HelpContents',
]

theme_default = 'modern'

charset = "utf-8"
upperletters = "A-Z"
lowerletters = "0-9a-z"

default_lang = 'zh'

page_category_regex = u'^Category[A-Z]'
page_dict_regex = u'[a-z]Dict$'
page_form_regex = u'[a-z]Form$'
page_group_regex = u'[a-z]Group$'
page_template_regex = u'[a-z]Template$'

show_hosts = 1
show_section_numbers = 0
chart_options = {'width': 600, 'height': 300}

4. 修改/usr/local/lib/python2.3/site-packages/MoinMoin/i18n目录下的zh.py文件(大概在59-64行),
纠正编辑时候的javascript错误,做如下修改:
'''您对'%(lock_page)s'的编辑锁定已经超时!''',
'''您对'%(lock_page)s'的锁定将在#分钟内失效.''',
'''您对'%(lock_page)s'的锁定将在#秒内失效.''',


注意:对于moinmoin的迁移则不用进行步骤3、4,直接把原来的mywiki整个目录拷贝到/usr/local/share/moin目录即可;
如果需要单独对某页进行权限控制,只需要管理员在编辑该页时,将以下内容添加到第一行即可:
#acl Trusted:read,write,delete,revert Known:read,write,delete,revert All:read

posted on 2007-11-26 11:00 Kevin Xia 阅读(448) 评论(0)  编辑  收藏 所属分类: 开源技术


只有注册用户登录后才能发表评论。


网站导航: