Plone Software Center

Plone Software Center 就是軟體的集中管理中心,使用者可以把自己維護的軟體放到 Plone 上來集中管理。最典型的例子參觀 http://plone.org/products

環境

作業系統:CentOS 5
Plone 版本:Plone-3.2.2


安裝 Plone

這裡示範安裝一個測試用的 Plone 環境,下載 Plone 最新版本並將之解壓縮。切換到該目錄底下執行下列指令:

首先切換到 Plone-3.2.2-UnifiedInstaller 目錄底下
[xiang@localhost Plone-3.2.2-UnifiedInstaller]$ cd Plone-3.2.2-UnifiedInstaller

執行安裝指令,--target=  後面接所要安裝的目錄位置,這裡安裝在家目錄的 Plone 底下。 $HOME 就是使用者的家目錄,這個例子也可以寫成 /home/xiang/Plone
[xiang@localhost Plone-3.2.2-UnifiedInstaller]$ ./install.sh standalone --target=$HOME/Plone


安裝成功會出現如下面的訊息,要注意的是 Password,Plone 會隨機給一組密碼,這個密碼也會記錄在  $HOME/Plone/zinstance/adminPassword.txt 裡:

######################  Installation Complete  ######################

Plone successfully installed at /home/xiang/Plone3
See /home/xiang/Plone3/zinstance/README.txt
for startup instructions

Use the account information below to log into the Zope Management Interface
The account has full 'Manager' privileges.

  Username: admin
  Password: EjwJITZd

This account is created when the object database is initialized. If you
change the password later, you'll need to use the new password.

- If you need help, ask the mailing lists or #plone on irc.freenode.net.
- The live support channel also exists at http://plone.org/chat
- You can read/post to the lists via http://plone.org/forums

- Submit feedback and report errors at http://dev.plone.org/plone
(For install problems, specify component "Installer (Unified)")


你也可以直接觀察 adminPassword.txt,會出現如下面的訊息:


[xiang@localhost Plone-3.2.2-UnifiedInstaller]$ cat $HOME/Plone/zinstance/adminPassword.txt


Use the account information below to log into the Zope Management Interface
The account has full 'Manager' privileges.

  Username: admin
  Password: EjwJITZd

This account is created when the object database is initialized. If you
change the password later, you'll need to use the new password.




安裝 Plone Software Center 模組

Plone 常用的安裝模組方式有兩種,一種是直接下載該摸組的檔案回來安裝,另一種就是使用 buildout 的方式來安裝,本文件示範使用 buildout 方式安裝。如果要使用另一個安裝方式,請參考http://plone.org/products/plonesoftwarecenter/

安裝時遇到了一些錯誤導致 Plone Software Center 無法順利安裝,後來查出有兩個模組也必須安裝才能順利安裝 Plone Software Center,這兩個模組為:

    ArchAddOn
    AddRemoveWidget


修改 buildout.cfg

使用 buildout 方式安裝模組,我們必須在 buildout.cfg 檔案裡寫入我們想要安裝的模組。除了主要的 Plone Software Center,我們還需要安裝兩個模組才能順利安裝,請打開 buildout.cfg ,找到 [buildout] 的區塊,在 eggs 後面寫入要安裝的模組,可能會像這樣:

使用 vi 來編輯 buildout.cfg
[xiang@localhost ~]$ vi $HOME/Plone/zinstance/buildout.cfg

修改後的範例
eggs =
    Plone
    Products.PloneSoftwareCenter
    Products.ArchAddOn
    Products.AddRemoveWidget


寫入後存檔離開文件,並執行 bin/buildout 便會開始下載並安裝模組,可能會跟下面類同的訊息,如果都沒有錯誤訊息出現就代表 buildout 執行成功:

執行 builout 指令
[xiang@localhost ~]$ ./$HOME/Plone/zinstance/bin/buildout

執行訊息
Uninstalling unifiedinstaller.
Uninstalling zopeskel.
Uninstalling zopepy.
Uninstalling instance.
Updating zope2.
Updating fake eggs
Updating productdistros.
Installing instance.
Getting distribution for 'Products.PloneSoftwareCenter'.
Got Products.PloneSoftwareCenter 1.5.
Getting distribution for 'Products.ArchAddOn'.
Got Products.ArchAddOn 0.1.
Getting distribution for 'Products.AddRemoveWidget'.
Got Products.AddRemoveWidget 1.4.1.
Generated script '/home/xiang/Plone3/zinstance/bin/instance'.
Installing zopepy.
Generated interpreter '/home/xiang/Plone3/zinstance/bin/zopepy'.
Installing zopeskel.
Generated script '/home/xiang/Plone3/zinstance/bin/paster'.
Updating chown.
chown: Running chmod 600 .installed.cfg
Installing unifiedinstaller.
Updating precompile.
  precompiling python scripts in /home/xiang/Plone3/zinstance/products
  precompiling python scripts in /home/xiang/Plone3/zinstance/parts/productdistros




buildout 執行完之後再啟動 Plone,接著到 Site setup 的 Add-products on 裡就可以看到 Plone Software Center 的安裝選項了:


點選並安裝
Add-Product-on.png


成功安裝畫面如下

Installed.png


接著在新增項目裡就會出現 Software Center 的選項了

tab.png


arrow
arrow
    全站熱搜

    xiangyang17 發表在 痞客邦 留言(0) 人氣()