Python Zope Plone Buildout
How to install common applications in your hosting account.
How To Install Python
wget http://www.python.org/ftp/python/2.4.3/Python-2.4.3.tgz
tar xzvf Python-2.4.3.tgz
mv Python-2.4.3 py243
cd py243
./configure --prefix=/home/USER/py243
make
make install
How To Install Zope
wget http://www.zope.org/Products/Zope/2.10.3/Zope-2.10.3-final.tgz tar xzvf Zope-2.10.3-final.tgz mv Zope-2.10.3-final z2103Build and Install Zope
cd z2103 ./configure --prefix=/home/USER/z2103 --with-python=/home/USER/py243/bin/python make && make installMake Zope Instance
bin/mkzopeinstance.py Directory: /home/USER/i2103 Initial User: USERNAME/PASSWORD
Edit the etc/zope.conf to update the debug-mode; effective-user; and http, ftp, and webdav ports.
cd ~/i2103 nano etc/zope.confStart Zope Instance
first test: bin/runzope break the process: ctrl-c then use: bin/zopectl start
Edit the apache.conf file to reflect your domain name.
nano /home/USER/apache.conf
Login to the ZMI interface by launching root.domain.com/manage:port from your browser
How To Install Plone
To start, we want to shut down our Zope Instance.
~/i2103/bin/zopectl stop
Now, let's go out and get the software we need.
http://plone.googlecode.com/files/Plone-3.0-beta3.tar.gz tar xzvf Plone-3.0-beta3.tar.gz rm Plone-3.0-beta3.tar.gz mv Plone-3.0-beta3 pl30b3 cp -rf pl30b3/Products ~/i2103 cp -rf pl30b3/lib/python ~/i2103/lib
~/i2103/bin/runzopeand watch the logs for errors. When you have successfully troubleshooted and debugged everything you will see the message "Zope ready to handle requests." Ctrl-C to break runzope and
~/i2103/bin/zopectl start
Now return to the ZMI, check the Control_Panel, and your newly installed products should appear!
Next you will want to add a Plone instance to the root of your zope. Click the dropdown menu in the top right corner and Add CMFPlone. Navigate to this site by clicking the view tab in the root of your plone instance.
You may now want to configure the VirtualHostMonster to point to your plone root. Click on VHM in your Zope root and then select the mappings tab. Enter your domain name and the path to your Plone root. That's all there is to it. Check to see if your new plone site is public now by going to your mydomain.com address.
Congratulations, you have completed all tasks necessary for a vibrant Plone-powered website. All that's left is the customizations and some fresh content. Get started, create some content, and enjoy your Plone experience!
How To Install freetype
cd ~/py244/lib/python2.4/site-packages/
wget wget http://download.savannah.gnu.org/releases/freetype/freetype-2.3.4.tar.gz
tar xzvf freetype-2.3.4.tar.gz
cd freetype-2.3.4
./configure --prefix=/home/USER/py244/lib/python2.4/site-packages/freetype --with-python=~/py244/bin/python
make
make install
How To Install libjpeg
cd ~/py244/lib/python2.4/site-packages/
wget http://www.ijg.org/files/jpegsrc.v6b.tar.gz
tar xzvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure --prefix=~/py244/lib/python2.4/site-packages/libjpeg --with-python=~/py244/bin/python
make
cd ..
mkdir libjpeg libjpeg/bin libjpeg/man libjpeg/man/man1
cd jpeg-6b
make install
cd ..
mkdir libjpeg/include libjpeg/lib
cd jpeg-6b
make install-lib
How To Install zlib
wget http://www.zlib.net/zlib-1.2.3.tar.gz
tar xzvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure --prefix=~/py244/lib/python2.4/site-packages/zlib
make
make install
How To Install tcl and tk
wget http://prdownloads.sourceforge.net/tcl/tcl8.4.14-src.tar.gz
wget http://prdownloads.sourceforge.net/tcl/tk8.4.14-src.tar.gz
tar xzvf tcl8.4.14.tar.gz
tar xzvf tk8.4.14.tar.gz
cd tcl8.4.14/unix
./configure --prefix=~/py244/lib/python2.4/site-packages/tcl --with-python=~/py244/bin/python
make
make test
make install
cd ~/tk8.4.14
./configure --prefix=~/py244/lib/python2.4/site-packages/tk --with-python=~/py244/bin/python --with-tcl=~/py244/python2.4/site-packages/tcl
make
make install
How To Install PIL
cd ~/py244/lib/python2.4/site-packages
wget http://effbot.org/downloads/Imaging-1.1.6.tar.gz
tar xzvf Imaging-1.1.6.tar.gz
cd Imaging-1.1.6
nano setup.py
FREETYPE_ROOT = "/home/zope/py244/lib/python2.4/site-packages/freetype"
JPEG_ROOT = libinclude("/home/zope/py244/lib/python2.4/site-packages/libjpeg")
TIFF_ROOT = None
ZLIB_ROOT = libinclude("/home/zope/py244/lib/python2.4/site-packages/zlib")
TCL_ROOT = "/home/zope/py244/lib/python2.4/site-packages/tcl"
~/py244/bin/python setup.py install
How To Install ElementTree
cd ~/py244/lib/python2.4/site-packages
wget http://effbot.org/downloads/elementtree-1.2.6-20050316.tar.gz
tar xzvf elementtree-1.2.6-20050316.tar.gz
mv elementtree-1.2.6-20050316 elementtree
cd elementtree
~/py244/bin/python setup.py install
How To Migrate Plone
As a rule of thumb, always start at the top with upgrades, and work your way down — upgrade Products, then Plone, then Zope, then Python.
Do the actual migration on a imitated test instance first — don't bring down your live instance before you know it works properly for your site. Note: iold, and inew refer to the relevant zope instance versions.
Upgrade Your Products
This is most easily done by checking the version # in the ZMI at Control_Panel/Products. For a list of ZopeWorld installed products please refer to the Plone Products Matrix.
Delete any objects Uninstall in QuickInstaller rm -rf ~/iold/Products/TheProduct mv ~/backmeup/Products/TheProduct ~/backmeup/extraProducts restart ZopeAfter you're finished upgrading your products, it wouldn't hurt to backup your Data.fs.
Upgrade Plone
cd ~/iold/Products mv Archetypes ATContentTypes BTreeFolder2 CMFActionIcons CMFCalendar CMFCore CMFDefault CMFFormController CMFPlone CMFQuickInstallerTool CMFTopic DCWorkflow ExternalEditor Formulator generator GroupUserFolder MimetypesRegistry PlacelessTranslationService PloneErrorReporting PortalTransforms validation ~/backmeup/extraProducts/Plone-2.0.4 cd ~/pl252rc1 mv Archetypes ATContentTypes ATReferenceBrowserWidget CacheFu CMFActionIcons CMFCalendar CMFCore CMFDefault CMFDynamicViewFTI CMFFormController CMFPlacefulWorkflow CMFPlone CMFQuickInstallerTool CMFSetup CMFTopic CMFUid DCWorkflow ExtendedPathIndex ExternalEditor GenericSetup GroupUserFolder kupu Marshall MimetypesRegistry PasswordResetTool PlacelessTranslationService PloneErrorReporting PloneLanguageTool PlonePAS PloneTestCase PloneTranslations PluggableAuthService PluginRegistry PortalTransforms ResourceRegistries SecureMailHost statusmessages validation ~/iold/Products ~/iold/bin/zopectl stop ~/iold/bin/runzope ~/iold/bin/zopect start
Before you start the migration, you should decide what approach you want to use. There are two common ways of migrating:
- Migrating your site content, products and customizations in-place.
- Exporting your content, creating a fresh Plone 2.1 site, importing your content.
The in-place migration is more comprehensive, and hence more error-prone, especially if you have misbehaving third-party products or very old Plone instances. If your content is the most important thing for you, and you don't mind applying your configuration settings and simple customizations again, exporting all your content folders followed by an import into a clean instance might be a better approach for you. This procedure is described in the importing Plone 2.0 content into 2.1 FAQ. Please note that this should only be done if you are experiencing problems and as a last resort (or simply want to start with a clean site but keep your content) — for most people, in-place migration is the way to go.
- Log in to the ZMI as a
Manageruser. - Go to
portal_migration - click the migrate tab
- select "dry run" and then click upgrade
- if the process completes successfully, return and do the migration for real this time
Common problems
- If you have an item with the short name
eventsornewsin the root of your site, they should be renamed before starting the migration - since this can cause problems with the migration to the new Smart Folders that list these - One of the problems that people run into during migration is
third-party products they have installed that didn't clean up after
themselves, or that left behind "dead" content when uninstalled. This
can trip up the migration process. Here is a simple script that can list content with no associated product, so you can remove the defunct objects. To use it, create a
Script (Python)from the ZMI add menu in the root of your Plone site, paste in the code from this file, clickSaveand then click theTesttab to run the script. It should list dead object locations, so you can go and delete them manually if needed. - Another error that was often encountered in Plone 2.1 and 2.1.1 was
that some objects weren't converted to the new Archetypes-based types.
If you get: "maximum recursion depth exceeded" on viewing your site
after the migration, the folders/objects are most likely still CMF
objects, not Archetypes objects. Plone 2.1.2 includes a fix that tries
to work around this problem. (The reason this exists in the first place
seems to be bad behaviour introduced in the Plone 2.0 Release
Candidates and subsequently fixed before the 2.0 final release, but
some people still have content created with the Release Candidates.)
Also note that this error message can show up if you customized a 2.0
document_viewtemplate and are trying to use it with Plone 2.1
goto portal_atct goto type migraitons click "Fix Types" then click "Migrate"
After migration
- Several "new" tabs will appear at the top of the site. This is due to a policy change in how Plone constructs navigation. Plone 2.1 and up will automatically make tabs from the folders in the root, and doesn't require you to manually create them in the portal_actions tool anymore. To fix this, you can either:
- Go in and delete your portal_actions entries to only use the root folders (the folders also have individual visibility settings in the Properties tab of each item). This is the recommended approach unless you have global tabs leading deep inside the site, or:
- Turn off the automatic tab generation in the
Site Setup→Navigation Settings. This will make the global tabs behave the way they did in 2.0. - All the content items and folders that you have the permissions to view
now show up in the nav tree - if you want the old behavior from Plone
2.0 back, where only folders show up — and only those who are published
— you can now control the navigation setup in
Site Setup→Navigation Settings.
Upgrade Zope
OLD/bin/mkzopeinstance.py Directory: /home/USER/zope/instancenew Initial User: USERNAME/PASSWORDNow stop the old Zope Instance
instanceold/bin/zopectl stopRemember to always backup your Products and Data.fs before you begin.
cp instanceold/Products instanceold/var/Data.fs backmeupCopy over your old Products and Extensions
cp -rf instanceold/Products instanceold/Extensions instancenewBackup the original working Data.fs for your new instance and replace with your old Data.fs.
cp instancenew/var/Data.fs instancenew/var/Data.fs.orig cp instanceold/var/Data.fs instancenew/varRestart both Zope instances
instanceold/bin/zopectl start instancenew/bin/zopectl start
If you get the error
AttributeError: _length, when you are upgrading to Zope 2.8, follow this HowTo by Lucas Zdych. You will also need to call manage_convertIndexes
on all catalogs that are not in the root (CMFCollector catalogs etc).
Third-party products sometimes have their own catalogs, check with the
product maintainer about this. See the section "Upgrading from Earlier
Versions of Zope" in the file Zope-2.8.4-final/doc/FAQ.txt.If you get the error: "Unauthorized: The container has no security assertions. Access to 'getInline' of (Products.ResourceRegistries.tools.JSRegistry.JavaScript object at 0x047F6130) denied." Then uninstall VerboseSecurity. In Zope 2.8.x, you can enable a verbose security option in zope.conf and therefore it no longer needs to be installed as a product.
Upgrade Python
How To Install Plone Products
You may wish to
install some useful Plone Products to help power your
website. You can find a full list of these http://plone.org/products as well as http://www.contentmanagementsoftware.info.
These
products are installed in your Zope instance much in the same way Plone
and it's pre-packaged products were installed. Let's walk through
one, to be sure. Make sure you're back in your Products directory.
wget http://plone.org/products/atphoto/releases/1.0-alpha1/atphoto-1-0-alpha1-tar.gz tar xzvf atphoto-1-0-alpha1.tar.gzRestart Zope via ZMI/Control_Panel and verifiy that ATPhoto appears. To install products in your Plone instance use the QuickInstallerTool. Go to your Plone root, select portal_quickinstaller, and install ATPhoto. Success!
How To Install Archetypes
wget http://plone.org/products/archetypes/releases/1.4.2/Archetypes-1.4.2-final-Bundle.tar.gz
mkdir AT142Bundle
mv Archetypes-1.4.2-final-Bundle.tar.gz AT142Bundle
cd AT142Bundle
tar xzvf Archetypes-1.4.2-final-Bundle.tar.gz
cp Archetypes Marshall MimetypesRegistry PortalTransforms validation /home/USER/i296/Products
How To Install PyXML
cd ~/py243/lib/python2.4/site-packages
wget http://superb-east.dl.sourceforge.net/sourceforge/pyxml/PyXML-0.8.4.tar.gz
tar xzvf PyXML-0.8.4.tar.gz
~/py243/bin/python setup.py build
~/py243/bin/python setup.py install
How To Install MySQL-python
cd ~/py243/lib/python2.4/site-packages
wget http://easynews.dl.sourceforge.net/sourceforge/mysql-python/MySQL-python-1.2.1_p2.tar.gz
tar xzvf MySQL-python-1.2.1_p2.tar.gz
cd MySQL-python-1.2.1_p2
~/py243/bin/python setup.py build
~/py243/bin/python setup.py install
How To Install Trac
wget http://ftp.edgewall.com/pub/trac/trac-0.10.3.tar.gz
tar xzvf trac-0.10.3.tar.gz
cd trac-0.10.3
python ./setup.py install --prefix=/home/USER/t0103
How To Install libxml2
cd ~/py243/lib/python2.4/site-packages
wget ftp://xmlsoft.org/libxml2/libxml2-2.6.27.tar.gz
tar xzvf libxml2-2.6.27.tar.gz
./configure --prefix=/home/zope/py243/lib/python2.4/site-packages/libxml2 --with-python=~/py243/bin/python
make
make install
How To Install Django
wget http://www.djangoproject.com/download/0.95/tarball/
tar xzvf Django-0.95.tar.gz
mv Django-0.9.5 dj095
cd dj095
sudo python setup.py install

