Bika = Bika lab systems, 是一套 LIMS(Laboratory Information Management System) 的管理系統, 然後這套系統是架構在 Zope 和 Plone 之上, 而開發出來的系統, 所以需要裝 Zope 和 Plone.
- Zope: Application Server
- Plone: CMS(Content Management System)
- Bika: LIMS(Laboratory Information Management System)
於 Debian 安裝 Zope + Plone
- apt-get install plone-site # 這樣子就會裝好 Zope + Plone
- 預 設會幫你拉下面這一卡車 Package: nx plone-site python-docutils python-imaging python-roman zope-archetypes zope-atcontenttypes zope-atrbw zope-btreefolder2 zope-cmf1.6 zope-cmfactionicons1.6 zope-cmfcalendar1.6 zope-cmfcore1.6 zope-cmfdefault1.6 zope-cmfdynamicviewfti zope-cmfformcontroller zope-cmfplacefulworkflow zope-cmfplone zope-cmfquickinstallertool zope-cmfsetup1.6 zope-cmftopic1.6 zope-cmfuid1.6 zope-common zope-dcworkflow1.6 zope-extendedpathindex zope-externaleditor zope-genericsetup zope-groupuserfolder zope-kupu zope-marshall zope-mimetypesregistry zope-pas zope-passwordresettool zope-ploneerrorreporting zope-plonelanguagetool zope-plonepas zope-plonetranslations zope-pluginregistry zope-portaltransforms zope-pts zope-resourceregistries zope-securemailhost zope-statusmessages zope-validation zope2.10 zope2.9
建立 Zope 管理者帳號密碼:
- /var/lib/zope2.9/instance/plone-site/bin/zopectl adduser <user> <password>
修改 Zope 設定
- vim /etc/zope2.9/plone-site/zope.conf
- HTTP Port: 8080
- INSTANCE Data: /var/lib/zope2.9/instance/plone-site
- sudo /var/lib/zope2.9/instance/plone-site/bin/zopectl restart # 重新啟動 Zope
- 應該就可以 http://localhost:8080/manage 存取管理
下述安裝 Bika 步驟完整圖文可參考 Installing Bika LIMS
安裝 Bika
- Bika Download (初次安裝需 download bika-1.2.2_bundle.tar.gz)
- 之後只要單純升級 Bika, 就 download bika-1.2.2.tar.gz 即可(剛開始需要整合包)
- tar zxvf bika-1.2.2_bundle.tar.gz
- sudo mv bika-1.2.2/* /var/lib/zope2.9/instance/plone-site/Products/
- sudo cp /var/lib/zope2.9/instance/plone-site/Products/bika/scripts/start-id-server /var/lib/zope2.9/instance/plone-site/
- sudo chown zope:zope /var/lib/zope2.9/instance/plone-site/Products
- sudo -u zope /var/lib/zope2.9/instance/plone-site/start-id-server
設定 start-id-server for Zope
- vim /var/lib/zope2.9/instance/plone-site/etc/zope.conf
<environment>
IDServerURL http://localhost:8081
</environment> - 重新啟動 Zope: sudo /var/lib/zope2.9/instance/plone-site/bin/zopectl restart
將 Bika 設進 Zope Modules
- 開 瀏覽器 進 http://localhost:8080/manage
- 左邊選單 選 Root Folder
- 右邊下拉選 Plone Site, 按 Add
- id (short name, part of site's address): bika (隨意)
- Title (title of the Bika site): Bika LIMS Portal (隨意)
- Description (of your BIKA instance): This is the demo of Bika 1.2.2 (隨意)
- 設完後, 左邊應該就會出現 bika 的字, 代表安裝完成.
- 再來就可以 http://localhost:8080/bika 使用囉.
安裝 FSdump dump zope db
- 要看 Zope 的 DB, 就需要裝 FSDump 來看
- 下載 FSDump
- 然後重覆上述裝 Bika 的步驟(換成 FSDump 即可)
FSDump 使用
- http://localhost:8080/bika
- 選右邊 admin 旁的 Preferences
- 然後左邊有 Schema editor
- 再一個一個 dump 即可將 schema dump 出來
- Zope DB 和 平常使用的 DB 最大差異是, Zope DB 是 Object Database, 一般目前大家使用的是 Relational Database, 詳可見 Introduction to the Zope Object Database
- 轉載自上述文章: The Zope built-in database (ZODB) is an object database whereas MySQL is a relational database.
如果要開發 Zope 程式(或修改 bika), 可參考:
- Zope.org - Zope Documentation
- Zope.org - The Zope Book (2.6 Edition)
- Object-Relational mapping in Zope
其它參考: