天天看點

Ubuntu Server 10.04 下安裝 Plone3.3.5 Installing a Plone buildout on Ubuntu

1、安裝下列依賴包:gcc, g++, gnu make, tar, bzip2

sudo apt-get install gcc g++ gnu make tar bzip2      

2、安裝plone:

從網站http://plone.org/products/plone 下載下傳Plone的Linux安裝包(.tar.gz)解壓至/tmp

cd /tmp



tar zxvf Plone-3.2.3-UnifiedInstaller.tar.gz



cd Plone-3.2.3-UnifiedInstaller


單機模式用
./install.sh standalone      
叢集多處理器用
./install.sh zeo      

安裝完了會顯示管理者密碼和怎麼啟動(資訊被儲存在~/Plone/zinstance/adminPassword.txt中)。

預設的端口是8080,可在配置檔案~/Plone/zinstance/etc/zope.conf中修改這個端口。

預設的執行個體是/opt/Plone-3.2.3/zinstance。

建立兩個預設系統使用者群組plone,zope。

啟動:

~/Plone/zinstance/bin/plonectl start      

關閉:

~/Plone/zinstance/bin/plonectl stop      

http:/localhost:8080 顯示一個歡迎頁面,http://localhost:8080/Plone 進入一個測試plone頁面,http://localhost:8080/manage 進入管理界面。

3、中文化:

預設安裝後進入http://localhost:8080/Plone 顯示的語言是英語,為了以中文顯示,需要稍微設定一下:以admin登入,密碼檢視檔案~/Plone/vsuan/adminPassword.txt。

1)點選右上角的“Site Setup”,然後點選螢幕中部的language進入language settings界面,夠選“Show country-specific language variants”,然後在語言的下拉框中選擇Chinese(China),最後點選save即可,重新整理一下頁面,這時全是中文的了。

2)部分菜單仍是英語(比如news, users,events),可以這樣做:點選左上角的“首頁”-->"檔案夾内容“,然後夠選一項,再點選”改名“,在”新标題處“輸入”使用者“,最後點選“全部改名”按鈕傳回,其他兩個相應改為“新聞”和“事件”。

3)首頁也是英文内容:更換成你自己公司的介紹是個不錯的注意。點選左上角“首頁”-->"檢視“,滑鼠下移到首頁标題“Welcome to Plone“并單擊後改為”歡迎來到微算公司“,其他部分作類似操作修改。

4)修改預設的管理者密碼:http://localhost:8080/manage -->acl_users-->users-->password

4、官方安裝文檔(可能不成功,僅供參考):

Installing a Plone buildout on Ubuntu

by Kees Hink (Goldmund, Wyldebeast & Wunderliebe) — last modified May 02, 2010 06:30 PM

This how-to describes, step by step, how you can install Plone on an Ubuntu system. It contains a shell script which you can execute with minimal thinking.

Important note:  Since Plone 3.1, the preferred way to get a buildout-based setup for Plone is to use the standard installer for your operating system (the Windows installer, the Mac installer, or the Unified Installer for Linux/Unix/BSD). These give you a best-practice, widely-used setup with an isolated Python and a well-documented buildout. This template is here for older versions of Plone and for experts who explicitly want a raw, non-installer-based installation.

Target audience

In this how-to, we will install Plone using buildout. This may be slightly more difficult than the Unified Installer (which also uses buildout under the hood), and therefore does not target the complete beginner. 

It is intended for people who are considering to install Plone on a Debian/Ubuntu server, or possibly another Linux distribution. It might also serve a purpose in the situation where a Unified Installer is not yet available for a specific release.

However, Ubuntu users of all levels of experience should be able to use this how-to to get a quick start with Plone.

Application to other Linux distributions

This document is Ubuntu-specific in the sense that it gives the fastest way to install the required system libraries and Python modules (PIL). The rest will also apply to other Linux distributions.

Ubuntu releases

This how-to was originally created for Ubuntu 9.04 (Jaunty Jackalope), and has been updated for Ubuntu 9.10 (Karmic Koala) and 10.04 (Lucid Lynx). It will be modified to continuously reflect the latest release of Ubuntu.

