Linux slogan
Visite também: Segurança Linux · BR-Linux.org · Dicas-L · Doode · NoticiasLinux · SoftwareLivre.org · UnderLinux



» Screenshot
» Login
Login:
Senha:

Se você ainda não possui uma conta, clique aqui.

Esqueci minha senha



Artigo

CMS Plone 4.1.6 com invólucro Virtualenv + Buildout + Mount Point + BLOB Storage + Unicode UTF-8
Linux user
rbn_jesus
06/08/2012
O Plone está entre os CMS com menor índice de falhas de segurança, possui várias funcionalidades e técnicas que podem ser comparadas com outros CMS.
Por: Ricardo Brito do Nascimento | Blog: http://brito.blog.incolume.com.br
[ Hits: 4563 ]
Conceito: 10.0   4 voto(s)4 voto(s)4 voto(s)4 voto(s)4 voto(s) + quero dar nota ao artigo

Desfecho, arquivos fontes e referências

Agora, para conclusão de todo o processo, acesse a Zope Manage Interface (ZMI), em seu navegador preferido, no IP da máquina e a porta, em que o Plone foi configurado.

No exemplo deste artigo, 8101 e 8102, para as instâncias, client1 e client2, respectivamente.
  • http://iphost:8101/manage
  • http://iphost:8102/manage

Exemplo: http://192.168.0.2:8102/manage

Este artigo, pode ser lido também em meu blog: http://brito.blog.incolume.com.br, e futuramente disponibilizarei a versão em PDF.

Abraço a todos. :)

Buildout.cfg Completo

############################################ # # Buildout Configuration File for ZEO Plone # ----------------------------------------- # # 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.1-latest/versions.cfg # If you change your Plone version, you'll also need to update # the repository below. find-links +=     http://dist.plone.org/release/4.1.6 ############################################ # Ports # ----- # Specify the ports on which your Zope installation # will listen. # ZEO Server zeo-address = 127.0.0.1:8000 # Zope client 1 http-address = 8001 # Additional clients: client2-address = 8002 client3-address = 8003 client4-address = 8004 # 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 = admin ############################################ # Eggs # ---- # Add an indented line to the eggs section for any Python # eggs or packages you wish to include. # eggs =     Plone     Pillow ############################################ # Optional Functionality # ---------------------- # Uncomment the indented lines to include these 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.1.1 #    Products.PloneFormGen==1.7.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. Eggs with names beginning with "Products." # usually don't need this. 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. # 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 ############################################ # Environment Variables # --------------------- # Some of the behavior of your Zope/Plone instances are controlled with OS # environment variables. You may set those here in a key / value format. # Some common settings: #    * TZ allows you to set a time zone for systems where it's not #      automatically available. #    * zope_i18n_compile_mo_files allows for automatic compilation of #      missing translation files (may slow startup). #    * zope_i18n_allowed_languages allows you to limit the available #      translations. #    * PYTHON_EGG_CACHE determines where zipped python packages are unpacked #      for use. environment-vars =     zope_i18n_compile_mo_files true     PYTHON_EGG_CACHE ${buildout:directory}/var/.python-eggs     PYTHONHASHSEED random     #    TZ US/Eastern     #    zope_i18n_allowed_languages en es de fr ############################################ # 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 client1 client2 client3 adduser". user=admin:admin ############################################ # 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 =     zeoserver     client1 client2 client3 client4     zopepy     zopeskel     unifiedinstaller     backup     chown-zeo ############################################ # 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] ZopeSkel = 2.21.2 Cheetah = 2.2.1 Pillow = 1.7.7 Products.DocFinderTab = 1.0.5 collective.recipe.backup = 2.4 ordereddict = 1.1 plone.recipe.command = 1.1 plone.recipe.unifiedinstaller = 4.1


Base.cfg Completo

