IMPORTANT: Per accedir als fitxer de subversion: http://acacha.org/svn (sense password). Poc a poc s'aniran migrant els enllaços. Encara però funciona el subversion de la farga però no se sap fins quan... (usuari: prova i la paraula de pas 123456)

Alert.png Aquesta wiki forma part dels materials d'un curs
Curs: Aplicacions web LOE
Fitxers: No hi ha
Repositori SVN: https://anonymous@svn.projectes.lafarga.cat/svn/iceupc/AplicacionsWeb
Usuari: anonymous
Paraula de pas: sense paraula de pas
Autors: Sergi Tur Badenas
Fitxer:Zopelogo.png
Logo de Zope

Conceptes

  • ZMI: ÉS el zope en si??? TODO

Instal·lació

Instal·lació a Ubuntu Server 10.10

Com a part de Zope/Plone podeu instal.lar Zope utilitzant el instal·lador unificat de Plone.

Vegeu també Instal·lador unificat de Plone. Si utilitzeu aquest sistema Zope s'instal·larà a la carpeta:

/usr/local/Plone/zinstance

Configuració

Interfície d'administració

http://localhost:8080/manage_main

Fitxer de configuració. /usr/local/Plone/zinstance/buildout.cfg

El trobareu a:

$ cat /usr/local/Plone/zinstance/buildout.cfg

Per aplicar els canvis a aquest fitxer cal executar:

$ sudo su
# cd /usr/local/Plone/zinstance
# bin/buildout
# exit
$

I reiniciar Zope:

$ sudo -u plone /usr/local/Plone/zinstance/bin/plonectl stop
$ sudo -u plone /usr/local/Plone/zinstance/bin/plonectl start 

Un exemple de fitxer és:


############################################
#
# Buildout Configuration File for Standalone Plone
# ------------------------------------------------
# $LastChangedDate: 2011-04-10 09:34:13 -0700 (Sun, 10 Apr 2011) $ $LastChangedRevision: 47921M $
#
# After making changes in this configuration file,
# you should run bin/buildout to update the components.
# 
# ALWAYS back up all Plone/Zope data and components
# before changing configuration.
# 
# Running "bin/buildout" will update your installation,
# installing missing components as necessary.
# 
# Use "bin/buildout -n" to update many components here to the newest
# available releases.
# This will update the add-on products you've added in the eggs= lines.
# This will not, however, upgrade Plone itself (or anything else you've
# pinned with a version specification). To upgrade Plone itself, see the
# comments in "Plone Component Versions".
#
# Tutorial instructions for using zc.buildout for
# configuration management are available at:
# http://plone.org/documentation/tutorial/buildout
# Full details at http://pypi.python.org/pypi/zc.buildout
#
############################################


[buildout]

############################################
# Plone Component Versions
# ------------------------
# This version of the Unified Installer has the components of Plone 4 
# preloaded so that it can install without an Internet connection.
# If you want to update, uncomment the "http://..." line below,
# edit it to point to the current version URL, comment out the 
# "versions.cfg" line and run "bin/buildout" while attached to the 
# Internet. Generally, you only want to do that as part of a planned migration.
# Note that if you are updating components, you should also check the versions
# section at the end of this file, since recipes or components other than
# those of Zope and Plone may need updating at the same time.
#
extends = 
    base.cfg
    versions.cfg
#    http://dist.plone.org/release/4.0-latest/versions.cfg


############################################
# Ports
# -----
# Specify the port on which your Zope installation
# will listen:
http-address = 8080


# If you try to start Zope as root, it will change user id to run as
# the effective user specified here. This user id must own the var directory
# of your buildout.
effective-user = plone


############################################
# Eggs
# ----
# Add an indented line to the eggs section for any Python
# eggs or packages you wish to include.
#
eggs =
    Plone
    PIL==1.1.6


# Optional Functionality
# ----------------------
# Uncomment the indented lines to include these add-on products.
# Documentation on all of them, along with many more products,
# is available at
# http://plone.org/products/
#
# Example products:
# * LinguaPlone provides tools for building multi-lingual sites
# * PloneFormGen provides through-the-web form building
#
#    Products.LinguaPlone==4.0.1
#    Products.PloneFormGen==1.6.0
#
# Note that versions may be specified here or in the [versions]
# section below. You should always specify versions that you know
# are compatible with the Plone release and at an acceptable
# development level.
#
# Commonly used development tools:
# Several excellent development tools are included in the develop.cfg
# buildout extension. Read it to learn how to activate these tools.

    
############################################
# ZCML Slugs
# ----------
# Some eggs need ZCML slugs to tell Zope to
# use them. This is increasingly rare.
zcml =
#    plone.reload

    
############################################
# Development Eggs
# ----------------
# You can use paster to create "development eggs" to
# develop new products/themes. Put these in the src/
# directory.
# You will also need to add the egg names in the
# eggs section above, and may also need to add them
# to the zcml section.
#
# Provide the *paths* to the eggs you are developing here:
develop =
#    src/my.package


