Personal tools
You are here: Home Documentation How-tos Basic Install of Python/Zope/Plone server on Fedora Core 5
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

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

Managing your own server on Linux or Mac OS X instead of having it hosted or using the Windows installer version can give you greater speed, flexibility and power as well as being able to load the latest and greatest Python/Zope/Plone software. This is a basic howto for installing of Python/Zope/Plone on Fedora Core 5. This setup will allow other installations of Zope and Plone side by side so it is great for present and future migrations. This may work for other distros and Mac OS X. This will briefly show the installation for Python 2.4, Zope 2.9.3 and Plone 2.5. Other recent versions may be similar.

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!

by Ignacio Valdes last modified August 31, 2007 - 20:18 All content is copyright Plone Foundation and the individual contributors.

PIL

Posted by Christian Ledermann at August 23, 2006 - 07:37

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.

PIL

Posted by Ignacio Valdes at August 23, 2006 - 14:20
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

Posted by Mikko Ohtamaa at September 4, 2006 - 07:15
How to make Fedora automatically start up Zope instances when the server is restarted? On Ubuntu, there is a path /var/lib/zope/instances or something containing symbolic links to all Zope instances.

chckconfig start-up

Posted by Mikko Ohtamaa at September 4, 2006 - 07:21
http://lawtec.net/Members/antonh/news_item.2005-11-17.8917566532

default password from yum

Posted by Jason at September 4, 2006 - 22:08
When installing plone/zope from yum, the default username & password are not provided. A search of the system for either inituser or access also return nothing. The installation location is /usr/lib/zope though there is not evident configuration file or password database. Providing a default username/password or clear instructions on how to create them would be a very welcome addition to this.

Setting the default password for admin from a yum install

Posted by Jason at September 5, 2006 - 00:57
First ssh into the box as root and then:

# /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?

Posted by Robert Nagle at September 15, 2006 - 06:20
I notice that yum has rpms for both plone and zope. At the moment, the versions are
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?

Posted by Ignacio Valdes at September 15, 2006 - 14:33
I do not know how quickly they are synchronized but it puts an extra layer of someone needing to do something in order for you to have the latest. I find that once you've done it once yourself with the tar files that it takes a little time but seems worth it for the version control that you get. Zope/Plone moves so fast that the benefits of being able to use the latest seem to me to outweigh the convenience of yum or rpm.

-- IV

make install as root or user?

Posted by Robert Nagle at September 17, 2006 - 06:21
If you run mkzopeinstance.py as a user, you need to use a directory in which that user can write. the opt directory on my system is not writable by anyone except root.

Re: make install as root or user?

Posted by Ignacio Valdes at September 17, 2006 - 17:40
>> If you run mkzopeinstance.py as a user, you need to use a directory in which that
>> 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

Posted by john coppola at September 27, 2006 - 19:25
There's no rule saying the zope instance must reside in /opt. If you don't have root access install it in your home directory.
/home/rnagle/zope/2.9.3

better yet zope home

Posted by john coppola at September 27, 2006 - 19:27
/home/zope/2.9.3

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by