###################################################### # Base Configuration; used by both standalone and zeo, # which extend it. # --------------------------------------------------- # Buildout instructions in this file are # usually only changed by experienced developers. # # Beyond here there be dragons! [buildout] eggs-directory=../buildout-cache/eggs download-cache=../buildout-cache/downloads # Don't download new things unless needed to satisfy dependencies. # Override this on the command line with the "-n" flag. newest = false # Pick final releases over newer development releases when it's # possible to do so and still fulfil requirements. Note that explicit # version specifications will override this preference. prefer-final = true versions = versions # Add additional egg download sources here. dist.plone.org contains archives # of Plone packages. find-links =     http://dist.plone.org     http://download.zope.org/ppix/     http://download.zope.org/distribution/     http://effbot.org/downloads # unzip all eggs for easier debugging unzip = true # Load the DumpPickedVersions extension, which will notify # you of versions picked by buildout that were not specifically # pinned. extensions = buildout.dumppickedversions [zopepy] # installs a zopepy python interpreter that runs with your # full Zope environment recipe = zc.recipe.egg eggs = ${buildout:eggs} interpreter = zopepy scripts = zopepy [unifiedinstaller] # This recipe installs the plonectl script and a few other convenience # items. # For options see http://pypi.python.org/pypi/plone.recipe.unifiedinstaller recipe = plone.recipe.unifiedinstaller user = ${buildout:user} primary-port = ${buildout:http-address} sudo-command = sudo -u admin [repozo] # This recipe builds the repozo script for non-zeo installations. recipe = zc.recipe.egg eggs = ZODB3 scripts = repozo [backup] # This recipe builds the backup, restore and snapshotbackup commands. # For options see http://pypi.python.org/pypi/collective.recipe.backup recipe = collective.recipe.backup location = ${buildout:backups-dir}/backups snapshotlocation = ${buildout:backups-dir}/snapshotbackups [zeoserver] # Use this section to install and configure a Zope # Enterprise Objects server. # For options see http://pypi.python.org/pypi/plone.recipe.zeoserver recipe = plone.recipe.zeoserver zeo-address = ${buildout:zeo-address} # if we try to start as root, Zope will switch to the user below effective-user = ${buildout:effective-user} # Put the log, pid and socket files in var/zeoserver zeo-log     = ${buildout:directory}/var/zeoserver/zeoserver.log pid-file    = ${buildout:directory}/var/zeoserver/zeoserver.pid socket-name = ${buildout:directory}/var/zeoserver/zeo.zdsock blob-storage = ${buildout:directory}/var/blobstorage # You may also control the environment variables for the zeoserver. environment-vars = ${buildout:environment-vars} eggs = tempstorage zeo-conf-additional =             path ${buildout:directory}/var/filestorage/mp001BD.fs        blob-dir ${buildout:directory}/var/blobstorage/mp001bd                  path ${buildout:directory}/var/filestorage/mp002BD.fs        blob-dir ${buildout:directory}/var/blobstorage/mp002bd                  path ${buildout:directory}/var/filestorage/mp003BD.fs        blob-dir ${buildout:directory}/var/blobstorage/mp003bd          %import tempstorage             name temporary storage for sessioning      [chown-zeo] # This recipe is used to set permissions for root mode installs # For options see http://pypi.python.org/pypi/plone.recipe.command recipe = plone.recipe.command command =     echo Dummy references to force this to execute after referenced parts     echo ${backup:location} ${unifiedinstaller:sudo-command}     chmod 600 .installed.cfg     touch ${buildout:directory}/var/zeoserver/zeoserver.log     find ${buildout:directory}/var -type d -exec chmod 700 {} \;     chmod 744 ${buildout:directory}/bin/*     chmod 755 ${buildout:directory}/bin/python     mkdir -pm 755 ${buildout:directory}/{products,src}     mkdir -pm 755 ${buildout:directory}/var/blobstorage/mp00{1,2,3}bd/tmp     chown -R ${buildout:effective-user} ${buildout:directory}/var update-command = ${chown-zeo:command} [zopeskel] # installs paster and Zopeskel recipe = zc.recipe.egg eggs =     ZopeSkel     Paste     PasteDeploy     PasteScript     ${buildout:eggs} [client1] # Use this section to install and configure a Zope # client instance. # For options see http://pypi.python.org/pypi/plone.recipe.zope2instance # Additional clients are a recipe = plone.recipe.zope2instance zeo-client = true zeo-address = ${zeoserver:zeo-address} # The line below sets only the initial password. It will not change an # existing password. user = ${buildout:user} # if we try to start as root, Zope will switch to the user below effective-user = ${buildout:effective-user} http-address = ${buildout:http-address} icp-address = ${buildout:http-address} blob-storage = ${zeoserver:blob-storage} shared-blob = on # change debug-mode to "on" to run in development mode debug-mode = ${buildout:debug-mode} # change verbose-security to "on" for detailed security # errors while developing verbose-security = ${buildout:verbose-security} deprecation-warnings = ${buildout:deprecation-warnings} # Put the log, pid, lock files in var/client1 event-log = ${buildout:directory}/var/client1/event.log z2-log    = ${buildout:directory}/var/client1/Z2.log pid-file  = ${buildout:directory}/var/client1/client1.pid lock-file = ${buildout:directory}/var/client1/client1.lock # If you want Zope to know about any additional eggs, list them here. # e.g. eggs = ${buildout:eggs} my.package eggs = ${buildout:eggs} # If you want to register ZCML slugs for any packages, list them here. # e.g. zcml = my.package my.other.package zcml = ${buildout:zcml}      products = ${buildout:directory}/products # You may also control the environment variables for the instance. environment-vars = ${buildout:environment-vars} zope-conf-additional =                   mount-point /mp001bd          cache-size 5000                       blob-dir ${buildout:directory}/var/blobstorage/mp001bd              shared-blob-dir on              name mp001bd              server ${buildout:zeo-address}              storage mp001bd              var ${buildout:directory}/var                                              mount-point /mp002bd          cache-size 5000                       blob-dir ${buildout:directory}/var/blobstorage/mp002bd              shared-blob-dir on              name mp002bd              server ${buildout:zeo-address}              storage mp001bd              var ${buildout:directory}/var                                              mount-point /mp003bd          cache-size 5000                       blob-dir ${buildout:directory}/var/blobstorage/mp003bd              shared-blob-dir on              name mp003bd              server ${buildout:zeo-address}              storage mp003bd              var ${buildout:directory}/var                            zodb-temporary-storage =                                     server ${buildout:zeo-address}               storage temp               name zeostorage               var ${buildout:directory}/var                          mount-point /temp_folder             container-class Products.TemporaryFolder.TemporaryContainer          [client2] # a copy of client1, except adjusted address and var location <= client1 http-address = ${buildout:client2-address} icp-address = ${buildout:client2-address} event-log = ${buildout:directory}/var/client2/event.log z2-log    = ${buildout:directory}/var/client2/Z2.log pid-file  = ${buildout:directory}/var/client2/client2.pid lock-file = ${buildout:directory}/var/client2/client2.lock [client3] # a copy of client1, except adjusted address and var location <= client1 http-address = ${buildout:client3-address} icp-address = ${buildout:client3-address} event-log = ${buildout:directory}/var/client3/event.log z2-log    = ${buildout:directory}/var/client3/Z2.log pid-file  = ${buildout:directory}/var/client3/client3.pid lock-file = ${buildout:directory}/var/client3/client3.lock [client4] # a copy of client1, except adjusted address and var location <= client1 http-address = ${buildout:client4-address} icp-address = ${buildout:client4-address} event-log = ${buildout:directory}/var/client4/event.log z2-log    = ${buildout:directory}/var/client4/Z2.log pid-file  = ${buildout:directory}/var/client4/client4.pid lock-file = ${buildout:directory}/var/client4/client4.lock [unicode] recipe = plone.recipe.command update-command = ${unicode:command} command =    cat > ${buildout:directory}/lib/python2.6/site-packages/sitecustomize.py << EOF    import sys    sys.setdefaultencoding('utf-8')    EOF


Referências


Artigos em meu Blog:

<< Página anterior




Páginas do artigo
   1. Introdução - Escopo - Dependências
   2. PZP - Virtualenv - Buildout
   3. Mount point
   4. BLOB Storage
   5. Desfecho, arquivos fontes e referências

Outros artigos deste autor

Leitura recomendada

Comentários
[1] Comentário enviado por rony_souza em 08/08/2012 - 15:56h:

Muito bom o artigo, parece ser uma ótima ferramenta.



Contribuir com comentário


  
Para executar esta ação você precisa estar logado no site, caso contrário, tudo o que for digitado será perdido.
Responsável pelo site: Fábio Berbert de Paula - Conteúdo distribuído sob licença GNU FDL
Site hospedado por:

Viva o Linux

A maior comunidade Linux da América Latina! Artigos, dicas, tutoriais, fórum, scripts e muito mais. Ideal para quem busca auto-ajuda em Linux.