############################################
# Debug Mode
# ----------
# Change debug-mode to "on" to run in development mode.
# This will dramatically slow Plone.
# 
debug-mode = off
# Add-on developers should turn deprecation warnings on
deprecation-warnings = off
# change verbose-security to "on" for useful security errors while developing
verbose-security = off


############################################
# Backup Directory
# ----------------
# Sets the target directory for the bin/backup and bin/snapshotbackup
# commands. Default is inside this project's var directory, but ideally
# this should be on a separate volume or backup server.
# 
backups-dir=${buildout:directory}/var


############################################
# Initial User
# ------------
# This is the user id and password that will be used to create the initial 
# user id that will allow you to log in and create a Plone site. This only
# sets the initial password; it will not allow you to change an already 
# existing password. If you change the admin password via the web interface,
# the one below will no longer be valid.
# If you find yourself locked out of your Zope/Python installation, you may
# add an emergency user via "bin/plonectl adduser".
user=admin:huXjRbKL


############################################
# Parts Specification
#--------------------
# Specifies the components that should be included in the buildout.
# All the basics are in the base.cfg extension; you may add your
# own if you need them at the end of this file.
parts =
    instance
    zopepy
    zopeskel
    unifiedinstaller
    chown


############################################
# Versions Specification
# ----------------------
# Version information supplied here will "pin" Python packages to a particular
# version number, even when you use the "newest" flag running buildout.
# Specifying versions for all packages is a good idea and can prevent
# accidental changes when you add new packages to your buildout.
# Note that versions specified here will override those specified earlier
# in the configuration, including those from the Plone and Zope version
# config files.
#
[versions]
Cheetah = 2.2.1
Paste = 1.7.5.1
PasteScript = 1.7.3
ZopeSkel = 2.19
collective.recipe.backup = 1.7
plone.recipe.command = 1.1
plone.recipe.osxcontroller = 0.4
plone.recipe.unifiedinstaller = 4.0rc1

#Required by:
#PasteScript 1.7.3
PasteDeploy = 1.3.4

Script de control d'arrancada i aturada. /usr/local/Plone/zinstance/bin/plonectl

Per arrancar:

$ sudo -u plone /usr/local/Plone/zinstance/bin/plonectl start

Per aturar Zope:

$ sudo -u plone /usr/local/Plone/zinstance/bin/plonectl stop

Podeu trobar més informació a:

$ firefox /usr/local/Plone/zinstance/README.html

Documentació

/usr/local/Plone/zinstance/README.html

$ firefox /usr/local/Plone/zinstance/README.html


Resolució de problemes

Conflicte al port 8080. Canviar el port de Zope

Al fitxer /usr/local/Plone/zinstance/buildout.cfg canvieu la línia

$ sudo joe /usr/local/Plone/zinstance/buildout.cfg
############################################
# Ports
# -----
# Specify the port on which your Zope installation
# will listen:
http-address = 8080

poseu el port que desitgeu. Per aplicar els canvis cal que feu:

$ sudo su
# cd /usr/local/Plone/zinstance/
# bin/buildout
Uninstalling unifiedinstaller.
Uninstalling instance.
Installing instance.
Updating zopepy.
Updating zopeskel.
Updating backup.
Updating chown.
chown: Running 
echo Dummy references to force this to execute after referenced parts
echo /usr/local/Plone/zinstance/var/backups sudo -u plone
chmod 600 .installed.cfg
find /usr/local/Plone/zinstance/var -type d -exec chmod 700 {} \;
chmod 744 /usr/local/Plone/zinstance/bin/*
Dummy references to force this to execute after referenced parts
/usr/local/Plone/zinstance/var/backups sudo -u plone
Updating osxcontroller.
Installing unifiedinstaller.
*************** PICKED VERSIONS ****************
[versions]

*************** /PICKED VERSIONS ***************

I atureu i arranqueu un altre cop Zope:

$ sudo /usr/local/Plone/zinstance/bin/plonectl stop
$ sudo /usr/local/Plone/zinstance/bin/plonectl start

No se la paraula de pas de l'administrador. No l'he apuntat quan me l'ha donat l'instalador unificat

Consulteu el fitxer:

$ cd /usr/local/Plone/zinstance
$ sudo cat adminPassword.txt
Use the account information below to log into the Zope Management Interface
The account has full 'Manager' privileges.

 Username: admin
 Password: PARAULADEPAS

This account is created when the object database is initialized. If you

Vegeu també

Enllaços externs