Basic Install of Python/Zope/Plone server on Fedora Core 5
This How-to applies to:
Plone 2.5.x
This How-to is intended for:
Server Administrators
Martin Aspeli has a similar howto for previous Plone versions here: http://plone.org/documentation/how-to/setup-from-source If you want an excellent video presentation try Sean Kelly's Getting Your Feet Wet with Plone available here: http://www.archive.org/details/SeanKellyGettingYourFeetWetwithPlone however, this is a 127Mb download but is worth it.
Fedora Core 5
You should probably be in the root id to do all of this. If you are starting from scratch, try to install all the developer tools especially the GNU C compiler gcc. If you've already installed Fedora Core 5 and don't know if gcc is installed, you can try the command: gcc or rpm -qa | grep gcc and see if gcc is already installed or go on to the Python install which will check if there is a valid gcc available. If there is no gcc, then try 'yum install gcc' as the root id or download the gcc rpm and install it with the 'rpm -i filename' command. The gcc installed on my FC 5 is gcc-4.1.0-3. You should perform all the following from root.
Cool Ways to Get and Unpack tar Files
From the command line the curl command piped into tar is really great:
curl 'http://superb-east.dl.sourceforge.net/sourceforge/plone/Plone-2.5.tar.gz
' | tar zxvf -
The above will download the Plone tar file, gunzip and untar it all in one step.
If you know the URL, there's also the wget command:
wget http://superb-east.dl.sourceforge.net/sourceforge/plone/Plone-2.5.tar.gz which will only get the tar file which you'll have to unpack using tar -zxvf Plone-2.5.tar.gz to unpack.
If you don't know the URL, don't have a GUI interface or can't cut and paste a long URL, there is the text-based lynx web browser which you can browse to the website and download it through the browser. Or you can use lynx, press g for the go command and cut and paste the URL into it and download it without having to navigate to it.
Python
It may already be pre-installed on FC 5. It may not be Python 2.4.x You can try simply entering 'python' at the command prompt or 'rpm -qa | grep python' and see what versions may or may not already be installed. If it isn't installed then try 'yum install python' to install it. Python 2.4 has a 5% or better performance increase over older pythons and is required for Zope 2.9.x so we're going to go with it. To install from source, download Python 2.4.x 'compressed source tarball' from http://www.python.org, unpack it with
tar-zxvf Python-2.4.3.tgz
cd Python-2.4.3
./configure
make
make install ('sudo make install' on Mac OS X)
Python Imaging Library (PIL)
A number of things such as Photo albums require installation of the Python Imaging Library (PIL) which can be found here: http://www.pythonware.com/products/pil/
Installation is similar to the above for Python, consisting of un-tarring the file then running configure, make and make install:
tar-zxvf Imaging-1.1.5.tar.gz
cd Imaging-1.1.5
Look at the README file for instructions on compiling and installing but the command will look something like this:
python setup.py install
Now onward to Zope.
Zope
This will install Zope into /opt/zope/2.9.3 which will give you the flexibility to install different zope versions with a minimum of difficulty. For example, you can have /opt/zope/2.8.7 and /opt/zope/2.9.3 with which you can easily bring one server down and the other up in order to do migration to a new version or have older versions available to run in case something happens to a new one and you need to go back to an older version.
Download Zope 2.9.x tgz source file from http://www.zope.org Un-tar and un-zip it in a user id home directory such as by the command:
tar -zxvf Zope-2.9.3.tgz
Then:
cd Zope-2.9.3
The next commands will install Zope into /opt/zope/2.9.3
./configure --prefix=/opt/zope/2.9.3
make
make install
Now we go to the new install directory:
cd /opt/zope/2.9.3/bin
and create a new Zope instance by the command:
./mkzopeinstance.py
or
python mkzopeinstance.py
The program will prompt you for the install directory, administrator id and password which for this example will be:
Directory: /opt/zope/2.9.3
Username: admin
Password: *********
Verify password: *********
Now cd ../etc and edit the zope.conf file with your editor of choice such as pico, nano, vi, vim or emacs. Search for 'effective-user' and just under the commented out effective-user text enter:
effective-user zope
You may also increase the cache size to 5000 objects, more configuration possibilities can be found in this excellent tutorial: http://plone.org/documentation/tutorial/plone-apache/zope
Now save and close the zope.conf file and enter:
cd ../..
chown -R zope:zope *
cd 2.9.3/bin
This will change the ownership of this zope instance to run as the user id zope and put you back into the bin.
Now startup your zope server by executing the command: ./zopectl start
Then
./zopectl status
to see if it is still running. Then go to http://localhost:8080 to see if the Zope start screen is available. If something goes wrong, or it seems to not work enter:
./zopectl stop
to make sure it is stopped then either ./runzope or ./zopectl debug and examine the messages that appear on the screen.
If all is well go to your browser and enter http://localhost:8080/manage and see that you can get to the Control Panel from the root subdirectory.
Now we will install Plone.
Plone
Once Zope is running, go to http://www.plone.org and download the latest Plone which at the time of this writing is Plone 2.5
Enter:
cd ~
to return to your home directory. Now un-tar and un-zip Plone 2.5 by issuing the command:
tar -zxvf Plone-2.5.tar.gz
then:
cp -R Plone-2.5/* /opt/zope/2.9.3/Products
chown -R zope:zope /opt/zope/2.9.3/Products
Now re-start the server with the command:
/opt/zope/2.9.3/bin/zopectl restart
Go to your browser and enter http://localhost:8080/manage entering your administrator user id and password. Then in the Add: drop down box scroll down to 'Plone Site' and select it. Give the Plone site a name like 'test' then go to your browser and enter http://localhost:8080/test You should see the main Plone screen in all its glory. You will also be logged into the site as an Administrator. Go to Preferences, then Users and Groups and add the first user id like 'webmaster' then enter 'Select all' users and give webmaster reviewer and manager privileges to manage the site. Henceforth you should use the 'webmaster' id when working with that Plone instance instead of the 'admin' account you first used.
Migration from other Plones can be accomplished by Exporting objects including whole websites or parts of a website if you are having problems converting over. The .zexp files appear in the /opt/zope/2.9.3/var subdirectory of this installation. To import .zexp objects, you can cp or mv the .zexp file into the /opt/zope/2.9.3/import subdirectory then go to the zmi and choose the Import/export button and follow the directions.
Happy Ploning!
PIL
- Thanks for the comment, I've added a paragraph on how to install PIL and a link to the zope configuration page on plone.org which refers to increasing cache to 5000 objects.
- IV
Auto restart
chckconfig start-up
default password from yum
Setting the default password for admin from a yum install
# /etc/init.d/zope stop
Stopping zope: [ OK ]
# zopectl adduser admin <PASSWORD>
2006-09-04 17:46:14 WARNING Init Class Products.ATContentTypes.content.base.ATCTFolderMixin has a security declaration for nonexistent method 'manage_copyObjects'
2006-09-04 17:46:20 WARNING Plone Deprecation Warning
The CMFPlone.MemberData class will be removed in Plone 3.0
2006-09-04 17:46:30 WARNING Plone Deprecation Warning
CustomizationPolicies are deprecated and will be removed in Plone 3.0. Please use GenericSetup extension profiles instead.
2006-09-04 17:46:30 WARNING Plone Deprecation Warning
registerSetupWidget is deprecated and will be removed in Plone 3.0.
2006-09-04 17:46:30 WARNING Plone Deprecation Warning
registerSetupWidget is deprecated and will be removed in Plone 3.0.
2006-09-04 17:46:32 WARNING Plone Deprecation Warning
CustomizationPolicies are deprecated and will be removed in Plone 3.0. Please use GenericSetup extension profiles instead.
/usr/lib/zope/lib/python/OFS/Application.py:837: DeprecationWarning: __init__.py of Products.ExternalEditor has a long deprecated 'methods' attribute. 'methods' support might be removed in Zope 2.11 or a later feature release. Please use the 'legacy' argument of registerClass instead if the methods are constructors. Or refactor the product using adapters.
DeprecationWarning)
/usr/lib/zope/lib/python/Products/kupu/plone/__init__.py:32: DeprecationWarning: The product_name parameter of ToolInit is deprecated and will be ignored in CMF 2.0: kupu
icon="kupu_icon.gif",
# /etc/init.d/zope start
yum or tar file?
Group : System Environment/Daemons
Source : zope-2.9.4-2.fc5.src.rpm
Build Time : Wed Aug 30 07:29:35 2006
Group : System Environment/Daemons
Source : plone-2.5-3.fc5.src.rpm
Build Time : Wed Aug 30 07:10:00 2006
that happens to be what goes in the tar/zip file. Does the fc rpms stay pretty current? How quickly are they synchronized? It would really be nice to use yum instead of tar files. Thoughts?
Re: yum or tar file?
-- IV
make install as root or user?
Re: make install as root or user?
>> user can write. the opt directory on my system is not writable by anyone except root.
You should probably be the root id when doing this. Otherwise can you use sudo?
-- IV
why not use your home directory
/home/rnagle/zope/2.9.3
PIL
Can you add some lines on howto install PIL for python as Archetype requires it for image scaling?
Another thing is that IMHO while editing the zope.conf file you should also set the cache-size parameter to a sane value as this speeds up zope a good deal.