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 閱讀(478) 評論(0)  編輯  收藏 所屬分類: 開源技術

          主站蜘蛛池模板: 古丈县| 兴国县| 兴安县| 仁怀市| 大荔县| 德保县| 香格里拉县| 彝良县| 南投市| 桐城市| 开封市| 黄山市| 泾阳县| 曲松县| 海口市| 武鸣县| 邓州市| 海门市| 藁城市| 长宁县| 上饶县| 白沙| 哈密市| 从化市| 城市| 什邡市| 天祝| 漯河市| 绥德县| 鸡东县| 禄丰县| 鄂托克前旗| 靖边县| 南皮县| 城口县| 庄浪县| 墨玉县| 曲阳县| 怀来县| 景宁| 博乐市|