Plone releases

This how-to was originally created for Plone 3.3, and currently targets Plone 3.3.3. It will be modified to continuously reflect the latest release of Plone, and best practices for installing it.

Installing Plone 3 on Ubuntu

For easy usage, the main part of this how-to comes as a shell script:

#!/bin/bash



# install_plone_3_on_ubuntu.sh
#
# A quickstart guide to install Plone 3 on your Ubuntu system.
# Plone <4 only works with Python 2.4.
# 1a) On Ubuntu 9.04 (Jaunty) and 9.10 (Karmic):
#sudo apt-get install python2.4
# 1b) On Ubuntu 10.04 (Lucid):
wget http://www.python.org/ftp/python/2.4.6/Python-2.4.6.tgz
tar -xzf Python-2.4.6.tgz
cd Python-2.4.6/
./configure
make
sudo make install
cd

# 2a) Get setuptools / easy_install for python 2.4
#wget http://peak.telecommunity.com/dist/ez_setup.py
#sudo python2.4 ez_setup.py -U setuptools
#
# 2b) As an alternative to Setuptools, you may want to consider using
# Distribute (http://pypi.python.org/pypi/distribute/) instead.  
# The Plone community nowadays tends to use Distribute.
wget http://python-distribute.org/distribute_setup.py
sudo python2.4 distribute_setup.py

# 3) Get ZopeSkel paster scripts
sudo easy_install-2.4 ZopeSkel

# 4.1) Create a buildout.
PLONEDIR='myplonebuildout'
paster create -t plone3_buildout $PLONEDIR plone_version=3.3.3 zope2_install='' plone_products_install='' zope_user=admin zope_password=admin http_port=8080 debug_mode=off verbose_security=off 
# See http://dist.plone.org/release/ for available releases.
# You might also do 
# paster create -t plone3_buildout
# to get a dialog prompting you for the variables.
cd $PLONEDIR
# Run bootstrap, this will create the bin/ directory
python2.4 bootstrap.py
#
# 4.2) Install header files
# You need to have python header files installed in order to build Zope.
sudo apt-get install python2.4-dev
#
# We may need these header files to build PIL (see below). 
# Without the header files, you might see this after running buildout:
# --------------------------------------------------------------------
# *** TKINTER support not available
# *** JPEG support not available
# --- ZLIB (PNG/ZIP) support ok
# *** FREETYPE2 support not available
# --------------------------------------------------------------------
# This means you'll get errors like these for uploaded JPEG images:
# IOError: decoder jpeg not available
# and you won't be able to see previews of these images, or modify them.
sudo apt-get install libjpeg-dev libfreetype6-dev
# Now you'll see
# --------------------------------------------------------------------
# *** TKINTER support not available
# --- JPEG support ok
# --- ZLIB (PNG/ZIP) support ok
# --- FREETYPE2 support ok
# --------------------------------------------------------------------
# 4.3) Run buildout. 
./bin/buildout
# (See http://www.netsight.co.uk/junk/xkcd-buildout.png.)
# 5a) For running the code, we need the Python imaging module (PIL), which is
# no longer packaged for Python 2.4 since Ubuntu 9.04 (Jaunty Jackalope).
wget http://dist.plone.org/thirdparty/PILwoTk-1.1.6.4.tar.gz
sudo easy_install-2.4 PILwoTk-1.1.6.4.tar.gz
#
# 5b) As an alternative, you may also do as Alex Clarke suggests on 
# http://blog.aclark.net/?p=31, and add this to your buildout.cfg:
# [buildout]
# find-links +=
#     find-links = http://dist.plone.org/thirdparty/PILwoTk-1.1.6.4.tar.gz
# [instance]
# eggs += 
#     PILwoTk
# This means you don't have to install PILwoTk system-wide, which is nice. 
# However, you still have to install the header files on your system!

# 6) Start Plone!
./bin/instance fg      

Troubleshooting

Solutions for common problems

Nothing yet.

References

Buildout reference manual: Managing projects with Buildout